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

Method processReadWithBowtie

src/GenomeCopyNumber.cpp:4131–4178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4129}
4130
4131int GenomeCopyNumber::processReadWithBowtie(std::string const& inputFormat, std::string const& matesOrientation,std::string const line,std::string const line2) {
4132
4133 int valueToReturn = 0;
4134
4135 string chr1, chr2, orient1, orient2;
4136
4137 if ((inputFormat.compare("bowtie")==0 || inputFormat.compare("Bowtie")==0)&&(matesOrientation.compare("0")!=0)){
4138
4139 if (! line2.length()) return 0;
4140 std::vector<std::string> strs = split(line, '\t');
4141 std::vector<std::string> strs2 = split(line2, '\t');
4142 if ((strs.size() > 4)&&(strs2.size() > 4)) {
4143 string chr1 = strs[2];
4144 string chr2 = strs2[2];
4145
4146 processChrName(chr1);
4147 processChrName(chr2);
4148 if (chr1.compare(chr2)==0) {
4149
4150 string orient1 = strs[1];
4151 string orient2 = strs2[1];
4152 if (orient1.compare("+")==0)
4153 orient1 = "F";
4154 else
4155 orient1 = "R";
4156
4157 if (orient2.compare("+")==0)
4158 orient2 = "F";
4159 else
4160 orient2 = "R";
4161 int left = atoi(strs[3].c_str());
4162 int right = atoi(strs2[3].c_str());
4163
4164 if ((matesOrientation.compare(orient1+orient2)==0 && (right-left>0)) || (matesOrientation.compare(orient2+orient1)==0 && (right-left<0))) {
4165 int index = findIndex(chr1);
4166 if (index!=NA) {
4167 chrCopyNumber_[index].mappedPlusOneAtI(min(left,right),step_);
4168 valueToReturn=1;
4169 }
4170 }
4171 }
4172 }
4173 strs.clear();
4174 strs2.clear();
4175 return valueToReturn;
4176 }
4177 return 0;
4178}
4179float GenomeCopyNumber::removeLargeExons(float iqrToKeep) {
4180 float maxLength = 0;
4181 vector<ChrCopyNumber>::iterator it;

Callers

nothing calls this directly

Calls 4

splitFunction · 0.85
processChrNameFunction · 0.85
compareMethod · 0.80
mappedPlusOneAtIMethod · 0.80

Tested by

no test coverage detected