This is a test version of Biostars. For the public version, visit https://www.biostars.org.
problem with vcf file by gatk

Hello,

I am making vcf files using gatk with following codes:

java -jar $PICARD_DIR/picard.jar ValidateSamFile \
I=example.sorted.bam \
MODE=SUMMARY
java -jar $PICARD_DIR/picard.jar AddOrReplaceReadGroups \
I=example.sorted.bam \
O=example.gatk.sorted.bam \
RGID=1 \
RGLB=lib1 \
RGPL=illumina \
RGPU=unit1 \
RGSM=20
java -jar $PICARD_DIR/picard.jar ValidateSamFile \
I=example.gatk.sorted.bam \
MODE=SUMMARY
samtools index example.gatk.sorted.bam
gatk --java-options "-Xmx4G" HaplotypeCaller -R ref.fa -I example.gatk.sorted.bam -O example.gatk.vcf

But the vcf it gives does not give sample name in header line instead it gives a number 20 which I am not sure why:

#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  20

I want the sample name instead of 20 because I want to use the vcf files for further analysis where I am getting an error of duplicate names as all the vcf files have 20 instead of sample names.

I will appreciate any help. Thank you!

snp

1 answer

You are declaring sample name to be 20 (RGSM=20).

Log in to answer this question.