Specify reference to samtools index
0
0
Entering edit mode
6.3 years ago
mkher ▴ 50

I generated a cram using samtools:

samtools view -C -T <reference-file> -o sample.cram sample.bam

Now I want to index the cram and the reference file is not in the same location. I get errors like

 Failed to populate reference for id 91
 Failed to populate reference for id 92

I suspect they're because of the missing reference. But samtools index command does not take a reference. I tried -T, and --reference. Any ideas on getting around this problem?

Thank you

Manisha

samtools cram • 2.7k views
ADD COMMENT
0
Entering edit mode

Is your cram file coordinate-sorted?

P.S.: Check about $REF_PATH and $REF_CACHE on HTSLIB docs.

ADD REPLY
0
Entering edit mode

The cram is coordinate-sorted. How can I check if it has M5 tags and what the value is? I am quite confused about what REF_PATH should be set to.

ADD REPLY

Login before adding your answer.

Traffic: 3063 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6