| 483 | } |
| 484 | |
| 485 | void 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 | |
| 501 | void ChrCopyNumber::calculateRatio(ChrCopyNumber control, double a0, double a1) { |
| 502 | if ((int)ratio_.size()!=length_) |
no test coverage detected