how to make a header name in a haplotyping script of gatk?
1
0
Entering edit mode
12 months ago
rj.rezwan • 0

Hi, I want to ask how we can make the header name as per our choice in a haplotyping script of gatk because by default the header name of the output.vcf file is mentioned as sample1? here is the script

gatk --java-options "-Xmx32g" HaplotypeCaller --native-pair-hmm-threads 20 -R ~/path//PitayaGenomic.fa -I ${inputbam_files} -O ${output}.g.vcf -ERC GVCF
headername gatk haplotypecalling • 637 views
ADD COMMENT
0
Entering edit mode

I don't understand.

the header name

the header name of what ?

because by default the header name of the output.vcf file is mentioned as sample1

what is sample1 ?

ADD REPLY
0
Entering edit mode

as you can see here the sample1 is the header name (this is the output.vcf file after haplotypecalling). For example I want to change it to the name American-beauty. Like multiple files with their header name same as the file name

#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  sample1
chr01   1   .   G   <NON_REF>   .   .   END=41  GT:DP:GQ:MIN_DP:PL  0/0:0:0:0:0,0,0
chr01   42  .   C   <NON_REF>   .   .   END=69  GT:DP:GQ:MIN_DP:PL  0/0:1:3:1:0,3,15
chr01   70  .   C   <NON_REF>   .   .   END=599 GT:DP:GQ:MIN_DP:PL  0/0:0:0:0:0,0,0
chr01   600 .   C   <NON_REF>   .   .   END=612 GT:DP:GQ:MIN_DP:PL  0/0:2:3:2:0,3,45
chr01   613 .   A   <NON_REF>   .   .   END=613 GT:DP:GQ:MIN_DP:PL  0/0:2:0:2:0,0,0
chr01   614 .   C   <NON_REF>   .   .   END=619 GT:DP:GQ:MIN_DP:PL  0/0:2:3:2:0,3,45
ADD REPLY
1
Entering edit mode

(later) Why asking anyway ? Ram gave the answer yesterday: why CombineGCVFs in gatk not showing all the samples name?

ADD REPLY
0
Entering edit mode

I have changed the header name following the suggestion of Ram. But my concern now is to change the name before haplotypecalling.

ADD REPLY
1
Entering edit mode
12 months ago

"Sample1" should have been specified from the very start when mapping the reads to a reference genome using read groups. https://gatk.broadinstitute.org/hc/en-us/articles/360035890671-Read-groups

you can change sample1 to another thing use gatk RenameSampleInVcf https://gatk.broadinstitute.org/hc/en-us/articles/360040510011-RenameSampleInVcf-Picard- or bcftools reheader

ADD COMMENT
0
Entering edit mode

Thanks I got the idea.

ADD REPLY

Login before adding your answer.

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