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

Method calculateRatioLog

src/ChrCopyNumber.cpp:441–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439}
440
441void ChrCopyNumber::calculateRatioLog(ChrCopyNumber control, const double * a, const int degree){
442 if ((int)ratio_.size()!=length_)
443 ratio_.resize(length_);
444 for (int i = 0; i<length_; i++) {
445 if ((control.getLength()>i)&&(control.getValueAt(i) != 0)){
446 if (mappabilityProfile_.size() == 0 || mappabilityProfile_[i] > minMappabilityPerWindow) {
447 ratio_[i] = readCount_[i]/polynomial(control.getValueAt(i),a,1,degree);
448 if (ratio_[i]<0)
449 ratio_[i] = NA;
450 } else
451 ratio_[i] = NA;
452 } else
453 if (readCount_[i]==0)
454 //ratio_[i] = 1;
455 ratio_[i] = NA;
456 else
457 ratio_[i] = NA;
458 //cout << readCount_[i] << "\t" << control.getValueAt(i) << "\t" << ratio_[i] << "\n";
459 }
460}
461
462void ChrCopyNumber::calculateRatio(ChrCopyNumber control, const double * a, const int degree){
463 if ((int)ratio_.size()!=length_)

Callers 1

calculateRatioMethod · 0.80

Calls 3

polynomialFunction · 0.85
getLengthMethod · 0.45
getValueAtMethod · 0.45

Tested by

no test coverage detected