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

Method fillInRatio

src/ChrCopyNumber.cpp:424–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422}
423
424void ChrCopyNumber::fillInRatio(bool islog) {
425 if ((int)ratio_.size()!=length_)
426 ratio_.resize(length_);
427
428 for (int i = 0; i<length_; i++) {
429 if (readCount_[i]>=0 && !(mappabilityProfile_.size() > 0 && mappabilityProfile_[i] <= minMappabilityPerWindow)) {
430 if (islog) {
431 ratio_[i] = log(readCount_[i]+1)/log(2.0);
432 }else {
433 ratio_[i] = readCount_[i];
434 }
435 } else {
436 ratio_[i] = NA;
437 }
438 }
439}
440
441void ChrCopyNumber::calculateRatioLog(ChrCopyNumber control, const double * a, const int degree){
442 if ((int)ratio_.size()!=length_)

Callers 1

runWithDefinedPloidyFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected