Running Picard as an Executable Program
1
0
Entering edit mode
6.7 years ago
oars ▴ 200

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 • 3.0k views
ADD COMMENT
3
Entering edit mode
6.7 years ago
h.mon 35k

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 COMMENT
0
Entering edit mode

Many thanks! This worked like a charm.

ADD REPLY

Login before adding your answer.

Traffic: 804 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