phylogeny

Bootstrapped tree values differ from PAST

你。 提交于 2019-12-11 07:55:40
问题 When I compute a bootstrapped tree in R I get different values to when I use PAST (http://folk.uio.no/ohammer/past/). How can I get the output to match from the two programs? Here's what I'm doing in R (data below): library("ape") library("phytools") library("phangorn") library("cluster") # compute neighbour-joined tree f <- function(xx) nj(daisy(xx)) nj_tree <- f(tab) nj_tree_root <- root(nj_tree, 1, r = TRUE) ## bootstrap # bootstrap values do not match PAST output - why is that? nj_tree

Phylogenetic model using multiple entries for each species

痞子三分冷 提交于 2019-12-11 07:27:41
问题 I am relatively new to phylogenetic regression models. In the past I used PGLS when I had only 1 entry for each species in my tree. Now I have a dataset with thousands of records for a total of 9 species and I would like to run a phylogenetic model. I read the tutorial of the most common packages (e.g. caper) but I am unsure how to build the model. When I try to create the object for caper, i.e. using: obj <- comparative.data(phy = Tree, data = Data, names.col = species, vcv = TRUE, na.omit =

Change tip labels in phylogeny in R

岁酱吖の 提交于 2019-12-11 05:22:00
问题 I have a csv file which consists of species names for several hundred species in the same order in which they appear in $tip.labels from my phylogeny. I want to swap out these species names with new species names such that is in the same order as my original species names output from $tip.labels . I want to preserve my tree topology, just trying to update my phylogeny with new taxonomic names. output from $tip.labels: old_taxonomic_names old_species_name_1 old_species_name_2 old_species_name

Phylogenetic Tree - how to create a branch by species matrix?

假如想象 提交于 2019-12-08 02:36:15
问题 Working with a phylogenetic tree in R, I would like to create a matrix which indicates if each branch of the tree (B1 to B8) is associated with each species (A to E), where 1s indicate that the branch is associated. (Shown below) The R function which.edge() is useful for identifying the terminal branch for a species. but it doesn't identify ALL the branches associated with each species. What function could I use to identify all the branches in the tree that go from the root to the tip for

Use Python to extract Branch Lengths from Newick Format

妖精的绣舞 提交于 2019-12-07 05:04:10
问题 I have a list in python consisting of one item which is a tree written in Newick Format, as below: ['(BMNH833953:0.16529463651919140688,(((BMNH833883:0.22945757727367316336,(BMNH724182a:0.18028180766761139897,(BMNH724182b:0.21469677818346077913,BMNH724082:0.54350916483644962085):0.00654573856803835914):0.04530853441176059537):0.02416511342888815264,(((BMNH794142:0.21236619242575086042,(BMNH743008:0.13421900772403019819,BMNH724591:0.14957653992840658219):0.02592135486124686958):0

Phylogenetic Tree - how to create a branch by species matrix?

时间秒杀一切 提交于 2019-12-06 13:23:37
Working with a phylogenetic tree in R, I would like to create a matrix which indicates if each branch of the tree (B1 to B8) is associated with each species (A to E), where 1s indicate that the branch is associated. (Shown below) The R function which.edge() is useful for identifying the terminal branch for a species. but it doesn't identify ALL the branches associated with each species. What function could I use to identify all the branches in the tree that go from the root to the tip for each species? Example Tree library(ape) ex.tree <- read.tree(text="(A:4,((B:1,C:1):2,(D:2,E:2):1):1);")

Phylogenetics in R: collapsing descendant tips of an internal node

人盡茶涼 提交于 2019-12-06 10:39:45
I have several thousand gene trees that I am trying to ready for analysis with codeml. The tree below is a typical example. What I want to do is automate the collapsing of tips or nodes that appear to be duplicates. For instance, descendants of node 56 are tips 26, 27, 28 etc all the way to 36. Now all of these other than tip 26 appear to be duplicates. How can I collapse them all into a single tip, leaving just tips 28 and one representative of the other tips as the descendants of node 56? I know how to manually do this one by one, but I am trying to automate the process so that a function

How to get taxonomic specific ids for kingdom, phylum, class, order, family, genus and species from taxid?

情到浓时终转凉″ 提交于 2019-12-05 21:46:42
问题 I have a list of taxids that looks like this: 1204725 2162 1300163 420247 I am looking to get a file with taxonomic ids in order from the taxids above: kingdom_id phylum_id class_id order_id family_id genus_id species_id I am using the package "ete3". I use the tool ete-ncbiquery that tells you the lineage from the ids above. (I run it from my linux laptop with the command below) ete3 ncbiquery --search 1204725 2162 13000163 420247 --info The result looks like this: # Taxid Sci.Name Rank

Link tip labels to phylogenetic tree using dots

落爺英雄遲暮 提交于 2019-12-04 15:19:38
I'm trying to produce a non-ultrametric tree using the ape package in R and the function plot.phylo(). I'm struggling to find any documentation on how to keep the tip label vertically aligned on their left edge and with a series of dots (variable length) linking the species' name to the tip of the node. Any help would be much appreciated as well as links to other packages within R that may be able to achieve this. An example of the newick tree I don't have any tree examples of what i want, however, the description seems self explanatory. the labels would all be shifted to the very right, and

Label and color leaf dendrogram (phylogeny) in R using ape package

三世轮回 提交于 2019-12-04 14:20:36
问题 Following a previous post (Label and color leaf dendrogram in r) I have a follow-up question. My questions are similar to the post mentioned but I wonder can it be done using ape (e.g., plot(as.phylo(fit), type="fan", labelCol) as it has more type of phylogeny. The mentioned post questions were: How can I show the group codes in leaf label (instead of the sample number)? I wish to assign a color to each code group and colored the leaf label according to it (it might happen that they will not