Question: Temporary Directory Problem in GATK4
1
gravatar for BAGeno
3 months ago by
BAGeno90
BAGeno90 wrote:

Hi,

I have recently shifted from GATK 3 to GATK4. It has changed very much. I figured most of the step but one thing is giving me problem is that how to set temporary directory option in GATK4. I have used this option export _JAVA_OPTIONS=-Djava.io.tmpdir=./tmp with this option --TMP_DIR ./tmp/. As mentioned in this link But it is giving me this error

A USER ERROR has occurred: 'export' is not a valid command.

Can any one please tell me how to resolve this error.

temporary java directory gatk4 • 242 views
ADD COMMENTlink modified 3 days ago by Mehulsharma.2530 • written 3 months ago by BAGeno90

Which shell are you using (echo $SHELL)? Setting ./tmp/ is vague since the program will always look for that directory from where you start it. You should provide full path to tmp when setting the --TMP_DIR.

ADD REPLYlink written 3 months ago by genomax59k

I am using /bin/bash. I have set whole path to tmp directory. And there was space in export_JAVA_OPTIONS=-Djava.io.tmpdir=./tmp which I removed but now it is giving me error

A USER ERROR has occurred: 'export_JAVA_OPTIONS=-Djava.io.tmpdir=./tmp' is not a valid command.
ADD REPLYlink modified 3 months ago • written 3 months ago by BAGeno90

That space before _JAVA is required. In any case @dario has a possible solution posted below. I would still suggest not using ./tmp.

ADD REPLYlink written 3 months ago by genomax59k
2
gravatar for dariober
3 months ago by
dariober9.7k
Glasgow - UK
dariober9.7k wrote:

You are probably executing gatk as:

gatk export _JAVA_OPTIONS=-Djava.io.tmpdir=./tmp

What you want, probably (and not tested), is:

export _JAVA_OPTIONS=-Djava.io.tmpdir=./tmp

gatk <command> <options>

Or just (what I would do):

gatk <command> <options> --TMP_DIR=./tmp
ADD COMMENTlink written 3 months ago by dariober9.7k
0
gravatar for Mehulsharma.253
3 days ago by
Mehulsharma.2530 wrote:

My problem was resolved using:

  ./gatk --java-options "-Djava.io.tmpdir=/custom file path" SortSam -I=samplealn.sam -O=sortedsamplealn.bam -SO=coordinate --TMP_DIR=/custom file path
ADD COMMENTlink written 3 days ago by Mehulsharma.2530
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1744 users visited in the last hour