sam2tsv add in my path
1
0
Entering edit mode
5 weeks ago
harry ▴ 40

please can anyone tell me how to add sam2tsv in my path. I try the following command: export PATH="$PATH:/home/aclab/apps/jvarkit/dist/sam2tsv.jar" I also try this:

sudo mv /path/to/sam2tsv.jar /usr/local/bin/
sudo ln -s /usr/local/bin/sam2tsv.jar /usr/local/bin/sam2tsv
sudo nano /usr/local/bin/sam2tsv
#!/bin/bash
java -jar /usr/local/bin/sam2tsv.jar "$@"
sudo chmod +x /usr/local/bin/sam2tsv
sam2tsv --help

But none of them help can please solve this issue. thanks in advance

sam2tsv • 325 views
ADD COMMENT
0
Entering edit mode
ADD REPLY
1
Entering edit mode
5 weeks ago

1) This is a JAR file, not an executable. So the first solution is useless.

2) In the second solution the sudo chmod +x is useless. Just run this sudo chmod +x /usr/local/bin/sam2ts once for this bash script which should only be:

#!/bin/bash
java -jar /path/to/sam2tsv.jar $@

3) unless you're working with a very old version of jvarkit , there is no such "sam2tsv.jar". The command should be:

java -jar /path/to/jvarkit.jar sam2tsv ...
`
ADD COMMENT
0
Entering edit mode

Hi so I download the latest version of java and jvarkit. but still i don't know how to move sam2tsv in my path. So I have not every time written whole command like other tools. Thanks in advance for solving the issue.

ADD REPLY
1
Entering edit mode

again, you don't need that shell script 'sam2tsv'. just run java -jar /path/to/jvarkit.jar sam2tsv ...

ADD REPLY
1
Entering edit mode

and acknowledge all your previous questions above.

ADD REPLY

Login before adding your answer.

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