This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error while doing joint genotype calling using GATK

Hi I am having multiple GVCF files and now would like to do the join genotyping calling but I am getting below error with my script. Could you please suggest what would be the possible issue, is it okay to generate the interval as shown in the script?

Script:

#!/bin/bash
#SBATCH --job-name=gatk_joint_11sample
#SBATCH --mail-type=END,FAIL
#SBATCH --mail-user=NGS.@GMAIL.COM
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --mem=32G
#SBATCH --time=48:00:00
#SBATCH --partition=k2-himem

module load apps/java/18.0.1.1/noarch
module load apps/gatk/4.2.2.0/noarch

# ========================

# Variables

# ========================



 REFERENCE="/whole.genome/trim.galore/GCF_019359855.2_Kyuss_2.0_genomic.fna" 
   SAMPLE_MAP="/whole.genome/trim.galore/sample.map.txt"    
   DB_DIR="/whole.genome/trim.galore/genomicsdb_workspace"
    OUTPUT="/whole.genome/trim.galore/cohort.vcf.gz"
    INTERVALS="/whole.genome/trim.galore/intervals.list"

# Create intervals automatically

cut -f1 ${REFERENCE}.fai > ${INTERVALS}

echo "Starting GenomicsDBImport..."

gatk --java-options "-Xmx28G" GenomicsDBImport \
--genomicsdb-workspace-path ${DB_DIR} \
--batch-size 50 \
--sample-name-map ${SAMPLE_MAP} \
 -L ${INTERVALS}

echo "GenomicsDBImport completed."

echo "Starting GenotypeGVCFs..."

gatk --java-options "-Xmx28G" GenotypeGVCFs \
-R ${REFERENCE} \
-V gendb://${DB_DIR} \
-O ${OUTPUT}

echo "Joint genotyping completed."

Error;

11:29:43.466 INFO  GenotypeGVCFs - Picard Version: 2.25.4
11:29:43.466 INFO  GenotypeGVCFs - Built for Spark Version: 2.4.5
11:29:43.466 INFO  GenotypeGVCFs - HTSJDK Defaults.COMPRESSION_LEVEL : 2
11:29:43.466 INFO  GenotypeGVCFs - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
11:29:43.466 INFO  GenotypeGVCFs - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
11:29:43.466 INFO  GenotypeGVCFs - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
11:29:43.466 INFO  GenotypeGVCFs - Deflater: IntelDeflater
11:29:43.466 INFO  GenotypeGVCFs - Inflater: IntelInflater
11:29:43.466 INFO  GenotypeGVCFs - GCS max retries/reopens: 20
11:29:43.466 INFO  GenotypeGVCFs - Requester pays: disabled
11:29:43.466 INFO  GenotypeGVCFs - Initializing engine
11:29:43.612 INFO  GenotypeGVCFs - Shutting down engine
[7 April 2026 at 11:29:43 BST] org.broadinstitute.hellbender.tools.walkers.GenotypeGVCFs done. Elapsed time: 0.01 minutes.
Runtime.totalMemory()=285212672

A USER ERROR has occurred: Couldn't read file file:///whole.genome/trim.galore/genomicsdb_workspace/callset.json. Error was: It doesn't exist.

***********************************************************************
snps gatk gwas wgs

1 answer

do you known if the uptsream GenomicsDBImport was successful ?

( hint : run your workflows with set -e -u -o pipefail )

Thank you so much. I was having an issue in my vcf files that's why this script doesn't work. I am having one more issue now.

Could you please let me know what would be best way to merge these VCF files and extract the SNPs and INDEL followed by hard filtering separately for SNPs and INDEL.

that's a new question

thanks Pierre, posted now new question. Thanks again for all help.

Log in to answer this question.