This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Gatk - Couldn'T Read File Bundle/1.5/Hg19/Ucsc.Hg19.Fasta Because Null

GATK gives an obscure error message when invoked as

 $ java -Xmx4g -jar GenomeAnalysisTK.jar RealignerTargetCreator \
  -I picard-MarkDuplicates-JOB02_014.bam \
  -R references/ftp.broadinstitute.org/bundle/1.5/hg19/ucsc.hg19.fasta \
  -o test.intervals \
  --known known.vcf

it responds with

##### ERROR -----------------------------------------------------------------------------------
##### ERROR A USER ERROR has occurred (version 1.6-7-g2be5704): 
##### ERROR The invalid arguments or inputs must be corrected before the GATK can proceed
##### ERROR Please do not post this error to the GATK forum
##### ERROR
##### ERROR See the documentation (rerun with -h) for this tool to view allowable command-line arguments.
##### ERROR Visit our wiki for extensive documentation http://www.broadinstitute.org/gsa/wiki
##### ERROR Visit our forum to view answers to commonly asked questions http://getsatisfaction.com/gsa
##### ERROR
##### ERROR MESSAGE: Couldn't read file ftp.broadinstitute.org/bundle/1.5/hg19/ucsc.hg19.fasta because null
##### ERROR -----------------------------------------------------------------------------------

The ERROR

   Couldn't read file ftp.broadinstitute.org/bundle/1.5/hg19/ucsc.hg19.fasta because null

is misleading because the file indeed exists when checked with "ls" or perl -e 'print qq{File Exists} if -e $file'. I also used the recommended GATK reference files from the GATK bundle. To check whether the file is really accessed, and where it failed I used linux strace:

 $ strace -f -etrace=open,stat,lstat java -Xmx4g -jar GenomeAnalysisTK.jar RealignerTargetCreator ...

and can see that the file is not acccessed at all, but before the ERROR is shown it accesses the corresponding .fai file:

   open("<edited>/bundle/1.5/hg19/ucsc.hg19.fasta.fai", O_RDONLY) = 85
   stat("<edited>/bundle/1.5/hg19/ucsc.hg19.fasta.fai", {st_mode=S_IFREG|0666, st_size=3534, ...}) = 0
   stat("<edited>/bundle/1.5/hg19/ucsc.hg19.fasta.fai", {st_mode=S_IFREG|0666, st_size=3534, ...}) = 0
   stat("<edited>/bundle/1.5/hg19/ucsc.hg19.fasta.fai", {st_mode=S_IFREG|0666, st_size=3534, ...}) = 0
   open("<edited>/bundle/1.5/hg19/ucsc.hg19.fasta.fai", O_RDONLY) = 86
   ##### ERROR -----------------------------------------------------------------------------------
   ##### ERROR A USER ERROR has occurred (version 1.6-7-g2be5704): 
    ... see above ...

Any idea ?

gatk

You could try giving the full path of

-R references/ftp.broadinstitute.org/bundle/1.5/hg19/ucsc.hg19.fasta

If that doesn't work. then you could edit the folder names, e.g. remove the dots..

Also, why the <edited> in:

<edited>/bundle/1.5/hg19/ucsc.hg19.fasta.fai

?

1 answer

Have you indexed the genome? If not, you have to.

I used samtools index to create the .bam.bai and the refrence from the GATK bundle comes with a fasta.fai. Anything else may be missing ?

Log in to answer this question.