| 95 | } |
| 96 | |
| 97 | void GenomeCopyNumber::setSex(std::string sex) { |
| 98 | sex_=sex; |
| 99 | //remove chrY if female: |
| 100 | if (sex.compare("XX")==0) { |
| 101 | vector<ChrCopyNumber>::iterator it; |
| 102 | for ( it=chrCopyNumber_.begin() ; it != chrCopyNumber_.end(); it++ ) { |
| 103 | string::size_type pos = 0; |
| 104 | if ( ( pos = it->getChromosome().find("Y", pos)) != string::npos ) { |
| 105 | chrCopyNumber_.erase(it); |
| 106 | cout << "..Will not consider chrY..\n"; |
| 107 | |
| 108 | int success = chromosomesInd_.erase ("Y"); |
| 109 | if (success) { |
| 110 | cout << "..Erased chrY from the list of chromosomes\n"; |
| 111 | } else { |
| 112 | cout << "..Was not able to erase chrY from the list of chromosomes\n"; |
| 113 | } |
| 114 | return; |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | void GenomeCopyNumber::setBAFtrue() { |
| 122 | hasBAF_=1; |
no test coverage detected