Question: picard error version 1.139 on ubuntu 14.04
0
gravatar for cmccabe
3.5 years ago by
cmccabe180
Chicago
cmccabe180 wrote:

I seem to have trouble with calling picard from the command line but other tools work perfectly.

path:

/home/cmccabe/Desktop/NGS/bedops-2.14.4/bin:/home/cmccabe/Desktop/NGS/samtools-1.2:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/cmccabe/Desktop/NGS/bedtools2-25.0/bin:/home/cmccabe/Desktop/NGS/bbmap-35.59:/home/cmccabe/Desktop/NGS/FastQC-0.11.4:/home/cmccabe/Desktop/NGS/picard-tools-1.139

The code below throws an error as the picard.jar can not be found:

cmccabe@DTV-A5211QLM:~/Desktop/NGS$ java -jar picard.jar SortSam \
> INPUT=/home/cmccabe/IDP/mapped_unmatched_adapter_removed_quality_trimmed_NA12878-NextSeq-S1_R1_and_R2.sam \
> OUTPUT=/home/cmccabe/Desktop/NGS/picard-tools-1.139/sorted_mapped_unmatched_adapter_removed_quality_trimmed_NA12878-NextSeq-S1_R1_and_R2.bam \
> SORT_ORDER=coordinate
Error: Unable to access jarfile picard.jar

However, that same command in a slightly different (path to jar file added) way works perfectly:

cmccabe@DTV-A5211QLM:~/Desktop/NGS$ java -jar /home/cmccabe/Desktop/NGS/picard-tools-1.139/picard.jar SortSam INPUT=/home/cmccabe/IDP/mapped_unmatched_adapter_removed_quality_trimmed_NA12878-NextSeq-S1_R1_and_R2.sam OUTPUT=/home/cmccabe/Desktop/NGS/picard-tools-1.139/sorted_mapped_unmatched_adapter_removed_quality_trimmed_NA12878-NextSeq-S1_R1_and_R2.bam SORT_ORDER=coordinate

I guess it's just more out of curiosity why only picard seems to act this way on ubuntu 14.04. Thank you .

I add everything to path using as this seems to permanently add the path to the scripts:

echo export
PATH=$PATH:"/home/dnascopev/Desktop/picard-tools-1.139" >>
~/.bashrc
picard • 2.0k views
ADD COMMENTlink modified 3.5 years ago by h.mon24k • written 3.5 years ago by cmccabe180
1
gravatar for h.mon
3.5 years ago by
h.mon24k
Brazil
h.mon24k wrote:

You have to set CLASSPATH, see here.

ADD COMMENTlink written 3.5 years ago by h.mon24k

So something like:

echo export CLASSPATH="/home/dnascopev/Desktop/picard-tools-1.139/picard.jar" >> ~/.bashrc

Thank you :)

Looks like is I do:

echo ${CLASSPATH} it is blank until I:

export
CLASSPATH=/home/cmccabe/Desktop/NGS/picard-tools-1.139 then when I do echo ${CLASSPATH} the correct path displays.  When I close and re-open terminal the change does not save, so maybe I need to add classpath to bashrc?  Thanks.
ADD REPLYlink modified 3.5 years ago • written 3.5 years ago by cmccabe180
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1508 users visited in the last hour