Question: Running Picard as an Executable Program
0
gravatar for oars
21 months 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 • 884 views
ADD COMMENTlink modified 21 months ago by h.mon28k • written 21 months ago by oars160
3
gravatar for h.mon
21 months ago by
h.mon28k
Brazil
h.mon28k 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 21 months ago • written 21 months ago by h.mon28k

Many thanks! This worked like a charm.

ADD REPLYlink written 21 months 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: 793 users visited in the last hour