We've moved!
This site is now read-only. You can find our new documentation site and support forum for posting questions here.
Be sure to read our welcome blog!

Parsing CRAM files in htsjdk without a reference

s_andrewss_andrews Cambridge, UKMember

I'm trying to convert some older code I have which used the older sam.jar system to read SAM/BAM files. One of the main reasons to migrate to htsjdk is to be able to read CRAM files.

I've migrated the old code to the new API and the SAM/BAM stuff works fine. CRAM files are failing though due to the lack of a reference file (which is true - those files aren't available). I get an IllegalStateException saying "A valid CRAM reference was not supplied...".

However - I think that the bits of information I need from these files are things that I don't need a reference to extract. I only need positional information. I don't need read sequences, cigar strings or quality strings.

Is there a way to read the CRAM files without a reference to get at the subset of data which isn't reference compressed? A small snippet to show how to do this would be greatly appreciated.

Thanks

Tagged:

Best Answer

Answers

Sign In or Register to comment.