This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Using GATK in conda

I'm new to this, but I've successfully dabbled with alignment and variant calling. I installed conda as per the biostar handbook. It didn't have GATK, so I installed this myself with the following:

conda install -c bioconda gatk 

I can see it's installed when I check the programs using:

conda list

However, when I go to run GATK, I get this:

$ gatk Mutect2 -R $REF -I "$BAM" -O "$DIR"/gatk/$PREFIX"_bwa_gatk_unfiltered.vcf"
-bash: gatk: command not found
(bioinfo)

I've read a few posts from people who get this error, as below, but can't get it working! https://gatk.broadinstitute.org/hc/en-us/community/posts/360064694932-Command-Gatk-not-found- https://gatk.broadinstitute.org/hc/en-us/articles/360035889851--How-to-Install-and-use-Conda-for-GATK4 https://gatk.broadinstitute.org/hc/en-us/community/posts/360064694932-Command-Gatk-not-found-

gatk conda

1 answer

That installs GATK 3, and can be run with gatk3 Mutect2 .... If you want GATK 4 you need to install it with conda create -n gatk4 -c conda-forge -c bioconda gatk4.

thanks, it works

Log in to answer this question.