MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / compare

Method compare

src/EntryCNV.cpp:109–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109float EntryCNV::compare(EntryCNV c2, int overlapPrecision, int & left, int & right, float ploidy, float controlPloidy) { //return overlap
110 if (chr_.compare(c2.getChr())!=0)
111 return 0;
112 if ((copyNumber_>ploidy && c2.getCopyNumber()>controlPloidy) || (copyNumber_<ploidy && c2.getCopyNumber()<controlPloidy) || (copyNumber_==ploidy && c2.getCopyNumber()==controlPloidy)) {
113 int startControl = c2.getStart()-overlapPrecision; //to get larger window in the control..
114 int endControl = c2.getEnd()+overlapPrecision;
115
116 if (endControl<start_ || startControl>end_)
117 return 0;
118 left = max(start_,startControl);
119 right = min(end_,endControl);
120 return (right-left+1)/(end_-start_+1);
121 } else {
122 return 0;
123 }
124
125}
126

Callers 15

readFileWithGenomeInfoFunction · 0.80
getLineNumberFunction · 0.80
getReadNumberFromPileupFunction · 0.80
processChrNameFunction · 0.80
getBAFinfoFunction · 0.80
findSmallestSuffixFunction · 0.80
getELANDinfoFunction · 0.80
getSAMinfoFunction · 0.80
getMateOrientationFunction · 0.80
getInputFormatFunction · 0.80
GenomeDensityMethod · 0.80
writeToFileMethod · 0.80

Calls 4

getChrMethod · 0.80
getCopyNumberMethod · 0.80
getStartMethod · 0.80
getEndMethod · 0.80

Tested by

no test coverage detected