seppinho / haplogrep-cmd

HaploGrep - mtDNA haplogroup classification. Supporting rCRS and RSRS.
https://haplogrep.i-med.ac.at/
MIT License
74 stars 23 forks source link

FASTA failure - missing file #16

Closed sushilashenoy closed 6 years ago

sushilashenoy commented 6 years ago

Whenever I try to run the command line utility with FASTA input I get this output:

Welcome to HaploGrep v2.1.15 (c) Division of Genetic Epidemiology, Medical University of Innsbruck Hansi Weissensteiner, Lukas Forer, Dominic Pacher and Sebastian Schoenherr

phylotree/phylotree17.xml Parameters: Input Format: fasta Phylotree Version: 17 Reference: rCRS Extended Report: true Used Metric: kulczynski Chip array data: false Lineage: false

Start Classification... java.io.FileNotFoundException: /var/folders/6k/71m142b164dg2y84t7t40mcr0000gn/T/jbwa-0.7.17/rCRS.fasta (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.(FileInputStream.java:138) at java.io.FileInputStream.(FileInputStream.java:93) at java.io.FileReader.(FileReader.java:58) at importer.FastaImporter.readInReference(FastaImporter.java:224) at importer.FastaImporter.load(FastaImporter.java:47) at genepi.haplogrep.main.Haplogrep.run(Haplogrep.java:148) at genepi.base.Tool.start(Tool.java:193) at genepi.haplogrep.main.Haplogrep.main(Haplogrep.java:190) java.lang.NullPointerException at importer.FastaImporter.readInReference(FastaImporter.java:245) at importer.FastaImporter.load(FastaImporter.java:47) at genepi.haplogrep.main.Haplogrep.run(Haplogrep.java:148) at genepi.base.Tool.start(Tool.java:193) at genepi.haplogrep.main.Haplogrep.main(Haplogrep.java:190)

seppinho commented 6 years ago

Hi, We're extracting the rCRS archive to a tmp folder. Can you please check if the folder/file exist? /var/folders/6k/71m142b164dg2y84t7t40mcr0000gn/T/jbwa-0.7.17/rCRS.fasta

sushilashenoy commented 6 years ago

The folder did exist, but it was empty. I removed the folder and tried running haplogrep again. This time I got a different error:

Start Classification... Exception in thread "main" java.lang.UnsatisfiedLinkError: /private/var/folders/6k/71m142b164dg2y84t7t40mcr0000gn/T/jbwa-0.7.17/libbwajni.so: dlopen(/private/var/folders/6k/71m142b164dg2y84t7t40mcr0000gn/T/jbwa-0.7.17/libbwajni.so, 1): no suitable image found. Did find: /private/var/folders/6k/71m142b164dg2y84t7t40mcr0000gn/T/jbwa-0.7.17/libbwajni.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at importer.FastaImporter.load(FastaImporter.java:51) at genepi.haplogrep.main.Haplogrep.run(Haplogrep.java:148) at genepi.base.Tool.start(Tool.java:193) at genepi.haplogrep.main.Haplogrep.main(Haplogrep.java:190)

Not sure if it matters, but I am on Mac OS X 10.10.5. java -version outputs: java version "1.8.0_191" Java(TM) SE Runtime Environment (build 1.8.0_191-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

seppinho commented 6 years ago

I see. We are linking the bwa mem JNI. This *.so library is not working on MacOS.

sushilashenoy commented 6 years ago

I thought I had fixed this by compiling this repo (https://github.com/lindenb/jbwa), but then I realized I had tested with an .hsd file not fasta. FASTA is still not working for me.

Any ideas?

seppinho commented 6 years ago

As mentioned above, the FASTA jbwa library (*.so) currently works only for linux. I have seen that jbwa also provides a mac library, but this is currently not integrated in haplogrep.

sushilashenoy commented 6 years ago

I was able to get this to work on OS X by compiling jbwa from the repo and replacing libbwajni.so with src/main/native/libbwajni.jnilib (renamed as libbwajni.so)