Getting samtools cram-to-bam error: [E::cram_get_ref] Failed to populate reference for id?
Entering edit mode
3.9 years ago

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 • 2.4k views
Entering edit mode

Hello claudiadast!

It appears that your post has been cross-posted to another site:

This is typically not recommended as it runs the risk of annoying people in both communities.


Login before adding your answer.

Traffic: 2038 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6