This is a test version of Biostars. For the public version, visit https://www.biostars.org.
SamSort gatk invalid argument / no space left on disk

I have a nextflow pipeline which runs the following argument in script for a process using memory '16 GB':

gatk --java-options "-Xmx16g -Xms16g" SortSam -R $ref -I ${pair_id}.clean.bam -O ${pair_id}.sorted.bam -SO coordinate --CREATE_INDEX true

At first the issue was java.io.IOException: No space left on device So I referred to the following posts

And added the -Djava.io.tmpdir=`pwd`/tmp but now I am still having issues. I get error ERROR: Invalid argument '-R'.

gatk --java-options "-Xmx16g -Xms16g -Djava.io.tmpdir=`pwd`/tmp" SortSam -R $ref -I ${pair_id}.clean.bam -O ${pair_id}.sorted.bam -SO coordinate --CREATE_INDEX true TMP_DIR=`pwd`/tmp

I tried with various combinations

gatk --java-options "-Djava.io.tmpdir=`pwd`/tmp"  "-Xmx16g -Xms16g" SortSam -R $ref -I ${pair_id}.clean.bam -O ${pair_id}.sorted.bam -SO coordinate --CREATE_INDEX true TMP_DIR=`pwd`/tmp

Sometimes it does not recognize the "-Djava.io.tmpdir=.." parameter, sometimes it does not recognize the "-Xmx16g -Xms16g" parameter, and sometimes it does not recognize -R after SamSort.

picard gatk samsort nextflow

Hi! What kind of error do you get? Could you copy paste it? Also, could you copy paste the actual nextflow code (not just the gatk command)? When I call gatk within nextflow I don't add quotes in -Xmx${java_memory}m. Regarding the tmp path, maybe it is safer to provide a full path, without calling pwd and such.

for a start You put two values for --java-options . Use ${PWD} instead of a call to pwd. Furthermore, why using the slow gatk when you can use samtools sort ?

Thank you all, --TMP_DIR . solved the issue

0 answers

No answers yet.

Log in to answer this question.