extracting percentages from pie charts at nodes

392 views
Skip to first unread message

Wyatt Sharber

unread,
Mar 21, 2017, 12:08:27 PM3/21/17
to BioGeoBEARS
Hi,

Does anyone know the best way to extract the associated percentages of the pie charts at each node when reconstructing ancestral states? I'm sure it's somewhere in the results_object, but I can't make sense of it. 

Thanks in advance,

Wyatt

Nick Matzke

unread,
Mar 21, 2017, 7:13:38 PM3/21/17
to bioge...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "BioGeoBEARS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeobears+unsubscribe@googlegroups.com.
To post to this group, send email to bioge...@googlegroups.com.
Visit this group at https://groups.google.com/group/biogeobears.
To view this discussion on the web visit https://groups.google.com/d/msgid/biogeobears/513f1199-14c0-4798-8fa5-c7c294ec8311%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wyatt Sharber

unread,
Oct 13, 2017, 5:00:02 PM10/13/17
to BioGeoBEARS
Hi Nick,

Thanks so much for pointing out this tutorial. I used it to get the table of probabilities of states/ranges at each node following your example. I'm a little confused looking at the resulting table though. The rows are associated with the node number in APE format, and the columns are the probabilities of each range, correct? What is the last column where there is no ranges? Also, should the "tip nodes" be the same as the geographic character matrix that I input?

I attached the table and my initial geographic character matrix for clarity. Thanks so much for your help!

Wyatt


On Tuesday, March 21, 2017 at 7:13:38 PM UTC-4, Nick Matzke wrote:
On Wed, Mar 22, 2017 at 3:08 AM, Wyatt Sharber <wvsh...@gmail.com> wrote:
Hi,

Does anyone know the best way to extract the associated percentages of the pie charts at each node when reconstructing ancestral states? I'm sure it's somewhere in the results_object, but I can't make sense of it. 

Thanks in advance,

Wyatt

--
You received this message because you are subscribed to the Google Groups "BioGeoBEARS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeobears...@googlegroups.com.
AyeniaGeoChar_5state.nex
range_probabilities.txt

Nick Matzke

unread,
Oct 15, 2017, 11:32:41 PM10/15/17
to bioge...@googlegroups.com
Hi Wyatt!


On Sat, Oct 14, 2017 at 8:00 AM, Wyatt Sharber <wvsh...@gmail.com> wrote:
Hi Nick,

Thanks so much for pointing out this tutorial. I used it to get the table of probabilities of states/ranges at each node following your example. I'm a little confused looking at the resulting table though. The rows are associated with the node number in APE format,

Yes -- and use the function prt() to get those node numbers.  E.g., if your tree is "tr", do prt(tr).

 
and the columns are the probabilities of each range, correct?

Yes.  Each column is one of the possible ranges, in this order:

_, A, B, C, AB, AC, BC, ....etc...

(assuming your geog file had "(A B C)" as the order)

 
What is the last column where there is no ranges?


There should be no columns that are not ranges. Note that the first "range", "_", represents the null range (living in zero areas...yes this is weird, but removing it is also weird, see discussion on PhyloWiki and Massana et al. on BioArXiv). 



 
Also, should the "tip nodes" be the same as the geographic character matrix that I input?


I'm not sure what you mean.  The order of species rows in the geography file does not matter, if that's what you're asking.  The tip nodes have (implicit) node numbers in the APE phylo format, the prt() function makes these explicit.

Cheers!
Nick

 

I attached the table and my initial geographic character matrix for clarity. Thanks so much for your help!

Wyatt





 


On Tuesday, March 21, 2017 at 7:13:38 PM UTC-4, Nick Matzke wrote:

On Wed, Mar 22, 2017 at 3:08 AM, Wyatt Sharber <wvsh...@gmail.com> wrote:
Hi,

Does anyone know the best way to extract the associated percentages of the pie charts at each node when reconstructing ancestral states? I'm sure it's somewhere in the results_object, but I can't make sense of it. 

Thanks in advance,

Wyatt

--
You received this message because you are subscribed to the Google Groups "BioGeoBEARS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeobears...@googlegroups.com.
To post to this group, send email to bioge...@googlegroups.com.
Visit this group at https://groups.google.com/group/biogeobears.
To view this discussion on the web visit https://groups.google.com/d/msgid/biogeobears/513f1199-14c0-4798-8fa5-c7c294ec8311%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "BioGeoBEARS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeobears+unsubscribe@googlegroups.com.

To post to this group, send email to bioge...@googlegroups.com.
Visit this group at https://groups.google.com/group/biogeobears.

Wyatt Sharber

unread,
Oct 16, 2017, 10:13:19 AM10/16/17
to BioGeoBEARS
Thanks Nick!

The reason I had "blank" column was simply because all the columns were shifted when I opened the text file in Excel. Everything makes sense now!

Wyatt
Hi Wyatt!


Reply all
Reply to author
Forward
0 new messages