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

Intuitive error messages #10

Closed Jonathan-Abrahams closed 4 years ago

Jonathan-Abrahams commented 4 years ago

Hi,

I presume I am sometimes using a dataset with some sort of mistake in when I run homoplasyFinder as it crashes R!

I am not sure what I am doing wrong, likely some sort of name mismatch between the presence/absence file and the tree.

Would it be possible to add some error messages into homoplasyFinder so that it is easier to troubleshoot what is going on in this case?

I have got other combinations to work! Documents.zip

JosephCrispell commented 4 years ago

Hi Jonathan,

Thanks for raising this issue. I get the following error when I run homoplasyFinder on your data (tree and presence/absence table):

ERROR!! The following sequence name: ""J855_S4_L001__snippy"" isn't present as a tip label in the newick tree file. The sequence and tip IDs must match exactly.`

It looks like homoplasyFinder doesn't like the quoted strings (") in your presence/absence table. I replaced all "s in your file with nothing and then homoplasyFinder worked fine.

I completely agree that the error message is difficult to interpret, and also more importantly homoplasyFinder should be able to handle quoted strings in its input files.

I have labeled this issue as a bug and I will aim to fix it as soon as possible (unfortunately with new baby and new job, this may still be a while :-)).

Thanks for raising this issue - really useful to identify this bug!

Joe

Jonathan-Abrahams commented 4 years ago

Hi Joe,

Thanks for answering. I thought it would be something like that!

Are you running this in R?

My R just plain crashes, and I dont get to see that error message.

JosephCrispell commented 4 years ago

Ah yes, was your R crashing and having to be restarted? Yes, that has never happened to me before but it was just today when I was testing homoplasyFinder on your data.

I managed to get it working between crashes in R, you'll probably get on better if you use the Jar tool in the command line. The jar file is available here: https://github.com/JosephCrispell/homoplasyFinder/raw/master/inst/java/HomoplasyFinder.jar.

I will look into the R crashing - that seems like a bigger problem than homoplasyFinder.

JosephCrispell commented 4 years ago

Been doing a little more looking into the crashing problem. I think it is an underlying problem with the rJava package that homoplasyFinder uses (see this issue for more details).

To stop the crashing from happening use the runHomoplasyFinderJarTool() instead of the runHomoplasyFinderInJava() function as runHomoplasyFinderJarTool() does not use the rJava package.

Hope that helps!