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.
• 1,880 views
•
link
0 answers
No answers yet.
Log in to answer this question.
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
gatkcommand)? When I callgatkwithinnextflowI don't add quotes in-Xmx${java_memory}m. Regarding thetmppath, maybe it is safer to provide a full path, without callingpwdand such.for a start You put two values for --java-options . Use
${PWD}instead of a call topwd. Furthermore, why using the slow gatk when you can usesamtools sort?Thank you all,
--TMP_DIR .solved the issue