This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Specify reference to samtools index

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

Is your cram file coordinate-sorted?

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

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.

0 answers

No answers yet.

Log in to answer this question.