This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to use GenomicsDBImport

Hi all,

I got multiple vcf files by using the gatk haplotypecaller. Now I would like to combine these into single vcf file by using the GenomicsDBImport, but I am not sure how to do this step. I would be greatful for your help.

whole genome snps sequencing ngs

1 answer

Hi,

Have you tried reading through these documentation pages?

https://gatk.broadinstitute.org/hc/en-us/articles/360036883491-GenomicsDBImport

https://genomicsdb.readthedocs.io/en/latest/import-etl.html#vcf-gvcf

https://hpc.nih.gov/training/gatk_tutorial/genomics-db-import.html

It looks like the command is either

   gatk --java-options "-Xmx4g -Xms4g" GenomicsDBImport \
  -V data/gvcfs/mother.g.vcf.gz \
  -V data/gvcfs/father.g.vcf.gz \
  -V data/gvcfs/son.g.vcf.gz \
  --genomicsdb-workspace-path my_database \
  --tmp-dir=/path/to/large/tmp \
  -L 20

or

    gatk --java-options "-Xmx4g -Xms4g" \
   GenomicsDBImport \
   --genomicsdb-workspace-path my_database \
   --batch-size 50 \
   -L chr1:1000-10000 \
   --sample-name-map cohort.sample_map \
   --tmp-dir=/path/to/large/tmp \
   --reader-threads 5

If you have VCFs in a map file. Replace the names of the vcf in the example with the names of your vcf file.

Thank you so much for all help. I am bit confused with this argument; why we need to mention chr1 here. Can I run this without using this option.

-L chr1:1000-10000 \

I only got single vcf file for each sample and would like to merge all SNPs irrespective of chromosome. I am using this below ryegrass reference for SNPs calling using haplotypecaller.

https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/019/359/855/GCF_019359855.2_Kyuss_2.0/

below is the detail publication linked to this reference genome;

https://pmc.ncbi.nlm.nih.gov/articles/PMC10940895/

I can make the map file where I can mentioned all vcf file and sample name.

Many thanks

There is no need to include a region if you want to import entire files. You are trying to do join genotyping correct? Did you create GCVF files since that is the required input for GenomicsDBImport.

Can you show example commands you used (as requested by Pierre Lindenbaum ) ?

Hi GenoMax, thanks, I used below HaplotypeCaller command with ERC option so I do have GCVF file for each sample;

gatk --java-options "-Xmx28G" HaplotypeCaller \
-R ${REFERENCE} \
-I ${BAM} \
-O ${GVCF} \
-ERC GVCF \
--native-pair-hmm-threads ${SLURM_CPUS_PER_TASK}

Log in to answer this question.