| 423 | } |
| 424 | |
| 425 | void 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 | |
| 442 | void GenomeCopyNumber::recalculateRatioUsingCG (int degree, bool intercept, float minExpectedGC, float maxExpectedGC) { |
| 443 |
no test coverage detected