This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Getting samtools cram-to-bam error: [E::cram_get_ref] Failed to populate reference for id?

I am trying to convert a cram to a bam using the following samtools command set-up:

samtools view -h -b -@ 16 file.cram -o file.bam -T reference.fa 2>&1 | tee -a log.txt

However, when I try this, I get the following error:

[E::cram_get_ref] Failed to populate reference for id 76
[E::cram_get_ref] Failed to populate reference for id 102
[E::cram_get_ref] Failed to populate reference for id 129
.
.
.
.
[continues for over 20 lines like this]

I'm not sure why I am getting this error. I've made sure to use the same reference file that was used to generate the cram (I was using a different reference file before) and have also included the reference.dict file.

It's also noteworthy that, although I'm getting this error, the cram file still gets converted to a bam and downstream processes like GATK are still able to run on the bam. It's just concerning to be getting such an error message. Any thoughts?

samtools genome bams crams

0 answers

No answers yet.

Log in to answer this question.