Picard MarkDuplicates.jar error
3
0
Entering edit mode
7.4 years ago
mark.rose ▴ 50

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

picard error duplicates • 3.4k views
ADD COMMENT
1
Entering edit mode
7.4 years ago
Dan D 7.4k

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.

ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Yes, that was it. Thanks

ADD REPLY
0
Entering edit mode
7.4 years ago

Did you run 'java -jar', with correct version of Java?

ADD COMMENT
0
Entering edit mode
7.4 years ago
d-cameron ★ 2.9k

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.

ADD COMMENT

Login before adding your answer.

Traffic: 2566 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6