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

I am trying to convert cram file to bam file but I am getting the following error:

[E::cram_get_ref] Failed to populate reference for id 504

[E::cram_get_ref] Failed to populate reference for id 538

[E::cram_get_ref] Failed to populate reference for id 608

.........................................................................................

The code I am using:

samtools view -b -T ref_sequence.fa -o $sample.bam -@8 $sample.cram

Any idea?

alignment genome

was ref_sequence.fa the very same fasta sequence fasta that was used to map the reads from sample.bam ?

Yes. I am suspecting is it a multithreading issue?

1 answer

Solved. Seems it is a threading issue. When I have removed

-@8

from the code, there is no error or warning.

If instead of -@ you use --threads, do you have the same error?

Log in to answer this question.