Getting samtools cram-to-bam error “[E::cram_get_ref] Failed to populate reference for id”?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- c
- Domain
- bioinformatics
Research direction
Start with the samtools view command and the referenced file.cram, reference.fa, reference.dict, and log.txt. Trace the reported cram_get_ref failures and determine whether the conversion is expected to emit these errors; done means the cause and expected behavior are established.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- C
- Stars
- 950
- Forks
- 475
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from samtools/htslib
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
-
tabix performance Open
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100