Why does GATK thinks directory is BAM index file?
1
0
Entering edit mode
21 months ago
ben • 0

Hi, I'm writing a Galaxy wrapper for the GATK BaseRecalibrator tool and I'm running into this error where GATK thinks the directory of the BAM file is the index file for the BAM. I'm running gatk BuildBamIndex -I input.bam --OUTPUT input.bai before gatk BaseRecalibrator -I input.bam -R fasta.fa --known-sites known_sites.vcf.gz -O "$output1" but the terminal outputs the warning

WARNING: BAM index file /home/ubuntu/galaxy/database/jobs_directory/000/482/working is older than BAM /home/ubuntu/galaxy/database/jobs_directory/000/482/working/input.bam

What should I do?

GATK Galaxy • 1.0k views
ADD COMMENT
0
Entering edit mode

Odd. Can you just try gatk BuildBamIndex -I input.bam. That is all you need. The output file name will be automatically made.

Oh this is galaxy so I guess you are not actually running this on command line?

ADD REPLY
0
Entering edit mode

I'm running it on a local galaxy server, so I have access to the command line. I've tried using gatk BuildBamIndex and samtools index index on the input.bam, but gatk seems to think the file's directory is the index file. Is there a way to specify where the index file is for gatk?

ADD REPLY
0
Entering edit mode
21 months ago
ben • 0

Oh, I discovered the issue. I had included the --read-index command followed by a blank string which caused GATK to infer the working folder as the bam index file. Thanks for your help!

ADD COMMENT

Login before adding your answer.

Traffic: 4163 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6