This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Unable to build applet in DNAnexus, .jar file not found

Hi I saved my .jar file in resources/usr/bin however I get this error:

Error: Unable to access jarfile SnpSift.jar  

I don't get this error with other types of binary files.

I want to run something like this:

cat input_file | java -jar SnpSift.jar filter "((ANN[*].IMPACT = 'HIGH') | (ANN[*].IMPACT = 'MODERATE'))" > output_file

Is there something that I'm doing wrong?

dnanexus applet

Please contact DNANexus support. That may be your best bet since this is commercial software and not many here will have access.

Ah I missed the part where DNANexus makes this problem out of our reach. Thank you, GenoMax!

2 answers

The resources bundle is unpacking SnpSift.jar into /usr/bin; but it is a jar file that is executed via java.

You can either java -jar /usr/bin/SnpSift.jar which looks weird; or, alternatively, save SnpSift.jar into resources/home/dnanexus/SnpSift.jar and your command line will work, as the .jar file will be unpacked into the execution home directory.

That's not how $PATH works. Place your jar file in any accessible location, then add a script to your /usr/local/bin like so:

#!/bin/sh 
java -jar /path/to/SnpSift.jar "$*"

Name this script 'snpsift`. Then you'll be able to do this:

cat input_file | snpsift filter "((ANN[*].IMPACT = 'HIGH') | (ANN[*].IMPACT = 'MODERATE'))" > output_file

Log in to answer this question.