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

Method calculateRatio

src/ChrCopyNumber.cpp:462–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462void ChrCopyNumber::calculateRatio(ChrCopyNumber control, const double * a, const int degree){
463 if ((int)ratio_.size()!=length_)
464 ratio_.resize(length_);
465 for (int i = 0; i<length_; i++) {
466 if ((control.getLength()>i)&&(control.getValueAt(i) != 0)){
467
468 if (mappabilityProfile_.size() == 0 || mappabilityProfile_[i] > minMappabilityPerWindow) {
469 ratio_[i] = readCount_[i]/polynomial(control.getValueAt(i),a,1,degree);
470 if (ratio_[i]<0)
471 ratio_[i] = NA;
472 } else
473 ratio_[i] = NA;
474
475 } else
476 if (readCount_[i]==0)
477 //ratio_[i] = 1;
478 ratio_[i] = NA;
479 else
480 ratio_[i] = NA;
481 //cout << readCount_[i] << "\t" << control.getValueAt(i) << "\t" << ratio_[i] << "\n";
482 }
483}
484
485void ChrCopyNumber::recalculateRatio(ChrCopyNumber control){
486 for (int i = 0; i<length_; i++) {

Callers 1

runWithDefinedPloidyFunction · 0.45

Calls 3

polynomialFunction · 0.85
getLengthMethod · 0.45
getValueAtMethod · 0.45

Tested by

no test coverage detected