| 979 | } |
| 980 | |
| 981 | int 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 | |
| 1004 | int GenomeCopyNumber::calculateMedianReadCountPerWindow() { |
no test coverage detected