phylotastic / phylotastic-portal

Web tool (ruby on rails) providing access to phylotastic services for acquiring species trees.
https://github.com/phylotastic/phylotastic/wiki
1 stars 3 forks source link

median and sdm trees displayed in portal come from secondary calibrations #322

Open LunaSare opened 6 years ago

LunaSare commented 6 years ago

There are two ways of running datelife: (1) Using a tree as input and (2) using taxon names as input. When the input is a tree, datelife gives back a tree scaled to time with a dating method (PATHd8) using congruified node ages as secondary calibrations. In a way, this scaled trees have made up dates, because ages of missing taxa are generated without any DNA or aminoacid alignments. All scaled trees in this case have the same number of tips as the input tree.

When input are taxon names, datelife gives back the trees coming from primary studies that are in OToL's tree store. In this case, scaled trees would sometimes have less tips than number of input names.

median and sdm trees displayed on the portal come from running datelife when a tree is the input, option (1).

This is an example to run from R, so you can observe the different results obtained with the two options:

tree <- "((Carnegiea_gigantea,((Olneya_tesota,Parkinsonia_microphylla),Larrea_tridentata))Pentapetalae,Yucca_elata);"
tip_names <- ape::read.tree(text = tree)$tip.label
median_input_tree <- datelife_search(input = tree, summary_format = "newick_median")
median_input_names <- datelife_search(input = tip_names, summary_format = "newick_median")
# this is the tree obtained from the portal:
median_tree_portal <- gsub(" ", "_", "(Yucca elata:155,(Carnegiea gigantea:155,(Larrea tridentata:114,(Olneya tesota:66.2,Parkinsonia microphylla:66.2):47.8):41):0);")

# option 1:
plot(phytools::read.newick(text = median_input_tree), main = "datelife package, tree as input")
# option 2:
plot(phytools::read.newick(text = median_input_names), main = "datelife package, names as input")
# portal tree, obtained with option 1:
plot(phytools::read.newick(text = median_tree_portal), main = "scaled tree from portal")
screen shot 2018-07-10 at 6 13 23 pm screen shot 2018-07-10 at 6 13 57 pm screen shot 2018-07-10 at 6 14 05 pm
LunaSare commented 6 years ago

For the phylotastic portal, I incline towards displaying scaled trees that come from primary studies (running datelife with names as input, option 2), instead of coming from secondary calibrations. But I imagine it would be more satisfying for the users to get scaled trees with all the taxa they're interested in. So, for now, maybe we can leave it as it is currently implemented in the portal (running datelife with trees as input, option 1), and plan on giving an option for the users in the future.

What do you think @arlin and @bomeara?

arlin commented 6 years ago

Note: need to install rphylotastic, datelife and PATHd8 in order to run example