Can anyone simplify GATK installation
3
0
Entering edit mode
3 months ago
Tundup • 0

I am new to bioinformatics. I am learning WGS variant calling. For that one of the tool I need is GATK. I tried GATK installation using commands on Ubuntu system. But I failed and solutions I received are too complex to understand. Can some please easily explain the process with commands.

Will be thank ful!

GATK • 1.8k views
ADD COMMENT
2
Entering edit mode

and how is your question different from your previous question ? GATK version check failed ; People already answered like "set the PATH"

ADD REPLY
0
Entering edit mode

Step 01: Opened Ubuntu Terminal (my home directory is home\nanam\ as indicated by pwd)

Step 02: Downloaded latest gatk release using - wget https://github.com/broadinstitute/gatk/releases/download/4.5.0.0/gatk-4.5.0.0.zip

(I have java installed already)

Step 03: Unzipped the above file using - unzip gatk-4.5.0.0.zip (I have already installed unzip using - sudo apt install unzip)

I extracted here: /home/nanam (home directory as stated above)

Step 04. Now to setup environment variables - echo 'export PATH=$PATH:/home/nanam' >> ~/.bashrc

Actual path where I extracted

Step 05: Refreshed using - source ~/.bashrc

Step 06. Checked installation using gatk --help or gatk --version

ERROR: Command 'gatk' not found, did you mean: command 'gate' from snap gate (9.3) command 'gitk' from deb gitk (1:2.34.1-1ubuntu1.10) command 'gawk' from deb gawk (1:5.1.0-1ubuntu0.1) See 'snap info <snapname>' for additional versions.

What went wrong?

ADD REPLY
2
Entering edit mode

Google and learn how to set the PATH. Setting the PATH blindly to where you think it should be set doesn't make sense, it needs to be set to where the executable is.

ADD REPLY
0
Entering edit mode

I learned and set the PATH with nano editor. But didn't worked.

ADD REPLY
0
Entering edit mode

. I tried GATK installation using commands on Ubuntu system.

show us the commands

show us the errors

ADD REPLY
2
Entering edit mode
3 months ago
$ export PATH="/path/to/the/gatk/DIRECTORY/containing/the/gatk/executable:${PATH}"
$ which gatk
ADD COMMENT
0
Entering edit mode

That didn't work also. I opened nano and added.

ADD REPLY
1
Entering edit mode

for a first try, you don't need nano, you don't need VI, you don't need to alter your bashrc, you don't need to change your bash profile, your don't need t be root, you don't need to alter your native PATH, you don't need to do anything complicated.

Just download the zip, unzip, export the new PATH, everything on the command line, in the very same shell.

And if it doesn't work, again, show us the command lines and the messages on stderr and stdout.

ADD REPLY
0
Entering edit mode

This is what I did:

nanam@DESKTOP-Q0ETUC4:/home$ pwd
/home

nanam@DESKTOP-Q0ETUC4:/home$ ls
nanam

nanam@DESKTOP-Q0ETUC4:/home$ cd \nanam

nanam@DESKTOP-Q0ETUC4:~$ ls

gatk-4.5.0.0  gatk-4.5.0.0.zip

nanam@DESKTOP-Q0ETUC4:~$ pwd

/home/nanam

nanam@DESKTOP-Q0ETUC4:~$ export PATH="/home/nanam/gatk-4.5.0.0:${PATH}"

nanam@DESKTOP-Q0ETUC4:~$ source ~/.bashrc

nanam@DESKTOP-Q0ETUC4:~$ gatk --version

/usr/bin/env: ‘python’: No such file or directory

nanam@DESKTOP-Q0ETUC4:~$ python3 --version

Python 3.10.12

(python is already installed)

ADD REPLY
0
Entering edit mode

Are you using Ubuntu on windows via WSL2?

ADD REPLY
0
Entering edit mode

Yes, I am using. Earlier, I was trying to setup dual boot. But failed to fully installed.

ADD REPLY
0
Entering edit mode

skip the python wrapper. Try

$  java -jar "/home/nanam/gatk-4.5.0.0/gatk-package-4.5.0.0-local.jar"
ADD REPLY
0
Entering edit mode

Or also try editing gatk wrapper to say

#!/usr/bin/env python3

at top.

You probably now have

#!/usr/bin/env python
ADD REPLY
0
Entering edit mode

Thanks Pierre and GenoMax for the help. I followed the steps of GATK documentation again carefully and now GATK is fully set up.

I think I have successfully set up.

gatk --version

Using GATK jar /home/nanam/gatk-4.5.0.0/gatk-package-4.5.0.0-local.jar
Running:
    java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -jar /home/nanam/gatk-4.5.0.0/gatk-package-4.5.0.0-local.jar --version
The Genome Analysis Toolkit (GATK) v4.5.0.0
HTSJDK Version: 4.1.0
Picard Version: 3.1.1

Any further suggestion to get started with GATK would be very thankful.

ADD REPLY
1
Entering edit mode
3 months ago
Michael 54k

Can anyone simplify GATK installation

The answer to that is "Yes, BioConda has already done it." as I have recommended earlier.

See: https://anaconda.org/bioconda/gatk4

conda install bioconda::gatk4

You need to have set up conda or micromamba before that.

The learning curve is quite steep at the beginning when starting with Linux, however, try to keep training with some introductory courses and it is going to become much easier after after a few days or weeks. If you follow the related chapters in the Biostars handbook, setting up your system will be a piece of cake.

Also, "installation" of a Java program doesn't get much easier than this:

From GATK's manual (with my highlighting):

Install it There is no installation necessary in the traditional sense, since the precompiled jar files should work on any POSIX platform that satisfies the requirements listed above. You'll simply need to open the downloaded package and place the folder containing the jar files and launch script in a convenient directory on your hard drive (or server filesystem).

Although the jars themselves cannot simply be added to your PATH, you can do so with the gatk wrapper script. Please look up instructions depending on the terminal shell you use; in bash the typical syntax is export PATH="/path/to/gatk-package/:$PATH" where /path/to/gatk-package/ is the path to the location of the gatk executable. Note that the jars must remain in the same directory as gatk for it to work. Be sure to include the final / in your path.

You can also create an alias to executable within your .bash_profile file, so that simply typing in gatk will run the file path: alias gatk='/path/to/gatk-package/gatk'.

ADD COMMENT
0
Entering edit mode

Now, I will setup conda. Conda or miniconda or anaconda - which will be suitable.

Please suggest what specific topic of introductory course would be helpful.

ADD REPLY
1
Entering edit mode

Try micromamba instead. Regarding courses, you should take a Linux/Unix basics course first, invest in the Biostars handbook and follow the "setting up your PC" section, then work yourself through the basics.

ADD REPLY
0
Entering edit mode
3 months ago
Mensur Dlakic ★ 27k

The $PATH variable should point to the directory where the unzipped gatk resides, not where you unpacked the archive. Most likely:

echo 'export PATH=$PATH:/home/nanam/gatk-4.5.0.0' >> ~/.bashrc
ADD COMMENT
0
Entering edit mode

I did that too but didn't work also.

ADD REPLY
1
Entering edit mode

There is no way that wouldn't work if /home/nanam/gatk-4.5.0.0 is a correct path for the gatk binary. The thing is that one has to restart the shell for this to take the effect, or type on the command line:

export PATH=$PATH:/home/nanam/gatk-4.5.0.0
ADD REPLY
0
Entering edit mode

It worked now! Thanks for the help. Earlier, I think there was some problem with pointing $PATH variable (I did close and restarted the terminal also).

ADD REPLY

Login before adding your answer.

Traffic: 1881 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