You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i need to be able to quickly tell how many reads are mapped on the different sequences in an alignment. the crai index does not seem to support this, which means i need a bai index.
Now, i'm using :
CRAMBAIIndexer.createIndex(new SeekableFileStream(file), indexFile, logger, ValidationStringency.STRICT);
But this does not seem to work. The bai file contains now read counts (mapped, unmapped etc.). Looking at the code, that makes sense, as it is using the codepath that is explicitely not decoding the individual records.
When looking at the samtools code, it seems like there is a reasonably fast way to count the reads without having to fully decode them: https://github.com/samtools/samtools/blob/147ac2f83857d6209e344a77a2ae74324975fc67/bam_index.c#L160
So my question is, is there a way with htsjdk to create the bai index, or otherwise count the reads without having the decode the full CRAM file with the reference etc.?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, i need to be able to quickly tell how many reads are mapped on the different sequences in an alignment. the crai index does not seem to support this, which means i need a bai index.
Now, i'm using :
CRAMBAIIndexer.createIndex(new SeekableFileStream(file), indexFile, logger, ValidationStringency.STRICT);
But this does not seem to work. The bai file contains now read counts (mapped, unmapped etc.). Looking at the code, that makes sense, as it is using the codepath that is explicitely not decoding the individual records.
When looking at the samtools code, it seems like there is a reasonably fast way to count the reads without having to fully decode them:
https://github.com/samtools/samtools/blob/147ac2f83857d6209e344a77a2ae74324975fc67/bam_index.c#L160
So my question is, is there a way with htsjdk to create the bai index, or otherwise count the reads without having the decode the full CRAM file with the reference etc.?
Beta Was this translation helpful? Give feedback.
All reactions