Ask Your Question

Revision history [back]

A workaround I used was to install the open-source samtools software, and convert from the CRAM to BAM format via the command:

samtools view -b -o outfile.bam infile.cram

Note you can speed this up by using, say 24 threads via:

samtools view -@ 24 -b -o outfile.bam infile.cram

This will work if your CRAM file has header information that provides MD5 sums for the reference sequence, and samtools will even automatically download needed reference data for you (into ~/.cache/hts-ref/), see this post: https://www.biostars.org/p/489646/

If you have the reference sequence FASTA file that was used to build the CRAM file, you can specify it (say it was called ref.fa) by running the command:

samtools view -@ 24 -b -T ref.fa -o outfile.bam infile.cram

samtools is available here: http://www.htslib.org/

Under Ubuntu I was able to install samtools (though not the latest version) via:

sudo apt-get install samtools

A workaround I used was to install the open-source samtools software, and convert from the CRAM to BAM format via the command:

samtools view -b -o outfile.bam infile.cram

Note you can speed this up by using, say 24 threads via:

samtools view -@ 24 -b -o outfile.bam infile.cram

This will work if your CRAM file has header information that provides MD5 sums for the reference sequence, and samtools will even automatically download needed reference data for you (into ~/.cache/hts-ref/), see this post: https://www.biostars.org/p/489646/

If you have the reference sequence FASTA file that was used to build the CRAM file, you can specify it (say it was called ref.fa) by running the command:

samtools view -@ 24 -b -T ref.fa -o outfile.bam infile.cram

samtools is available here: http://www.htslib.org/

Under Ubuntu I was able to install samtools (though not the latest version) via:

sudo apt-get install samtools

Under RedHat / CentOS I was able to install samtools via:

sudo yum install samtools