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

Method mappedPlusOneAtI

src/ChrCopyNumber.cpp:252–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250
251
252void ChrCopyNumber::mappedPlusOneAtI(int i, int step, int l) {
253 if (l == -1) {
254 int pos = i/step;
255 if ((int)readCount_.size()<=pos) {
256 //should not normally happen unless we are at the very end of file
257 cout << "Reaching end of file for chr "<<chromosome_ <<", position " << i <<"\n";
258 //readCount_.resize(pos+1);
259 //length_ = pos+1;
260 } else {
261 readCount_[pos]++;
262 while (step*(pos-1)+windowSize_>i && pos>=1) {
263 readCount_[--pos]++;
264 }
265 }
266 } else {
267 int pos = l;
268 if ((int)readCount_.size()<=pos) {
269 //should not normally happen unless we are at the very end of file
270 cout << "Reaching end of file for chr "<<chromosome_ <<", position " << i <<"\n";
271 //readCount_.resize(pos+1);
272 //length_ = pos+1;
273 } else {
274 readCount_[pos]++;
275 //while (step*(pos-1)+windowSize_>i && pos>=1)
276 //{
277 //readCount_[--pos]++;
278 //}
279 }
280 }
281}
282
283void ChrCopyNumber::setValueAt(int i, float val) {
284 readCount_[i] = val;

Callers 3

processPileUPLineMethod · 0.80
processReadMethod · 0.80
processReadWithBowtieMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected