We recently updated to the latest galaxy-dist, and learned that the 
sam_merge.xml tool now uses picard MergeSamFiles.jar to merge the files instead 
of the samtools merge wrapper sam_merge.py.

this is a problem for us because MergeSamFiles.jar does not honor $TMPDIR when 
creating temporary file names (the jvm developers inexplicably hard code the 
value of java.io.tmpdir to /tmp in Unix/Linux rather than doing the Right 
Thing) .  On our cluster, TMPDIR is set to something like 
/scratch/batch_job_id/.  This location has plenty of free space, however /tmp 
does not and now we can't successfully merge largeish bam files. 

In case anyone else is bit by this, I think there are two options

the Picard tools take an optional TMP_DIR= argument that lets us specify the 
location we want to use for a temporary directory.  Initially we ended up 
modifying the .xml to add TMP_DIR=\$TMPDIR to the arguments to 
MergeSamFiles.jar. This works, but we could potentially need to do this with 
multiple Picard tools and not just MergeSamFiles.   Now I am probably going to 
go with the following solution:

add something like "export _JAVA_OPTIONS=-Djava.io.tmpdir=$TMPDIR" to the 
.bashrc file for my Galaxy user.

Glen L. Beane
Senior Software Engineer
The Jackson Laboratory
(207) 288-6153

Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:


Reply via email to