MCPcopy Create free account
hub / github.com/OpenGene/fastplong / passLowComplexityFilter

Method passLowComplexityFilter

src/filter.cpp:67–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67bool Filter::passLowComplexityFilter(Read* r) {
68 int diff = 0;
69 int length = r->length();
70 if(length <= 1)
71 return false;
72 const char* data = r->mSeq->c_str();
73 for(int i=0; i<length-1; i++) {
74 if(data[i] != data[i+1])
75 diff++;
76 }
77 if( (double)diff/(double)(length-1) >= mOptions->complexityFilter.threshold )
78 return true;
79 else
80 return false;
81}
82
83vector<pair<int, int>> Filter::detectLowQualityRegions(Read* r, int windowSize, int quality) {
84 vector<pair<int, int>> results;

Callers

nothing calls this directly

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected