Question: Running Picard as an Executable Program
0
gravatar for oars
2.1 years ago by
oars160
oars160 wrote:

OK, I've got the picard.jar file in my directory but I cannot get the chmod +x Picard to work? My goal is to run Picard as though it is an executable program. Here are my series of commands, I'll ** where I start having issues:

$ mkdir picard
$ cd picard
$ wget https://github.com/broadinstitute/picard/releases/download/2.8.1/picard.jar
$ java –jar /software/picard/picard.jar
#!/bin/bash
java -jar /software/picard/picard.jar $*
**$ chmod +x Picard

Hear is the error message;

$chmod +x Picard
chmod: cannot access 'Picard': No such file or directory

my next step would have been:

$sudo ln -s /software/picard/Picard /usr/local/bin

Again thinking I could run Picard as though it were an executable program:

$Picard

Is there a better way to simply make Picard an executable?

picard • 1.1k views
ADD COMMENTlink modified 2.1 years ago by h.mon29k • written 2.1 years ago by oars160
3
gravatar for h.mon
2.1 years ago by
h.mon29k
Brazil
h.mon29k wrote:

Picard is a java program, you need to run it with the java virtual machine.

java -jar /software/picard/picard.jar [options]

is how most people run Picard. You may want to create a wrapper script:

sudo echo 'java -jar /software/picard/picard.jar $@' /usr/local/bin/picard
sudo chmod +x /usr/local/bin/picard

Then you can just call picard [options].

ADD COMMENTlink modified 2.1 years ago • written 2.1 years ago by h.mon29k

Many thanks! This worked like a charm.

ADD REPLYlink written 2.1 years ago by oars160
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: 1902 users visited in the last hour