Time periods file

429 views
Skip to first unread message

Fabio Carbonaro

unread,
Oct 31, 2017, 7:13:46 AM10/31/17
to BioGeoBEARS
Hi Nick,
I have a problem with the "time period file".
An error appears when I typed the sentences below. 

> BioGeoBEARS_run_object$timesfn = "timeperiods_Metacryphaeus.txt"
> BioGeoBEARS_run_object$dispersal_multipliers_fn = "dispersal_multipliers_Metacryphaeus.txt"
> BioGeoBEARS_run_object$areas_allowed_fn = "areas_allowed_Metacryphaeus.txt"
> BioGeoBEARS_run_object = section_the_tree(inputs=BioGeoBEARS_run_object, make_master_table=TRUE, plot_pieces=FALSE)
>
> STOP ERROR in section_the_tree(): the timeperiods file *HAS* to have an oldest time that is older than the bottom node in your tree.  Use the function prt() to get a table of node ages > for your tree. The oldest node age in your tree is: 33182.5346672406. The times in your timeperiods file are: .
>
> Error in section_the_tree(inputs = BioGeoBEARS_run_object, make_master_table = TRUE,  : 
>  STOP ERROR in section_the_tree(): the timeperiods file *HAS* to have an oldest time that is older than the bottom node in your tree.  Use the function prt() to get a table of node ages > for your tree. The oldest node age in your tree is: 33182.5346672406. The times in your timeperiods file are: .

I tried to use the data resulting from the sentence below, but I did not succeed.
> prt(tr, printflag = TRUE, relabel_nodes = FALSE, time_bp_digits = 7, add_root_edge = TRUE, get_tipnames = FALSE, fossils_older_than = TRUE)

Could you help me?

Thank you in advance,
Fábio

Nick Matzke

unread,
Oct 31, 2017, 9:12:51 PM10/31/17
to bioge...@googlegroups.com
Hi -- various issues -- 

A. prt(tr) will just print a "tree table" to the screen.  It doesn't change anything about the analysis setup.  The point of doing "prt(tr)" is that you can then look at the node age column of this table to see exactly how old various nodes are. More on prt(): http://phylo.wikidot.com/example-biogeobears-scripts#prt

Of course, "tr" will have to be an APE tree object that you have already loaded.  The standard method is:

library(ape)
tr = read.tree(file="Put_your_newick_filename_here")


B. However... the STOP ERROR you got also tells you the age of your root node.  It says it is "33182.5346672406".  This suggests you have bigger problems!

This is because tree branch lengths are usually in millions of years, and since the Earth is only 4600 million years old, a tree age of 33182 my seems a bit high.


C. Always make sure you understand your basic phylogeny, how you got it, and whether or not it makes sense, before embarking on other analyses built on top of it.  

I would recommend that you:

C1. Open your tree in FigTree, turn on the axis to see the timescale, and decide if your tree is looking like it should.


C2. I would recommend putting your tree in units of millions of years -- the BioGeoBEARS default parameters and min/max limits assume this kind of timescaling.  You can multiply or divide all of the branchlengths in your tree like this:


C3. Read everything here:

Common BioGeoBEARS Mistakes To Avoid


D. Once you've got a dated phylogeny you are happy with, you can address the STOP ERROR you got.

Let's say your tree was actually 3.3 my old (ie, the root node has an age of 3.3 my), and you had 2 areas, A and B

Then, these files would give your STOP ERROR:

timeperiods.txt
==================
1
2
3
==================

manual_dispersal_multipliers.txt
==================
A B
1.0 1.0
0.5 1.0

A B
1.0 1.0
0.3 1.0

A B
1.0 1.0
0.1 1.0

END

==================


But, these files would fix it:

timeperiods.txt
==================
1
2
3
4
==================

manual_dispersal_multipliers.txt
==================
A B
1.0 1.0
0.5 1.0

A B
1.0 1.0
0.3 1.0

A B
1.0 1.0
0.1 1.0

A B
1.0 1.0
0.9 1.0

END

==================


The file formats and example files are all explained here:


...they make more sense if you read Ree & Smith (2008), Systematic Biology, first, since the example files are based on their example dataset, Hawaiian Psychotria.

Cheers,
Nick


--
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/c4910e76-3474-4774-9023-b559332da786%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fabio Carbonaro

unread,
Nov 1, 2017, 7:43:58 AM11/1/17
to bioge...@googlegroups.com
Hi Nick, thank you for the help!
I think there are problems with the tree scale. I will try to calibrate it with time.
Best regards,
Fábio


Fábio Augusto Carbonaro

Reply all
Reply to author
Forward
0 new messages