Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create function map_frequency_to_subtree() #6

Open
caseywdunn opened this issue Jun 20, 2017 · 1 comment
Open

Create function map_frequency_to_subtree() #6

caseywdunn opened this issue Jun 20, 2017 · 1 comment

Comments

@caseywdunn
Copy link
Owner

Create the function Create function map_frequency_to_subtree() that has the following behavior:

  • Takes a set of trees with multiple sequences per taxon. Tips have name format taxon_1@1234 where taxon_1 is the taxon and 1234 is the sequence ID. Each taxon can have one or more sequences, which are differentiated by their ids. Creates a table of split frequencies seen in the tree.

  • Takes a focal tree with one tip per taxon, and tip name taxon. e.g. taxon_1

  • For each edge in focal tree (including terminal edges) identify the corresponding edge in the split frequency table. Map the frequency of that edge to the edge label in the focal tree. If the split was not found in the set then the edge label has value 0.

  • Return the focal tree with edge labels.

@caseywdunn
Copy link
Owner Author

A test example would be something like:

Treeset:

((((a@1, a@2), (b@3,b@4)),(c@5,c@6)),(d@7,d@8))
(((((a@1, a@2), b@3),b@4),(c@5,c@6)),(d@7,d@8))

Focal tree:

(((a,b),c),d)

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

No branches or pull requests

1 participant