Entering edit mode
3.7 years ago
DareDevil
★
4.3k
Hi, I followed following steps to arrive at gvcf file:
#Mark duplicates in the aligned file
gatk MarkDuplicates -I s1.bam --METRICS_FILE s1_markdups_gatk_metrics.txt -O s1_sorted_gatkMarkDups.bam --VALIDATION_STRINGENCY LENIENT
#Recalibrating bases based on known Indels, snp data
gatk BaseRecalibrator --input s1_sorted_gatkMarkDups.bam --known-sites $MillsIndels --known-sites $Indels1kGenome --known-sites $DBSNP --output s1_recal_data.table --reference $reference
# Applying the recalibrated base info on Bam
gatk ApplyBQSR --input s1.sorted_gatkMarkDups.bam --reference $reference --bqsr-recal-file s1_recal_data.table --output s1_sorted.deduped.bqsr.bam
# Variant calling using Haplotype caller algorithm
gatk HaplotypeCaller --input s1_sorted.deduped.bqsr.bam --reference $reference --emit-ref-confidence GVCF --dbsnp $DBSNP --output s1_genome.g.vcf.gz
Now, I want to convert to gvcf file to a normal vcf file. Is it fine to use the following code to convert the files?
#calling only variants from a Genome VCF file
gatk GenotypeGVCFs -R $reference --variant s1_genome.g.vcf.gz -O s1.vcf
I have seen other post about convrting here and here. But, I did not get an accepted answer from those posts.
thanks for indicating!!