Skip to content

Commit 872e0cb

Browse files
committed
reverted intron+deletion fix
1 parent df591fd commit 872e0cb

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

gclib/GBam.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -334,56 +334,56 @@ void GBamRecord::setupCoordinates() {
334334
clipL=0;
335335
clipR=0;
336336
start=c->pos+1; //genomic start coordinate, 1-based (BAM core.pos is 0-based)
337-
bool intron=false;
338337
int exstart=c->pos;
339-
int del=0;
340-
//int op = cigar[i]&0xf;
341-
//int cl = cigar[i]>>4;
338+
//bool intron=false;
339+
//int del=0;
342340
for (int i = 0; i < c->n_cigar; ++i) {
343341
unsigned char op = _cigOp(cigar[i]);
344342
switch(op) {
345343
case BAM_CEQUAL: // =
346344
case BAM_CDIFF: // X
347345
case BAM_CMATCH: // M
346+
case BAM_CDEL: // D
348347
l+=_cigLen(cigar[i]);
349-
intron=false; del=0;
348+
//intron=false; del=0;
350349
break;
351-
case BAM_CDEL: // D
350+
/* case BAM_CDEL: // D
352351
del=_cigLen(cigar[i]);
353352
l+=del;
354353
if(intron) // deletion after intron
355354
exstart+=del; //push exon start
356-
break;
355+
break; */
357356
case BAM_CREF_SKIP: // N
358357
//intron starts
359358
//exon ends here
360359
{
361360
has_Introns=true;
362-
GSeg exon(exstart+1,c->pos+l-del);
361+
//GSeg exon(exstart+1,c->pos+l-del);
362+
GSeg exon(exstart+1,c->pos+l);
363363
exons.Add( exon );
364364
mapped_len+=exon.len();
365365
l += _cigLen(cigar[i]);
366366
exstart=c->pos+l;
367367
}
368-
intron=true; del=0;
368+
//intron=true; del=0;
369369
break;
370370
case BAM_CSOFT_CLIP: // S
371371
soft_Clipped=true;
372372
if (l) clipR=_cigLen(cigar[i]);
373373
else clipL=_cigLen(cigar[i]);
374-
intron=false; del=0;
374+
//intron=false; del=0;
375375
break;
376376
case BAM_CHARD_CLIP:
377377
hard_Clipped=true;
378-
intron=false; del=0;
378+
//intron=false; del=0;
379379
break;
380380
case BAM_CINS: // I
381381
//rpos+=cl; //gpos not advanced
382-
intron=false; del=0;
382+
//intron=false; del=0;
383383
break;
384384
case BAM_CPAD:
385385
//gpos+=cl;
386-
intron=false; del=0; //?
386+
//intron=false; del=0; //?
387387
break;
388388
default:
389389
int cl=_cigLen(cigar[i]);

stringtie.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "proc_mem.h"
1212
#endif
1313

14-
#define VERSION "2.1.5b"
14+
#define VERSION "2.1.5"
1515

1616
//#define DEBUGPRINT 1
1717

0 commit comments

Comments
 (0)