This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error with Gatk Haplotypecaller

Hello everyone, I am using Gatk Haplotypecaller to create single sample GVCF files. But gatk is not recognizing my Bam files and is giving an error.

The error:

A USER ERROR has occurred: Couldn't read file. Error was: ubuntu/path/to/bam/dedup.bam with exception: Cannot read non-existent file: file:///ubuntu/path/to/bam/dedup.bam

The command I used:

gatk --java-options "-Xmx4g" HaplotypeCaller -R ./Reference/reference.fa  -I ~/ubuntu/path/to/bam/dedup.bam -O file.g.vcf.gz -ERC GVCF

My bam files are sorted and duplicate marked using samtools and picard respectively. Does gatk have any specific conditions to recognize a bam file ?

Please help me to the rectify this error.

Thanks in advance.

gatk haplotypecaller bam

1 answer

I'm suprised your path ~/ubuntu/path/to/bam/dedup.bam is transtyped to ubuntu/path/to/bam/dedup.bam. It should be an absolute path.

Anyway, check your path, check ~/ubuntu/path/to/bam/dedup.bam is a correct path. Show us the output of file ~/ubuntu/path/to/bam/dedup.bam. If you're using a cluster check the cluster has the right to read the files under ~/ubuntu/path/to/bam/, check your file is readeable.

Log in to answer this question.