Question: RealignerTargetCreator (GATK) contig issue
0
gravatar for win
3.0 years ago by
win860
India
win860 wrote:

So i downloaded a .bam from phase 3 1000 genomes and i want to run the RealignerTargetCreator on it using GATK 3.8.

The following command works fine:

sudo java -jar algorithms/gatk/gatk3.8.jar -T RealignerTargetCreator -R references/hg38.fasta -I data/HG100.reordered.bam -o data/HG100.realignertargetcreator.intervals

But when this command is run with -know i get contigs mismatch error between my bam and the vcf file. The know indel VCF used is located here:

https://storage.googleapis.com/genomics-public-data/resources/broad/hg38/v0/Homo_sapiens_assembly38.known_indels.vcf.gz

Step prior I have applied the picard ReorderSam using hg38.

Am i using the incorrect indels file?

Thanks in advance.

gatk • 1.5k views
ADD COMMENTlink modified 15 months ago by Biostar ♦♦ 20 • written 3.0 years ago by win860
0
gravatar for Pierre Lindenbaum
3.0 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum133k wrote:

check the names, the length and the order of the contigs in

$ wget -q -O - "https://storage.googleapis.com/genomics-public-data/resources/broad/hg38/v0/Homo_sapiens_assembly38.known_indels.vcf.gz" | gunzip -c | grep '##contig'

is the same as

$ samtools view -H data/HG100.reordered.bam | grep '^@SQ'
ADD COMMENTlink written 3.0 years ago by Pierre Lindenbaum133k

Thanks, in the know_indels.vcf.gz i can see a lot of HLA-A, HLA-B, HLA-C contigs, where is not in the reordered BAM. Can this be an issue?

ADD REPLYlink written 3.0 years ago by win860

i can see a lot of HLA-A, HLA-B, HLA-C contigs, where is not in the reordered BAM. Can this be an issue?

yes

ADD REPLYlink written 3.0 years ago by Pierre Lindenbaum133k

........and how do take care of this issue?

ADD REPLYlink written 3.0 years ago by win860

change the sequence dictionary in the bam (insert the missing lines using samtools reheader ) or remove the ##contig lines and the variants in the vcf.

ADD REPLYlink written 3.0 years ago by Pierre Lindenbaum133k

OK, will try. I have never done any of this before.

ADD REPLYlink written 3.0 years ago by win860

Consider @Devon's instructions as you try samtools reheader: A: Problems while reheadering BAM with Samtools 1.3.1

ADD REPLYlink modified 3.0 years ago • written 3.0 years ago by GenoMax94k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1763 users visited in the last hour
_