| 250 | |
| 251 | |
| 252 | void 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 | |
| 283 | void ChrCopyNumber::setValueAt(int i, float val) { |
| 284 | readCount_[i] = val; |
no outgoing calls
no test coverage detected