Building Dict File for GATK
4
2
Entering edit mode
4.9 years ago
dec986 ▴ 380

I'm going through the instructions page on https://gatkforums.broadinstitute.org/gatk/discussion/1601/how-can-i-prepare-a-fasta-file-to-use-as-reference

Specifically, the command I don't see how to do is:

java -jar CreateSequenceDictionary.jar R= Homo_sapiens_assembly18.fasta O= Homo_sapiens_assembly18.dict
[Fri Jun 19 14:09:11 EDT 2009] net.sf.picard.sam.CreateSequenceDictionary R= Homo_sapiens_assembly18.fasta O= Homo_sapiens_assembly18.dict
[Fri Jun 19 14:09:58 EDT 2009] net.sf.picard.sam.CreateSequenceDictionary done.
Runtime.totalMemory()=2112487424
44.922u 2.308s 0:47.09 100.2%   0+0k 0+0io 2pf+0w

I think that CreateSequenceDictionary.jar comes from Picard, so I downloaded that from https://broadinstitute.github.io/picard/, but I don't see CreateSequenceDictionary.jar anywhere in the directory. However, I do see

CreateSequenceDictionary.java

I assume that .jar files are analogous to C executables, and .java files are analogous to .c human-readable code.

Going through the Picard readme file, I see that I should execute ./gradlew shadowJar but this build fails on two different computers that I'm on.

So I can't make/get CreateSequenceDictionary.jar

I'm at a loss, how do I generate this dict file?

java gatk • 15k views
ADD COMMENT
3
Entering edit mode
4.9 years ago
ATpoint 85k

Picard is a wrapper command that will run the subcommands. There is no single executable for each subcommand. Simply run picard.jar and then check the output printed to screen for the subcommand you want. Then run java -jar picard.jar <subcommand>

ADD COMMENT
0
Entering edit mode

this was a comedy of errors on my part, I seemed to have clicked every wrong button and done everything wrong on the way. Thanks for your help ATpoint!

ADD REPLY
0
Entering edit mode

You're very welcome, and don't worry. In general, whenever I want to learn sth. about a tool simply running the main application without any arguments often helps since most tools then print some kind of help message that can get you started :)

ADD REPLY
4
Entering edit mode
4.9 years ago
Karma ▴ 310

Change your command to the following:

java -jar picard.jar CreateSequenceDictionary R=Homo_sapiens_assembly18.fasta O=Homo_sapiens_assembly18.dict
ADD COMMENT
1
Entering edit mode
4.9 years ago
MatthewP ★ 1.4k

Run GATK command gatk command if gatk is installed, you can run gatk CreateSequenceDictionary in your case. Or java -jar gatk.jar command like java -jar gatk-package-4.1.4.1-local.jar CreateSequenceDictionary. You don't have to always follow the gatk example command, picard is inside gatk.

ADD COMMENT
0
Entering edit mode
2.7 years ago
Cong-Phuoc • 0

I run it 'java -jar picard.jar CreateSequenceDictionary R=GCF_000001405.25_GRCh37.p13_genomic.fna.gz O=reference.dict' in my gatk conda. The output is 'Unable to access jarfile.picard.jar'

How to fix it?

Thanks

ADD COMMENT
3
Entering edit mode

Make sure that you have installed GATK in your system.

Then follow the commands: For example, to generate .dict for Homo_sapiens_assembly38.fasta file run

GATK CreateSequenceDictionary \
    -R Homo_sapiens_assembly38.fasta\
    -O Homo_sapiens_assembly38.dict
ADD REPLY
0
Entering edit mode

run it with gatk CreateSequenceDictionary

ADD REPLY

Login before adding your answer.

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