Skip to content

New labelling system for LineageTree#114

Closed
BadPrograms wants to merge 3 commits into
v3.xfrom
new_labelling_system
Closed

New labelling system for LineageTree#114
BadPrograms wants to merge 3 commits into
v3.xfrom
new_labelling_system

Conversation

@BadPrograms

Copy link
Copy Markdown
Collaborator

Labels are now a new class that works like a dict, but tests if all values of the dictionary are actually strings, can be labels. These labels are saved inside a new attribute of LineageTree called labelling.
lT.labelling contains all the labels and tests if all new labels correspond to a subset of the nodes or the set of the nodes.
To access these labels:

lT = ...
lT.labelings.list_of_labels
# ["default_dict", "label1", "label2",...]
lT.labellings["default_dict"][node_id]
# prints the label of the node

get_ancestor_with_attribute works the same way as before.
get_labelled_ancestor works the same way as before.

I am open to discuss if we should drop labelling and save everything directly on LineageTree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant