DepthOfCoverage badly formed genome location error
0
1
Entering edit mode
15 months ago
User000 ▴ 690

Hello

I need to get a per read depth coverage for mytest.chrM.bam file. I extract chrM from a whole genome file like this:

samtools view test.wgs.bam chrM -b > test.chrM.bam

When I try to calculate the coverage I get an error:

##### ERROR MESSAGE: Badly formed genome location: Contig chr1 given as location, but this contig isn't present in the Fasta sequence dictionary

This is how I calculate the coverage. I guess the problem is in the bam file header, but how to solve this problem?

java -Djava.io.tmpdir=/home/tmp -Xmx2g -jar /path/to/GenomeAnalysisTK.jar -T DepthOfCoverage -R chrM.fa -I test.chrM.bam -o test.chrM.stat -nt 3
coverage • 525 views
ADD COMMENT
0
Entering edit mode

What happens if you use the whole genome fasta? I think the issue may be that in the bam header you have all chromosomes, but in the fasta you have only the mitochondrion.

ADD REPLY

Login before adding your answer.

Traffic: 3164 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