Closed eliotmiller closed 9 years ago
It's early here, but I think that this function is doing what you want (determining which groups make another paraphyletic) and then this section does probably what most of the above does but with all the corner cases needed to make phyndr do the right thing (the pattern of mono- and para-phyletic clades with respect to the trait data is important for working out how to collapse things).
It'd be pretty easy to expose the find_paraphyletic
function, but I'm not sure what the use case would be for knowing this generally. Seems more in scope for something like geiger?
Yeah that find_paraphyletic function looks like it's exactly it. I wrote those ones above because Matt mentioned a few weeks back that someone else needed functions to quickly determine which clades were and were not monophyletic. I was trying to think of useful ways to output the answer, and that was what I came up with--determining what renders a clade poly/para-phyletic. The use case would be whatever said third party wanted it for, but Matt would know more there. Seems like something people might want. Some of us were talking about putting out a utility phylo function package, so we could put them in there if the need to expose them here seems questionable. No strong opinions.
I guess this is mostly redundant with Issue #13 which I think we are putting on the back burner for the time being. thanks for the code and the comments @eliotmiller may come in handy down the line
Matt and I were talking the other day about how to determine which clades are monophyletic, etc. Obviously that is now inherent in phyndr, but wondering about making the outputs more explicit. For instance, one could do something like the following to see both what is monophyletic, and which taxon/a render a given clade polyphyletic. Note that the case is currently specific to species-genus-family situations, though it's easy to modify it to just be hierarchically nested clades. Feel free to cannibalize or ignore or whatever. Also it currently relies on a single hidden geiger function (get descendants) but that's a pretty easy one to re-write in base R (you almost certainly already have it in this package).