This is a test version of Biostars. For the public version, visit https://www.biostars.org.
converting cram to ubam

How can I convert a cram to an unmapped bam file with samtools?

samtools view -b -T ref.fasta input.cram > output.bam

is this correct?

cram

I'm curious - why do you want to do this? Are you submitting reads from your on premises CRAM archive to something like GEO or SRA?

1 answer

samtools collate -O -u input.cram | \
  samtools reset -O BAM -o out.bam

Log in to answer this question.