Skip to content

Commit bf1e0e3

Browse files
committed
Added comment about including plankton
1 parent 874af7a commit bf1e0e3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/scala/org/fathomnet/worms/io/MutableWormsNode.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,13 @@ object MutableWormsNodeBuilder:
5353
* the animalia node
5454
*/
5555
def trimTree(rootNode: MutableWormsNode): MutableWormsNode =
56+
// Filter out all nodes that do not have "Animalia" as an ancestor
5657
def filter(children: Seq[MutableWormsNode]): Seq[MutableWormsNode] =
5758
children.filter(_.concept.names.map(_.name).exists(_.contains("Animalia")))
5859

60+
// Uncomment this to keep the full tree including plankton and other non-animalia nodes
61+
// def filter(children: Seq[MutableWormsNode]): Seq[MutableWormsNode] = children
62+
5963
val accepted = filter(rootNode.children.toSeq)
6064
if (accepted.isEmpty) rootNode
6165
else MutableWormsNode(rootNode.concept, mutable.ArrayBuffer().appendAll(accepted))

0 commit comments

Comments
 (0)