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

Method calculatePloidy

src/GenomeCopyNumber.cpp:3227–3240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3225}
3226
3227void GenomeCopyNumber::calculatePloidy(int minCNAlength) {
3228 //check if median for copy numbers is calculated
3229 if (chrCopyNumber_[0].getMedianValues().size()==0)
3230 calculateCopyNumberMedians(minCNAlength,0,0);
3231 cout << "..Getting ploidy information\n";
3232 int ploidy[] = {1,2,3,4,5,6,7,8,9,10};
3233 vector <double> scores;
3234 for (int i = 0; i < 6 ; i++) {
3235 scores.push_back(calculateXiSum(ploidy[i]));
3236 }
3237 int i = argmin(scores);
3238 ploidy_ = ploidy[i];
3239 cout << "..selected ploidy: " <<ploidy_<<"\n";
3240}
3241
3242double GenomeCopyNumber::calculateXiSum(int ploidy) {
3243 int totalNumberOfBP = 0;

Callers

nothing calls this directly

Calls 2

argminFunction · 0.85
getMedianValuesMethod · 0.80

Tested by

no test coverage detected