CRAM support?

Hello, I’m wondering if there’s support, or plans for support, of the CRAM alignment format in BioJulia? I didn’t come across anything obvious reading the documentation, but perhaps it’s hiding somewhere, or a work in progress? Thanks!

1 Like

We have SAM and BAM in BioAlignments.jl currently. I don’t think we have anything for CRAM yet.

OK, thanks for the info. I’m a bioinformatician new to Julia and was wondering what the current state of affairs is. It’s great to see so much good work in the bioinformatics realm already.

I tried to support CRAM a few years ago but I couldn’t mainly because the specs of CRAM were not well documented and had many ambiguous description. Perhaps it’s good time for me to revisit.

BioAlignments.jl doesn’t use HTSlib, correct ? It looks like they have support for CRAM in there.

HTSlib DOES support CRAM, but Julia’s wrapper currently doesn’t support that part of the library (e.g. Rust’s wrapper does), or I didn’t notice it documented:

https://htslibjl.readthedocs.io/en/latest/

I don’t know anything really about this CRAM, but I noticed in other thread here, that people are using the pysam library through PyCall.jl and it supports CRAM:

https://pysam.readthedocs.io/en/latest/usage.html

D language also has support for formats (and I see claims, not sure about CRAM):

For example for flagstat sambamba is 1.4x faster than samtools. For index they are similar. For Markdup almost 6x faster and for view 4x faster. For sort sambamba has been beaten, though sambamba is up to 2x faster than samtools on large RAM machines (120GB+).

There some limited support to CALL Julia from D (not seen other direction), updated 2 days ago, now with “1D Arrays to Julia”, but not e.g. “1D Arrays from Julia” (not yet checked, maybe this package is in rapid development).

I’m not really suggesting calling D library, or the Rust wrapper, when you can call the C library straight or Python’s wrapper if it helps.

1 Like