magikker / TreeHouse-Private

TreeHouse development.
GNU General Public License v3.0
0 stars 0 forks source link

Quartets implied by a bipartition #16

Closed magikker closed 11 years ago

magikker commented 11 years ago

What: This would be a function that would print the quartets implied by a bipartition. A bipartition of size (n|m) implies (n choose 2)X(m choose 2) quartets.

Title: Quartets_in_bipart (could use a better name?)

Input/Output: It would take a bipartition (which is not something that we've got an easy way to pass from the commandline) and return (via print) the quartets in that bipartition.

Implementation ideas: Until we've got a good way to directly reference a bipartition from the command line this would have to be an internal function.

Possible Variations: Return the number of quartets in a bipartition.

magikker commented 11 years ago

From Marc Smith:

brainstorming: what about bid (index) of bipartition in the bipartition table? if there were a command to list the bipartitions of a tree, by index, the user could get the index of the bipartition to iterate over. I realize this isn't scalable for trees that contain hundreds or thousands of bipartitions, but perhaps there's a way to filter by listing only bids for bipartitions that contain a set of taxa... just thinking out loud...

From Grant Brammer:

I think that's where it probably needs to go.

you could have a search function that returned the bipartitions (instead of trees) matched by the search. You'd need some support functions to show Bids, pretty print the bipartition from a Bid and similar... They probably ought to be their own type in the grammar... like b1 as opposed to just plain ints so people don't confuse them with trees.