| 1716 | } |
| 1717 | |
| 1718 | void GenomeCopyNumber::printBAF(std::string const& outFile, SNPinGenome& snpingenome, std::string const& matefile) { |
| 1719 | string myName = outFile; |
| 1720 | string outfile = myName + "_BAF.txt"; |
| 1721 | std::ofstream file (outfile.c_str()); |
| 1722 | map<string,int>::iterator it; |
| 1723 | file << "Chromosome\tPosition\tBAF\tFittedA\tFittedB\tA\tB\tuncertainty"; |
| 1724 | file << "\n"; |
| 1725 | for ( it=chromosomesInd_.begin() ; it != chromosomesInd_.end(); it++ ) { |
| 1726 | |
| 1727 | string chrNumber = (*it).first; |
| 1728 | |
| 1729 | int indexSNP = snpingenome.findIndex(chrNumber); |
| 1730 | if (indexSNP == NA) { |
| 1731 | cerr << "An error occurred in GenomeCopyNumber::printBAF: could not find an SNP index for "<<chrNumber<<"\n"; |
| 1732 | exit(-1); |
| 1733 | } |
| 1734 | printBAF(chrNumber,file,snpingenome.SNP_atChr(indexSNP), myName, matefile); |
| 1735 | |
| 1736 | |
| 1737 | } |
| 1738 | file.close(); |
| 1739 | } |
| 1740 | |
| 1741 | |
| 1742 | void GenomeCopyNumber::deleteFlanks(int telo_centromeric_flanks) { |
no test coverage detected