MCPcopy Create free account
hub / github.com/arq5x/bedtools2 / KeyListOps

Method KeyListOps

src/utils/KeyListOps/KeyListOps.cpp:13–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include <iomanip>
12
13KeyListOps::KeyListOps():
14_dbFileType(FileRecordTypeChecker::UNKNOWN_FILE_TYPE)
15{
16 _opCodes["sum"] = SUM;
17 _opCodes["mean"] = MEAN;
18 _opCodes["stdev"] = STDDEV;
19 _opCodes["sstdev"] = SAMPLE_STDDEV;
20 _opCodes["median"] = MEDIAN;
21 _opCodes["mode"] = MODE;
22 _opCodes["antimode"] = ANTIMODE;
23 _opCodes["min"] = MIN;
24 _opCodes["max"] = MAX;
25 _opCodes["absmin"] = ABSMIN;
26 _opCodes["absmax"] = ABSMAX;
27 _opCodes["count"] = COUNT;
28 _opCodes["distinct"] = DISTINCT;
29 _opCodes["count_distinct"] = COUNT_DISTINCT;
30 _opCodes["distinct_only"] = DISTINCT_ONLY;
31 _opCodes["distinct_sort_num"] = DISTINCT_SORT_NUM;
32 _opCodes["distinct_sort_num_desc"] = DISTINCT_SORT_NUM_DESC;
33
34 _opCodes["collapse"] = COLLAPSE;
35 _opCodes["concat"] = CONCAT;
36 _opCodes["freqasc"] = FREQ_ASC;
37 _opCodes["freqdesc"] = FREQ_DESC;
38 _opCodes["first"] = FIRST;
39 _opCodes["last"] = LAST;
40
41 _isNumericOp[SUM] = true;
42 _isNumericOp[MEAN] = true;
43 _isNumericOp[STDDEV] = true;
44 _isNumericOp[MEDIAN] = true;
45 _isNumericOp[MODE] = false;
46 _isNumericOp[ANTIMODE] = false;
47 _isNumericOp[MIN] = true;
48 _isNumericOp[MAX] = true;
49 _isNumericOp[ABSMIN] = true;
50 _isNumericOp[COUNT] = false;
51 _isNumericOp[DISTINCT] = false;
52 _isNumericOp[COUNT_DISTINCT] = false;
53 _isNumericOp[DISTINCT_ONLY] = false;
54 _isNumericOp[COLLAPSE] = false;
55 _isNumericOp[CONCAT] = false;
56 _isNumericOp[FREQ_ASC] = false;
57 _isNumericOp[FREQ_DESC] = false;
58 _isNumericOp[FIRST] = false;
59 _isNumericOp[LAST] = false;
60
61 _methods.setDelimStr(",");
62 _methods.setNullValue(".");
63
64 // default to BED score column
65 _columns = "5";
66 // default to "sum"
67 _operations = "sum";
68 _precision = DEFAULT_PRECISION;
69
70}

Callers

nothing calls this directly

Calls 2

setDelimStrMethod · 0.45
setNullValueMethod · 0.45

Tested by

no test coverage detected