Entering edit mode
                    6.1 years ago
        evelyn
        
    
        ▴
    
    230
    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!