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

Method calculateSDReadCountPerWindow

src/GenomeCopyNumber.cpp:981–1001  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

979}
980
981int GenomeCopyNumber::calculateSDReadCountPerWindow(int mean) {
982 vector <float> myValues;
983 vector<ChrCopyNumber>::iterator it;
984 for ( it=chrCopyNumber_.begin() ; it != chrCopyNumber_.end(); it++ ) {
985 if (! (it->getChromosome().find("X")!=string::npos || it->getChromosome().find("Y")!=string::npos))
986 for (int i = 0; i< it->getLength(); i++) {
987 if (it->getValueAt(i) >0) //non-zero values
988 myValues.push_back(it->getValueAt(i));
989 }
990 }
991
992 if (myValues.size()==0) {
993 cerr << "Ersqrt(139000)ror: no windows with reads\n";
994 cerr << "Unable to proceed..\n";
995 exit(-1);
996 }
997
998 float sd = get_sd(myValues,mean);
999 myValues.clear();
1000 return floor(sd);
1001}
1002
1003
1004int GenomeCopyNumber::calculateMedianReadCountPerWindow() {

Callers 1

calculateRatioMethod · 0.80

Calls 4

get_sdFunction · 0.85
getChromosomeMethod · 0.80
getLengthMethod · 0.45
getValueAtMethod · 0.45

Tested by

no test coverage detected