Hi BioGeoBEARS group,
Mericien has the honor of the first question. As we
experiment with the listserv, we might find ways to improve
things.
In general, if you email questions off-list, if you tell me
if I should/should not answer on-list, I can give answers
faster.
Cheers!
Nick
Answers below:
On 10/4/13 12:07 PM, MERICIEN MENDOZA VENZON wrote:
> Hi Nick,
>
> No, I don't mind at all! Thanks!
>
> Mericien
>
>
> On Fri, Oct 4, 2013 at 9:04 AM, Nick Matzke
> <
mat...@nimbios.org <mailto:
mat...@nimbios.org>> wrote:
>
> Hi Mericien,
>
> Do you mind if I post the answers (not the dataset) to
> the listserv?
>
> Cheers!
> Nick
>
>
>
> On 10/4/13 11:33 AM, MERICIEN MENDOZA VENZON wrote:
>
> Hi Nick!
>
> Thank you for adding me to the listserve. I was able
> to run
> BioGeoBEARS on my butterflyfish dataset and just had
> a few
> questions regarding the output plots (I am attaching
> mine if
> you would like to have a look).
>
> 1. For the 1st plot with the squares at each node, what
> exactly do the different colors indicate? Does each
> color
> correspond to a different range scenario?
BioGeoBEARS has a default color scheme depending on the
number of areas. What these are can be seen in the function:
get_colors_for_numareas
When a range is displayed (either in a box, or a pie-slice),
if it is a single area, it gets the color assigned by
get_colors_for_numareas().
Ranges of multiple areas get a mixture of the colors of the
individual single areas.
If the range is *all* areas, the color is white.
In general, it is a difficult thing to come up with a good
color scheme/display situation for lots of areas. You have
9 areas, so there are a ton of possible ranges.
At some point, it would be better to just display each of
the 9 areas for each node, and shade the squares by
probability of occupation, rather than worrying about the
exact range, which is anyway very uncertain at the base of
your tree. But I haven't programmed this yet.
> 2. For the plot with the pie charts, is this showing the
> relative probabilities of the different range
> scenarios at
> each node? I'm assuming the different colors
> correspond to
> the same range scenarios color-coded in the 1st
> plot.
Yes on both!
> What
> then does the black indicate?? Presence in all the
> regions,
> perhaps?
Black is the color of the line between each pie slice, so if
the pie looks black, you have a ton of very thin slices,
i.e. low certainty about the exact range. This can be
frustrating, but under a particular model+dataset, it can be
common. I think this point was sometimes lost in LAGRANGE
analyses that plotted just the most probable ancestral
range; sometimes the "most probable" range only had a few
percent of the probability, i.e. it was more likely to be
wrong than right, under the model & data.
One note about the BioGeoBEARS ancestral states/ancestral
ranges plot: when there is a tie in range probabilities, the
program just displays the first in the list. You can see
the actual relative probabilities in the pie chart.
>
> 3. In terms of the output rates for d and e, what
> units are
> these in?
d and e are basically the probability per million years, or
whatever units your phylogeny branch lengths are in. You
will see that if you divide all of your branch lengths by 10
before the analysis, d and e will increase by a factor of 10.
> Are they relative to cladogenesis rates since
> there is no explicit measure of that indicated in
> the output?
If you are talking about the rate of cladogenesis, i.e.
speciation rate, this is not included in the model, as we
are assuming a fixed tree with all relevant speciation
events included (which ignores extinct lineages, but this is
a problem with most comparative methods).
If you are talking about the values of j, s, y, v, these are
just the relative per-event weights in a single cladogenesis
event.
E.g., if the ancestor is AB, and there are 3 total areas
under the LAGRANGE DEC model, you have these possible
descendents just after speciation:
Sympatric subset speciation events:
A, AB
B, AB
AB, A
AB, B
Vicariance events:
A, B
B, A
The DEC model says each allowed event is equiprobable. So
each event gets weight=1. To get the probabilities, you sum
the weights and divide. So the probability of each event
(CONDITIONAL on AB being the ancestor) above is 1/6.
Sympatric subset speciation events:
A, AB weight=s=1, probability=1/6
B, AB weight=s=1, probability=1/6
AB, A weight=s=1, probability=1/6
AB, B weight=s=1, probability=1/6
Vicariance events:
A, B weight=v=1, probability=1/6
B, A weight=v=1, probability=1/6
Events like these get zero probability:
Sympatric speciation of widespread ancestor (range-copying,
parameter y)
AB --> AB, AB y=1, but probability=0 because mx01y=0.0001,
which disallows the smaller daughter having a range size>1
Founder-event speciation/jump dispersal (parameter j)
AB --> AB, C j=0, probability=0
AB --> C, AB j=0, probability=0
Under DEC+J, where j=0.1, and s=v=y=(3-j) (the default), we
have:
Sympatric subset speciation events:
A, AB weight=s=0.9, probability=1/5.6
B, AB weight=s=0.9, probability=1/5.6
AB, A weight=s=0.9, probability=1/5.6
AB, B weight=s=0.9, probability=1/5.6
Vicariance events:
A, B weight=v=0.9, probability=1/5.6
B, A weight=v=0.9, probability=1/5.6
Founder-event speciation/jump dispersal (parameter j)
AB --> AB, C j=0.1, probability=1/5.6
AB --> C, AB j=0.1, probability=1/5.6
The cladoRcpp package calculates all of these conditional
probabilities, given values of y,s,v, and j, and conditional
on each possible ancestral range.
In our example, the possible ancestral ranges are:
A, B, C, AB, AC, BC, ABC
Keeping track of all of this gets quite complex, as you can
imagine!
> 4. Lastly, I was just curious about the BayArea
> implementation in BioGeoBEARS. I have run BayArea on
> this
> dataset as well and one of the input files required is a
> file that lists the x,y coordinates for each region.
> Does
> BioGeoBEARS also implement this kind of
> distance-dependent
> dispersal where probabilities of dispersal factor in
> distance between areas?
It does, but you have to input the between-area distances
with a text file giving the distances between regions as a
tab-delimited matrix.
If you run the default example, and look at:
BioGeoBEARS_run_object
...you will see a slot for the distances filename:
BioGeoBEARS_run_object$distances_fn
You would set this equal to a path/filename containing the
text file. The text file looks like this:
distances_matrix.txt
====================
Bristol Chi Clarks CO Coast GB Moj Owens Parker Plains Son
0 9999 18.2722359431822 58.0120620295921 9999 9999
25.6484737554032 9999 8.70904805808523 9999 9999
9999 0 9999 9999 9999 87.0517096158344 9999 9999 9999
219.879378050581 352.655138615036
18.2722359431822 9999 0 94.5814672539343 9999 9999
72.1683609431966 9999 6.5365280797486 9999 13.8104159240886
58.0120620295921 9999 94.5814672539343 0 9999
9.54622322255551 86.3129493944454 9999 2.78121001652051
9999 9999
9999 9999 9999 9999 0 255.866782686773 22.3785464213307
9999 9999 9999 47.4284358384458
9999 87.0517096158344 9999 9.54622322255551
255.866782686773 0 92.7025799120529 37.2697749884338 9999
107.123540771359 536.511071690982
25.6484737554032 9999 72.1683609431966 86.3129493944454
22.3785464213307 92.7025799120529 0 8.39569397891058 9999
9999 9999
9999 9999 9999 9999 9999 37.2697749884338
8.39569397891058 0 9999 9999 9999
8.70904805808523 9999 6.5365280797486 2.78121001652051
9999 9999 9999 9999 0 9999 33.1854307903707
9999 219.879378050581 9999 9999 9999 107.123540771359
9999 9999 9999 0 9999
9999 352.655138615036 13.8104159240886 9999
47.4284358384458 536.511071690982 9999 9999
33.1854307903707 9999 0
END
====================
(you will have to unwrap it in a text editor, basically it's
a square, tab-delimited matrix)
Then you would want to turn on the x parameter, which is the
exponent on distance.
# Add x as a free parameter (dispersal prob is an exponent
on distance)
BioGeoBEARS_run_object$BioGeoBEARS_model_object@params_table["x","type"]
= "free"
BioGeoBEARS_run_object$BioGeoBEARS_model_object@params_table["x","init"]
= 0
When x=0, dispersal and jump dispersal probabilities are
multiplied by distance^x = distance^0 = 1. I.e., this is
the distance-doesn't-matter model.
x=-1 would mean dispersal probability goes down as a
function of 1/distance, etc...
> Or is it similar to LaGrange
> wherein
> dispersal is only allowed to adjacent regions.
By default, LAGRANGE allows dispersal between all regions.
You can change this with dispersal constraints.
BioGeoBEARS allow allows you to input dispersal constraints,
as well as simply allowing/disallowing the existence of
different areas through time (which is an importantly
different thing).
Apologies not everything is super-well documented, it's a
major project!
Cheers,
Nick
>
> Sorry for the long list, but the wonderful output from
> BioGeoBEARS has gotten us very excited and eager to
> compare
> these results to what we have gotten with other range
> reconstruction programs.
>
> Thank you so much for your help!
>
> All the best,
> Mericien
>
>
> On Tue, Oct 1, 2013 at 11:33 AM, Nick Matzke
> <
mat...@nimbios.org <mailto:
mat...@nimbios.org>
> <mailto:
mat...@nimbios.org
> <mailto:
mat...@nimbios.org>>> wrote:
>
> Hi Mericien,
>
> Sure, happy to help! "tipranges" is an object
> within R,
> and yes it holds the same information as the
> tipranges
> text file. Allegedly it is better in
> programming to
> manipulate data in the form of objects, rather than
> passing around the raw text file filenames and
> reloading
> the data each time you need it, I was trying
> that there.
>
> So getranges_from_LagrangePHYLIP converts the
> text file
> into the tipranges object.
>
> I'll put you on the listserv, cheers!
>
> Cheers!
> Nick
>
>
> On 10/1/13 2:17 PM, MERICIEN MENDOZA VENZON wrote:
>
> Hi Nicholas,
>
> I'm Mericien Venzon, an undergraduate
> researcher at
> Michael
> Alfaro's lab at UCLA. After hearing your
> talk last week,
> Mike wanted me to try BioGeoBEARS on a fish
> dataset
> that we
> had recently run BayArea on. I just had one
> clarification
> question:
>
> |What does the tipranges function in the
> example do?|
>
> |tipranges =
>
> getranges_from_LagrangePHYLIP(____lgdata_fn=np(BioGeoBEARS___run___object$geogfn))|
>
>
> |tipranges|
>
> It seems like the tipranges object contains
> exactly
> the same info as the data in my geography
> data file.
> I was just wondering why both are necessary
> to run
> BioGeoBEARS.
>
>
> Also, if you could put me on the listserv
> that would
> be great. I am very excited to try
> BioGeoBEARS on
> the other fish families in our study.
>
>
> Thank you so much!
>
> Mericien Venzon
>
>
>
>
> --
>
> ==============================____======================
>
> Nicholas J. Matzke, Ph.D.
> NIMBioS Postdoctoral Fellow in Mathematical Biology
> National Institute for Mathematical and Biological
> Synthesis (NIMBioS,
www.nimbios.org
> <
http://www.nimbios.org>
> <
http://www.nimbios.org>)
> Cell:
510-301-0179 <tel:
510-301-0179>
> <tel:
510-301-0179 <tel:
510-301-0179>>
> Email:
mat...@nimbios.org
> <mailto:
mat...@nimbios.org>
> <mailto:
mat...@nimbios.org <mailto:
mat...@nimbios.org>>
>
> Links to CV, R packages, etc.:
>
http://phylo.wikidot.com/____nicholas-j-matzke
> <
http://phylo.wikidot.com/__nicholas-j-matzke>
>
> <
http://phylo.wikidot.com/__nicholas-j-matzke
> <
http://phylo.wikidot.com/nicholas-j-matzke>>
>
> Also: Brian O'Meara Lab
> Postdoc office: 425a Hesler
> Department of Ecology and Evolutionary Biology
> University of Tennessee, Knoxville
>
http://www.brianomeara.info/
>
> NIMBioS Office:
> Claxton Bldg. #110B
> Office phone:
865-974-4873 <tel:
865-974-4873>
> <tel:
865-974-4873 <tel:
865-974-4873>>
>
>
> NIMBioS:
> 1122 Volunteer Blvd., Suite 106
> University of Tennessee
> Knoxville, TN 37996-3410
> Phone:
(865) 974-9334
> <tel:%28865%29%20974-9334> <tel:%28865%29%20974-9334>
> Fax:
(865) 974-9300 <tel:%28865%29%20974-9300>
> <tel:%28865%29%20974-9300>
>
>
> ------------------------------____-----------------------
>
> "[W]hen people thought the earth was flat, they
> were
> wrong. When people thought the earth was
> spherical, they
> were wrong. But if you think that thinking the
> earth is
> spherical is just as wrong as thinking the earth is
> flat, then your view is wronger than both of
> them put
> together."
>
> Isaac Asimov (1989). "The Relativity of Wrong." The
> Skeptical Inquirer, 14(1), 35-44. Fall 1989.
>
http://chem.tufts.edu/____AnswersInScience/____RelativityofWrong.htm
> <
http://chem.tufts.edu/__AnswersInScience/__RelativityofWrong.htm>
>
> <
http://chem.tufts.edu/__AnswersInScience/__RelativityofWrong.htm
> <
http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm>>
>
> ==============================____======================
>
>
>
>
>
> --
>
> --
> Mericien Venzon
> UCLA Computational Systems and Biology
> UCLA Ecology and Evolutionary Biology
>
> Howard Hughes Undergraduate Research Scholar |
> Alfaro Lab |
> Terasaki 2154
> LS1 Undergraduate Mentor | UCLA Department of
> Ecology and
> Evolutionary Biology
> Internal Affairs Coordinator | UCLA Student Stroke
> Team |
> UCLA Medical Center
> Vice-President | UCLA Figure Skating
>
>
> --
> ==============================__======================
> Nicholas J. Matzke, Ph.D.
> NIMBioS Postdoctoral Fellow in Mathematical Biology
> National Institute for Mathematical and Biological
> Synthesis (NIMBioS,
www.nimbios.org
> <
http://www.nimbios.org>)
> Cell:
510-301-0179 <tel:
510-301-0179>
> Email:
mat...@nimbios.org <mailto:
mat...@nimbios.org>
> Links to CV, R packages, etc.:
>
http://phylo.wikidot.com/__nicholas-j-matzke
> <
http://phylo.wikidot.com/nicholas-j-matzke>
>
> Also: Brian O'Meara Lab
> Postdoc office: 425a Hesler
> Department of Ecology and Evolutionary Biology
> University of Tennessee, Knoxville
>
http://www.brianomeara.info/
>
> NIMBioS Office:
> Claxton Bldg. #110B
> Office phone:
865-974-4873 <tel:865-974-4873>
>
> NIMBioS:
> 1122 Volunteer Blvd., Suite 106
> University of Tennessee
> Knoxville, TN 37996-3410
> Phone:
(865) 974-9334 <tel:%28865%29%20974-9334>
> Fax:
(865) 974-9300 <tel:%28865%29%20974-9300>
>
> ------------------------------__-----------------------
> "[W]hen people thought the earth was flat, they were
> wrong. When people thought the earth was spherical, they
> were wrong. But if you think that thinking the earth is
> spherical is just as wrong as thinking the earth is
> flat, then your view is wronger than both of them put
> together."
>
> Isaac Asimov (1989). "The Relativity of Wrong." The
> Skeptical Inquirer, 14(1), 35-44. Fall 1989.
>
http://chem.tufts.edu/__AnswersInScience/__RelativityofWrong.htm
> <
http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm>
> ==============================__======================
>
>
>
>
> --
>
> --
> Mericien Venzon
> UCLA Computational Systems and Biology
> UCLA Ecology and Evolutionary Biology
>
> Howard Hughes Undergraduate Research Scholar | Alfaro Lab |
> Terasaki 2154
> LS1 Undergraduate Mentor | UCLA Department of Ecology and
> Evolutionary Biology
> Internal Affairs Coordinator | UCLA Student Stroke Team |
> UCLA Medical Center
> Vice-President | UCLA Figure Skating
>
--
====================================================
Nicholas J. Matzke, Ph.D.
NIMBioS Postdoctoral Fellow in Mathematical Biology
National Institute for Mathematical and Biological Synthesis
(NIMBioS,
www.nimbios.org)
Cell:
510-301-0179
Email:
mat...@nimbios.org
Links to CV, R packages, etc.:
http://phylo.wikidot.com/nicholas-j-matzke
Also: Brian O'Meara Lab
Postdoc office: 425a Hesler
Department of Ecology and Evolutionary Biology
University of Tennessee, Knoxville
http://www.brianomeara.info/
NIMBioS Office:
Claxton Bldg. #110B
Office phone:
865-974-4873
NIMBioS:
1122 Volunteer Blvd., Suite 106
University of Tennessee
Knoxville, TN 37996-3410
Phone:
(865) 974-9334
Fax:
(865) 974-9300
-----------------------------------------------------
"[W]hen people thought the earth was flat, they were wrong.
When people thought the earth was spherical, they were
wrong. But if you think that thinking the earth is spherical
is just as wrong as thinking the earth is flat, then your
view is wronger than both of them put together."
Isaac Asimov (1989). "The Relativity of Wrong." The
Skeptical Inquirer, 14(1), 35-44. Fall 1989.
http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm
====================================================