I will try this but what is surprising if this works is that I have run the command I specified successfully in the past. I only encountered this problem when switching to a new server.
Hi All
Anybody know why am getting this error. I get it with version 1.92 and 1.77.
$ /usr/local/thirdparty/picard/picard-tools-1.92/MarkDuplicates.jar I=mut1-1478822061-bowtie2.bam.sort.bam O=mut1-1478822061-bowtie2.bam.sort.rmdup.bam M=marked_dup_metrics.txt REMOVE_DUPLICATES=true
/usr/local/thirdparty/picard/picard-tools-1.92/MarkDuplicates.jar: line 1: PK: command not found
/usr/local/thirdparty/picard/picard-tools-1.92/MarkDuplicates.jar: line 2: ÁP´B: command not found
/usr/local/thirdparty/picard/picard-tools-1.92/MarkDuplicates.jar: line 3:ÀP´B©: command not found
/usr/local/thirdparty/picard/picard-tools-1.92/MarkDuplicates.jar: line 4: syntax error near unexpected token `)'
/usr/local/thirdparty/picard/picard-tools-1.92/MarkDuplicates.jar: line 4: `SªMETA-INF/MANIFEST.MFe½
wÞÑ1Ú¦lj·ÆýV¯)©"ëз/£±ãùÉwNÎÎI¢ÝZåÕîàÔÆ7ä¥ð¦4gm@ dó5¢ÈUYÉW®eYiÕÞ/(:7ª
gÝÄI>--hDáóØýbÇõ`
I also get it with just
$ /usr/local/thirdparty/picard/picard-tools-1.92/MarkDuplicates.jar
/usr/local/thirdparty/picard/picard-tools-1.92/MarkDuplicates.jar: line 1: PK: command not found
/usr/local/thirdparty/picard/picard-tools-1.92/MarkDuplicates.jar: line 2: ÁP´B: command not found
/usr/local/thirdparty/picard/picard-tools-1.92/MarkDuplicates.jar: line 3:ÀP´B©: command not found
/usr/local/thirdparty/picard/picard-tools-1.92/MarkDuplicates.jar: line 4: syntax error near unexpected token `)'
/usr/local/thirdparty/picard/picard-tools-1.92/MarkDuplicates.jar: line 4: `SªMETA-INF/MANIFEST.MFe½
wÞÑ1Ú¦lj·ÆýV¯)©"ëз/£±ãùÉwNÎÎI¢ÝZåÕîàÔÆ7ä¥ð¦4gm@ dó5¢ÈUYÉW®eYiÕÞ/(:7ª
gÝÄI>--hDáóØýbÇõ`
Thanks for your help
3 answers
It appears that you're trying to execute the jar file directly. That's why it's failing. Instead you should preface your command with this:
java -Xmx2g -jar
Before attempting this, try simply typing java and pressing enter to verify that Java is installed. If it's not, use the package manager for your distro to install java. For example yum install java on CentOS/Redhat or apt-get install java on Ubuntu
-Xmx2g is simply indicating the amount of memory to allocate to the Java virtual machine which will run the program. My example provides 2 gigabytes but you can experiment with other values.
Here's the full command for your specific example:
java -Xmx2g -jar /usr/local/thirdparty/picard/picard-tools-1.92/MarkDuplicates.jar I=mut1-1478822061-bowtie2.bam.sort.bam O=mut1-1478822061-bowtie2.bam.sort.rmdup.bam M=marked_dup_metrics.txt REMOVE_DUPLICATES=true
As @d-cameron mentioned, you're using an old version of Picard tools. But the specific tool you're using in this case is very mature and should provide perfectly acceptable results.
Yes, that was it. Thanks
Did you run 'java -jar', with correct version of Java?
Picard tools version 1.77 was released on Jul 3, 2012, and 1.92 was released on May 20, 2013. There have been 66 releases of picard tools since 1.92 with the most recent version of picard tools being version 2.7.1. I strongly encourage you to update to a more recent version, especially since the release packaging format has changed since the versions you are using.
Log in to answer this question.