JosephCrispell / homoplasyFinder

A tool to identify and annotate homoplasies on a phylogeny and sequence alignment
GNU General Public License v3.0
19 stars 3 forks source link

Error in HomoplasyFinder in the command line #11

Closed ricmedveterinario closed 3 years ago

ricmedveterinario commented 4 years ago

Hello, I'm trying to run the command line: java -jar HomoplasyFinder.jar --fasta example.fasta --tree example.tree, but with other files and I'm having the following error:

Exception in thread "main" java.lang.reflect.InvocationTargetException at java.base / jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at java.base / jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at java.base / jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.base / java.lang.reflect.Method.invoke (Method.java/1666) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main (JarRsrcLoader.java:61) Caused by: java.lang.NumberFormatException: For input string: "0.0)" at java.base / jdk.internal.math.FloatingDecimal.readJavaFormatString (FloatingDecimal.java:2054) at java.base / jdk.internal.math.FloatingDecimal.parseDouble (FloatingDecimal.java:110) at java.base / java.lang.Double.parseDouble (Double.java/1643) at homoplasyFinder.Tree.extractNodeInformation (Tree.java:389) at homoplasyFinder.Tree.findNewickSubNodes (Tree.java:145) at homoplasyFinder.Tree.readNewickNode (Tree.java:426) at homoplasyFinder.Tree. (Tree.java:24) at homoplasyFinder.HomoplasyFinder.main (HomoplasyFinder.java:26) ... 5 more

My fasta file is 18Mb and my tree is 16.5kb.

How could I fix this?

Thank you.

JosephCrispell commented 4 years ago

Hi,

Thanks for giving homoplasyFinder a go and sorry it isn't working for you. The error you are getting looks like your tree file has a formatting problem (or homoplasyFinder has a bug). Would you mind trying homoplasyFinder with the following tree and fasta files:

Using the following command:

java -jar HomoplasyFinder.jar --fasta example.fasta --tree example.tree

Let me know if you get an error - that way we'll know if it is a bug with homoplasyFinder or a problem with the file formatting.

Thanks and sorry again you're having problems running homoplasyFinder!

ricmedveterinario commented 4 years ago

Hello Joseph,

I would like to thank you for helping us,

We were able to solve the problem,

The newick format tree exported from the Mega software program does not work HomoplasyFinder, definitely. We look for all problems and do not identify. Mega software is a great program, but it's a black box too.

We used the MPBoot program to create the phylogenetic tree and the first time we used its output we were successful in running HomoplasyFinder,

We had major problems with HomoplasyFinder that works in R. We identified a little lack of standardization in the commands to be executed that are available on github. In addition, at times the R package does not load objects, tree file and fasta file. We cannot, for example, execute this command in R, runHomoplasyFinderJarTool (), as it does not load files. We know that the rJava package does not work with large files.

In general we like the program and we will add in our scientific publication,

We are grateful that you make your program available to the scientific community,

Best Regards,

JosephCrispell commented 4 years ago

Hi,

Really glad you were able to get homoplasyFinder to work and thank you for such constructive feedback!

Thank you for highlighting problems with the R package. I will check the runHomoplasyFinderJarTool()just now and let you know if I am able to identify and fix the problem.

I'll also check the standardization of the commands - if you have time it would be great if you could highlight a few examples you identified.

Thanks again for using homoplasyFinder and I am really happy you managed to get the command line tool working ok.

JosephCrispell commented 4 years ago

I'm labelling the runHomoplasyFinderJarTool() problem as a bug until I look into to it and the standardisations as a potential enhancement.

JosephCrispell commented 4 years ago

As far as I can see the problem with runHomoplasyFinderJarTool() was with some typos in its documentation, which has now been updated. I've tested homoplasyFinder on both mac and Ubuntu computers and both runHomoplasyFinderJarTool() and runHomoplasyFinderInJava() are working well on the test datasets.

I'll work through the documentation to fix any further inconsistencies in the documentation