Changing the node building priority in NodeFactory.build() #48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes it explicit the priority of which node we build in
NodeFactory.build()
. This is important to prioritise which types of nodes we try to build first. This priority directly translates to how we partition the MSA in the recursive clustering and collapse algorithm, so it is at the core of themake_prg
algorithm. In summary, we try to first build a leaf if we can, as if we can build a leaf, there is no need to recursively partition the MSA horizontally or vertically. If that does not work, we try to build a multi interval node, i.e. try to partition the MSA vertically. If that does not work, we try to build a multi cluster node, i.e. try to partition the MSA horizontally. If that does not work, then it means we can't partition the MSA anymore, then we force build a leaf. We have a corner case when building the root, which is slightly different. In more details this is the node building priority we apply:Several unit tests were added, and two integration tests validating the sample example were added.
Closes #43