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

Method recalculateRatio

src/ChrCopyNumber.cpp:485–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483}
484
485void ChrCopyNumber::recalculateRatio(ChrCopyNumber control){
486 for (int i = 0; i<length_; i++) {
487 float controlRatio = control.getRatioAtBin(i);
488 if ((control.getLength()>i)&&(controlRatio > 0)){
489 if (mappabilityProfile_.size() == 0 || mappabilityProfile_[i] > minMappabilityPerWindow) {
490 ratio_[i] = ratio_[i]/controlRatio;
491 if (ratio_[i]<0)
492 ratio_[i] = NA;
493 } else
494 ratio_[i] = NA;
495 } else
496 ratio_[i] = NA;
497 //cout << readCount_[i] << "\t" << control.getValueAt(i) << "\t" << ratio_[i] << "\n";
498 }
499}
500
501void ChrCopyNumber::calculateRatio(ChrCopyNumber control, double a0, double a1) {
502 if ((int)ratio_.size()!=length_)

Callers 1

runWithDefinedPloidyFunction · 0.45

Calls 3

polynomialFunction · 0.85
getRatioAtBinMethod · 0.80
getLengthMethod · 0.45

Tested by

no test coverage detected