1

I'm using seqan 1.4.1 to read sam/bam files. I have a sam and bam file from the same data (an alignment to rn5 refseq genes). Oddly enough I didn't get this error when I aligned to ensembl genes.

I am reading the sam/bam files BamStream, but the same error occurs if I drop down to the lower-level Stream approach.

I print length(bamStreamIn._nameStore) and each record.rID as it's read in. Here's my output when I use the bam file version of the data:

namestore size 42252
record.rID : 10364
record.rID : 41714
record.rID : 20136
record.rID : 5043
..c/Users/XXXX/shared/seqan-library-1.4.1/include/seqan/bam_io/read_bam.h:208 Assertion failed : static_cast<__uint64>(record.rID) < length(nameStore(context)) was: 43257 >= 42252

Here's the output when I use the sam file:

namestore size 42252
record.rID : 10318
record.rID : 41436
record.rID : 20031
record.rID : 5009
record.rID : 13876
record.rID : 12206
...
(output continues successfully until the end of the file)

Interestingly the namestore size is the same, but the rIDs are different. Any idea why the rIDs are different and what's causing the assertion error?

Timur Shtatland
  • 12,024
  • 2
  • 30
  • 47
daj
  • 6,962
  • 9
  • 45
  • 79
  • Are you sure you have the latest version? the current code in gitHub has that line that threw the assertion error at line 250 not line 208. – dkatzel Mar 10 '14 at 14:35
  • it's the most recent stable version - 1.4.1. Is the latest development version likely to fix this issue? Has the .bam reading implementation changed much since the last stable version? – daj Mar 10 '14 at 14:40
  • I don't know. I've actually never used SeqAn myself. However, the release notes on their webpage say 1.4.1 was released in July 2013. there have been at least 4 bug fixing commits to the read_bam.h file since then. I would recommend pulling the latest version from github and if that still throws an error submit a bug report. – dkatzel Mar 10 '14 at 14:44
  • good call. it's fixed in the trunk, but not the stable release. – daj May 26 '14 at 19:55

0 Answers0