Skip to content

Commit 83cec73

Browse files
committed
add a warning for SE data
1 parent 40eac96 commit 83cec73

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/gencore.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,18 @@ void Gencore::consensus(){
196196
int count = 0;
197197
int lastTid = -1;
198198
int lastPos = -1;
199+
bool hasPE = false;
199200
while ((r = sam_read1(in, mBamHeader, b)) >= 0) {
200201
mPreStats->addRead(b);
202+
count++;
203+
if(count < 1000) {
204+
if(b->core.mtid >= 0)
205+
hasPE = true;
206+
}
207+
if(count == 1000 && hasPE == false) {
208+
cerr << "WARNING: seems that the input data is single-end, gencore will not make consensus read and remove duplication for SE data since grouping by coordination will be inaccurate." << endl << endl;
209+
}
210+
201211
// check whether the BAM is sorted
202212
if(b->core.tid <lastTid || (b->core.tid == lastTid && b->core.pos <lastPos)) {
203213
// skip the -1:-1, which means unmapped

0 commit comments

Comments
 (0)