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

java.lang.NullPointerException #2

Closed LindseyBohr closed 5 years ago

LindseyBohr commented 5 years ago

How are gaps in the aln handled?

Running HomoplasyFinder.jar at the command line on ~74 closely related isolates and getting this error:

Exception in thread "main" java.lang.NullPointerException at homoplasyFinder.ConsistencyIndex.comparePossibleNucleotidesOfTwoSubNodes(ConsistencyIndex.java:444) at homoplasyFinder.ConsistencyIndex.getPossibleStateForInternalNodeFromPossibleStatesOfSubNodes(ConsistencyIndex.java:421) at homoplasyFinder.ConsistencyIndex.identifyPossibleStatesForInternalNode(ConsistencyIndex.java:407) at homoplasyFinder.ConsistencyIndex.identifyPossibleStatesForInternalNode(ConsistencyIndex.java:394) at homoplasyFinder.ConsistencyIndex.identifyPossibleStatesForInternalNode(ConsistencyIndex.java:394) at homoplasyFinder.ConsistencyIndex.identifyPossibleStatesForInternalNode(ConsistencyIndex.java:394) at homoplasyFinder.ConsistencyIndex.identifyPossibleStatesForInternalNode(ConsistencyIndex.java:394) at homoplasyFinder.ConsistencyIndex.identifyPossibleStatesForInternalNode(ConsistencyIndex.java:394) at homoplasyFinder.ConsistencyIndex.identifyPossibleStatesForInternalNode(ConsistencyIndex.java:394) at homoplasyFinder.ConsistencyIndex.identifyPossibleStatesForInternalNode(ConsistencyIndex.java:394) at homoplasyFinder.ConsistencyIndex.identifyPossibleStatesForInternalNode(ConsistencyIndex.java:394) at homoplasyFinder.ConsistencyIndex.identifyPossibleStatesForInternalNode(ConsistencyIndex.java:394) at homoplasyFinder.ConsistencyIndex.identifyPossibleStatesForInternalNode(ConsistencyIndex.java:394) at homoplasyFinder.ConsistencyIndex.identifyPossibleStatesForInternalNode(ConsistencyIndex.java:394) at homoplasyFinder.ConsistencyIndex.identifyPossibleStatesForInternalNode(ConsistencyIndex.java:394) at homoplasyFinder.ConsistencyIndex.identifyPossibleStatesForInternalNode(ConsistencyIndex.java:394) at homoplasyFinder.ConsistencyIndex.calculateMinimumNumberOfChangesOnPhylogeny(ConsistencyIndex.java:372) at homoplasyFinder.ConsistencyIndex.calculateConsistencyIndexForEachSiteOnPhylogeny(ConsistencyIndex.java:274) at homoplasyFinder.ConsistencyIndex.<init>(ConsistencyIndex.java:110) at homoplasyFinder.HomoplasyFinder.main(HomoplasyFinder.java:26)

I'm wondering if it's because I have gaps in my data denoted with "-"

JosephCrispell commented 5 years ago

Hi Lindsay,

Thanks very much for using the tool and sorry about the bug!

HomoplasyFinder should be able to account for gaps in the alignment, so I don't think that can be the issue. Would it be possible for you to send me a newick tree file and nucleotide fasta file that I can replicate the problem on?

Thanks again for using the tool!

Joe

JosephCrispell commented 5 years ago

Hi Lindsay,

To hopefully make identifying your issue a little easier, I have added some additional error messaging into HomoplasyFinder. Would it be possible for you to download the latest version of the HomoplasyFinder.jar from here and give it a go?

I also slightly edited the code to account for lowercase characters in the alignment, in case that was causing your problem.

Thanks!

Joe

LindseyBohr commented 5 years ago

That worked! I did get this error first when running it: ERROR!! Unrecognised character (?) in nucleotide alignment at position: 71 but after changing them all to dashes instead, it ran perfectly.

Thank you!

Lindsey

JosephCrispell commented 5 years ago

Hi Lindsey,

That is great! Thanks very much for pointing the bug out and thank you for using HomoplasyFinder.

Joe