Skip to content

Commit

Permalink
fix the offset bug when outputting overlapped regions
Browse files Browse the repository at this point in the history
  • Loading branch information
sfchen committed Jun 19, 2020
1 parent 0da2f13 commit 207433e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/peprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ bool PairEndProcessor::processPairEnd(ReadPairPack* pack, ThreadConfig* config){
if(r1 != NULL && r2!=NULL && mOverlappedWriter) {
OverlapResult ov = OverlapAnalysis::analyze(r1, r2, mOptions->overlapDiffLimit, mOptions->overlapRequire, 0);
if(ov.overlapped) {
Read* overlappedRead = new Read(r1->mName, r1->mSeq.mStr.substr(ov.offset, ov.overlap_len), r1->mStrand, r1->mQuality.substr(ov.offset, ov.overlap_len));
Read* overlappedRead = new Read(r1->mName, r1->mSeq.mStr.substr(max(0,ov.offset), ov.overlap_len), r1->mStrand, r1->mQuality.substr(max(0,ov.offset), ov.overlap_len));
overlappedOut += overlappedRead->toString();
delete overlappedRead;
}
Expand Down

0 comments on commit 207433e

Please sign in to comment.