I have been working on Java software to view reads from SAM/BAM files and want 
to expand it to be able to read CRAM as well.
I converted a BAM file using samtools view - C to create the cram file and 
samtools index to create the crai file.
Using htsjdk-1.1.30.jar, I ran into the following problems:

-          The constructor CRAMFileReader(final File cramFile, final File 
indexFile,  final ReferenceSource referenceSource) does a null pointer 
evaluation on a wrong variable.

-          The constructor AbstractBAMFileIndex(final File file, final 
SAMSequenceDictionary dictionary, final boolean useMemoryMapping) referenced by 
CRAMFileReader#getIndex() assumes bai header in crai files.
These were easy to fix, but the CRAMFileReader does not return any records 
after a call to queryAlignmentStart().
Seeking into the same cram file using samtools view works.

Am I wrong in assuming that the thsjdk library should be able to seek into cram 
files created by samtools?


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to