| 2919 | } |
| 2920 | |
| 2921 | void GenomeCopyNumber::printCNVs (std::string const& outFile) { |
| 2922 | std::ofstream file (outFile.c_str()); |
| 2923 | for (int i = 0; i < (int)CNVs_.size(); i++) { |
| 2924 | if (CNVs_[i].getCopyNumber()>-1) { |
| 2925 | if (sex_.compare("XY")==0 && (CNVs_[i].getChr().find("X")!=string::npos || CNVs_[i].getChr().find("Y")!=string::npos)) { |
| 2926 | file << CNVs_[i].printEntryCNV(ploidy_*0.5); |
| 2927 | } else { |
| 2928 | file << CNVs_[i].printEntryCNV(ploidy_); |
| 2929 | } |
| 2930 | |
| 2931 | file << "\n"; |
| 2932 | } |
| 2933 | } |
| 2934 | file.close(); |
| 2935 | } |
| 2936 | |
| 2937 | vector <EntryCNV> GenomeCopyNumber::getCNVs () { |
| 2938 | return CNVs_; |
no test coverage detected