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

Method recalculateRatio

src/GenomeCopyNumber.cpp:425–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423}
424
425void GenomeCopyNumber::recalculateRatio (float contamination) {
426 if (contamination >= 1 || contamination <= 0) {
427 cerr << "contamination should be between 0 and 1\n";
428 exit(-1);
429 }
430 vector<ChrCopyNumber>::iterator it;
431
432 for ( it=chrCopyNumber_.begin() ; it != chrCopyNumber_.end(); it++ ) {
433 if (sex_.compare("XY")==0 && (it->getChromosome().find("X")!=string::npos || it->getChromosome().find("Y")!=string::npos)) {
434 //should take into account that normally one has only one copy of X and Y..
435 it->recalculateRatioWithContam(contamination,0.5, isRatioLogged_);
436 } else
437 it->recalculateRatioWithContam(contamination,1, isRatioLogged_);
438 }
439
440}
441
442void GenomeCopyNumber::recalculateRatioUsingCG (int degree, bool intercept, float minExpectedGC, float maxExpectedGC) {
443

Callers 5

calculateRatioUsingCGMethod · 0.45
fillInRatioMethod · 0.45
calculateRatioMethod · 0.45

Calls 3

compareMethod · 0.80
getChromosomeMethod · 0.80

Tested by

no test coverage detected