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

Method fillInRatio

src/GenomeCopyNumber.cpp:1284–1310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1282}
1283
1284int GenomeCopyNumber::fillInRatio() {
1285 vector <float> countValues;
1286 vector<ChrCopyNumber>::iterator it;
1287
1288 for ( it=chrCopyNumber_.begin() ; it != chrCopyNumber_.end(); it++ ) {
1289 if ((sex_.compare("XY")==0) && (it->getChromosome().find("X")!=string::npos || it->getChromosome().find("Y")!=string::npos)) {
1290 //should take into account that normally one has only one copy of X and Y..
1291 it->fillInRatio(isRatioLogged_);
1292 } else {
1293 it->fillInRatio(isRatioLogged_);
1294 for (int i = 0; i< it->getLength(); i++) {
1295 if (it->getValueAt(i)>0) {
1296 countValues.push_back(it->getRatioAtBin(i));
1297 }
1298 }
1299 }
1300 }
1301 float median=get_medianNotNA(countValues);
1302 for ( it=chrCopyNumber_.begin() ; it != chrCopyNumber_.end(); it++ ) {
1303 if (!isRatioLogged_) {
1304 it->recalculateRatio(median);
1305 } else {
1306 it->recalculateLogRatio(median);
1307 }
1308 }
1309 return 1;
1310}
1311
1312int GenomeCopyNumber::calculateRatio( GenomeCopyNumber & controlCopyNumber, int degree, bool intercept) {
1313

Callers

nothing calls this directly

Calls 8

get_medianNotNAFunction · 0.85
compareMethod · 0.80
getChromosomeMethod · 0.80
getRatioAtBinMethod · 0.80
recalculateLogRatioMethod · 0.80
getLengthMethod · 0.45
getValueAtMethod · 0.45
recalculateRatioMethod · 0.45

Tested by

no test coverage detected