gatk4 python package
Entering edit mode
10 weeks ago
Mehmet ▴ 720

Dear all,

I not sure whether this issue fits here, but I was not able to sign up to gatk forum to ask my issue, which is why I am posting here.

I installed the latest version of gatk as follows;

  1. download the latest version of gatk (
  2. followed this ( (conda env create -n gatk4 -f gatkcondaenv.yml)

installation was completed as below;

Pip subprocess output:
Processing ./
Building wheels for collected packages: gatkpythonpackages
  Building wheel for gatkpythonpackages ( started
  Building wheel for gatkpythonpackages ( finished with status 'done'
  Created wheel for gatkpythonpackages: filename=gatkpythonpackages-0.1-py3-none-any.whl size=117482 sha256=5e0f0b2eb6027268eb5814acd8c8b57d265b7aeb371702c736dd4723aa1beee4
  Stored in directory: /tmp/pip-ephem-wheel-cache-gyc4oo9g/wheels/86/46/5d/d5d2d327a9cdc718f906fa1d0cd6e18392bd4eea267f327437
Successfully built gatkpythonpackages
Installing collected packages: gatkpythonpackages
Successfully installed gatkpythonpackages-0.1


when I started to run this command;

gatk  CNNScoreVariants -V 21002.HaplotypeCaller.output.g.vcf.gz  -R hg19.fa -O annotated.vcf

it gives an error as below;

java.lang.RuntimeException: A required Python package ("gatktool") could not be imported into the Python environment. This tool requires that the GATK Python environment is properly established and activated. Please refer to GATK file for instructions on setting up the GATK Python environment.
        at org.broadinstitute.hellbender.utils.python.PythonScriptExecutor.checkPythonEnvironmentForPackage(
        at org.broadinstitute.hellbender.utils.python.StreamingPythonScriptExecutor.start(
        at org.broadinstitute.hellbender.engine.GATKTool.doWork(
        at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(
        at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(
        at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(
        at org.broadinstitute.hellbender.Main.runCommandLineProgram(
        at org.broadinstitute.hellbender.Main.mainEntry(
        at org.broadinstitute.hellbender.Main.main(
Caused by: org.broadinstitute.hellbender.utils.python.PythonScriptExecutorException: 
python exited with 1
Command Line: python -c import gatktool

Stderr: Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'gatktool'

        at org.broadinstitute.hellbender.utils.python.PythonExecutorBase.getScriptException(
        at org.broadinstitute.hellbender.utils.runtime.ScriptExecutor.executeCuratedArgs(
        at org.broadinstitute.hellbender.utils.python.PythonScriptExecutor.executeArgs(
        at org.broadinstitute.hellbender.utils.python.PythonScriptExecutor.executeCommand(
        at org.broadinstitute.hellbender.utils.python.PythonScriptExecutor.checkPythonEnvironmentForPackage(

when I checked gatktool python package, it is installed in the python packages by conda.

after activate gatk4 , I checked with pip install gatktool, and it says the package already installed.

Anyone experienced this error?

EDIT: I figured out the problem.

When I submit the command to HPC, even though I type conda activate gatk4 in my command and then submit to the HPC, it still gives the same error. Instead of that, I specified memory requirements during qlogin to the HPC, then type **conda activate gatk4** , the command runs successfully.

conda package python gatk4 • 288 views
Entering edit mode

did you run conda activate gatk4 ?

Entering edit mode

Yes, I did. But nothing changed. Other steps up to CNNScoreVariants step for variant calling were run successfully.


Login before adding your answer.

Traffic: 1789 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6