Question: picard error version 1.139 on ubuntu 14.04
gravatar for bioguy24
5.1 years ago by
bioguy24190 wrote:

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



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" >>
picard • 2.5k views
ADD COMMENTlink modified 5.1 years ago by h.mon31k • written 5.1 years ago by bioguy24190
gravatar for h.mon
5.1 years ago by
h.mon31k wrote:

You have to set CLASSPATH, see here.

ADD COMMENTlink written 5.1 years ago by h.mon31k

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:

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 5.1 years ago • written 5.1 years ago by bioguy24190
Please log in to add an answer.


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