Re: [R-sig-phylo] diversification rates with two traits present simultaneously
Hello, Personally, I would advise you not to use a tree, for your 2 traits times 2 (+/-) makes 4 combinations, meaning a tree that is dichotomic cannot reveal anything! Can you quantify your "diversification" without "rate"? How do you obtain your "diversification rates"? If it is something you can count, you may try an old fashion Khi-square test… you would then know if there is a correlation… Have a nice day, Benjamin Le Lundi 18 Juin 2018 23:46 GMT, Elizabeth Christina Miller a écrit: > Hello, > > I am wondering what comparative method(s) is appropriate for testing if > diversification rates are highest when two traits are present together, > rather than one alone? Specifically, if I have two binary traits, let's say > freshwater/marine and temperate/tropical, what is the best way to test if > diversification rates are highest in tropical+freshwater groups, as opposed > to tropical+marine or temperate+freshwater? I think MuSSE can do this, but > my tree is large so I want to avoid issues associated with rate > heterogeneity. Are there any alternatives? > > > > -- > Elizabeth Miller > PhD Candidate: Wiens Lab > Ecology and Evolutionary Biology > University of Arizona > > [[alternative HTML version deleted]] > > ___ > R-sig-phylo mailing list - R-sig-phylo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/ ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
Re: [R-sig-phylo] How to use which.edge {ape}
Thanks Liam for the quick answer. The exemple you made up is nice, I will work on, and try to transfer that on my case Not sure that it would be possible. Benjamin Le Mercredi 4 Juin 2014 16:10 GMT, Liam J. Revell liam.rev...@umb.edu a écrit: Hi Gilles. which.edge returns the rows of phy$edge containing the edges to the mrca of the taxa in group. If the group is monophyletic, this will be all the edges in the group descended from that mrca. If the group is non-monophyletic, it will be only the edges leading from the mrca of group to the tips. Key to keep in mind is that which.edge computes the indices from phy$edge, not the node numbers themselves! So, for instance: require(phytools) set.seed(1) tree-pbtree(n=26,tip.label=LETTERS) plotTree(tree,node.numbers=T) group-c(E,F,G,H) ## should be monophyletic ii-which.edge(tree,group) tree$edge[ii,] ## should be the edges tipward of the mrca of group ## visualize this: plotSimmap(paintBranches(tree,tree$edge[ii,2],state=2), colors=setNames(c(blue,red),1:2),lwd=3,node.numbers=T) group-c(C,D,F,E) ## should be non-monophyletic ii-which.edge(tree,group) tree$edge[ii,] ## should be the edges tipward of the mrca of group ## visualize this: plotSimmap(paintBranches(tree,tree$edge[ii,2],state=2), colors=setNames(c(blue,red),1:2),lwd=3,node.numbers=T) All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 6/4/2014 11:41 AM, Gilles Benjamin Leduc wrote: Hello, I am looking the correct way to use the function which.edge {ape} and to understand what it returns… which.edge(phy, group) so I use as phy an object I get like that: as.phylo(dendroIcscan) summary(as.phylo(dendroIcscan)) Phylogenetic tree: as.phylo(dendroIcscan) Number of tips: 169 Number of nodes: 168 Branch lengths: mean: 0.1140614 variance: 0.006095345 distribution summary: Min. 1st Qu. Median 3rd Qu. Max. 0.005061 0.047450 0.093750 0.175000 0.361100 No root edge. First ten tip labels: B-40-2x-T B-41-2x-T B-43-2x-T B-47-2x-T B-52-2x-T B-72-3x-T B-73-2x-A B-75-4x-T B-83-4x-A B-84-4x-NA No node labels. and as group, I get an object: ColPloIcscan [1] 2 2 2 2 2 3 2 4 4 4 4 4 4 2 4 2 2 4 2 4 2 4 2 4 2 4 2 4 2 3 2 3 2 4 2 3 2 4 2 4 3 3 4 2 4 2 4 2 4 3 4 2 4 2 4 2 4 2 3 4 4 2 3 4 2 4 3 3 2 4 2 4 2 4 4 4 4 2 4 2 4 4 3 4 4 4 [87] 2 3 4 2 4 4 2 4 2 2 3 2 4 2 4 2 4 2 4 4 2 2 4 3 4 4 4 4 4 4 4 4 4 4 4 2 2 3 2 2 4 3 4 2 4 4 2 2 4 3 4 2 4 4 2 4 3 2 3 2 4 2 4 2 4 4 4 2 2 2 4 2 2 4 2 4 2 2 4 4 4 4 2 with everything in the same order than in the phylogenetic tree. As there is no exemple, I try around with several commande : which.edge(as.phylo(dendroIcscan), ColPloIcscan) [1] 10 50 68 69 71 72 73 74 79 80 110 120 121 122 which.edge(as.phylo(dendroIcscan), ColPloIcscan==2) [1] 9 10 50 68 69 70 which.edge(as.phylo(dendroIcscan), ColPloIcscan==3) [1] 9 10 50 68 69 70 which.edge(as.phylo(dendroIcscan), ColPloIcscan==4) [1] 8 9 10 50 68 69 70 There is no exemple, and it doesn't make sens in itself… who could help me with that? Benjamin ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/ ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
[R-sig-phylo] How to use which.edge {ape}
Hello, I am looking the correct way to use the function which.edge {ape} and to understand what it returns… which.edge(phy, group) so I use as phy an object I get like that: as.phylo(dendroIcscan) summary(as.phylo(dendroIcscan)) Phylogenetic tree: as.phylo(dendroIcscan) Number of tips: 169 Number of nodes: 168 Branch lengths: mean: 0.1140614 variance: 0.006095345 distribution summary: Min. 1st Qu. Median 3rd Qu. Max. 0.005061 0.047450 0.093750 0.175000 0.361100 No root edge. First ten tip labels: B-40-2x-T B-41-2x-T B-43-2x-T B-47-2x-T B-52-2x-T B-72-3x-T B-73-2x-A B-75-4x-T B-83-4x-A B-84-4x-NA No node labels. and as group, I get an object: ColPloIcscan [1] 2 2 2 2 2 3 2 4 4 4 4 4 4 2 4 2 2 4 2 4 2 4 2 4 2 4 2 4 2 3 2 3 2 4 2 3 2 4 2 4 3 3 4 2 4 2 4 2 4 3 4 2 4 2 4 2 4 2 3 4 4 2 3 4 2 4 3 3 2 4 2 4 2 4 4 4 4 2 4 2 4 4 3 4 4 4 [87] 2 3 4 2 4 4 2 4 2 2 3 2 4 2 4 2 4 2 4 4 2 2 4 3 4 4 4 4 4 4 4 4 4 4 4 2 2 3 2 2 4 3 4 2 4 4 2 2 4 3 4 2 4 4 2 4 3 2 3 2 4 2 4 2 4 4 4 2 2 2 4 2 2 4 2 4 2 2 4 4 4 4 2 with everything in the same order than in the phylogenetic tree. As there is no exemple, I try around with several commande : which.edge(as.phylo(dendroIcscan), ColPloIcscan) [1] 10 50 68 69 71 72 73 74 79 80 110 120 121 122 which.edge(as.phylo(dendroIcscan), ColPloIcscan==2) [1] 9 10 50 68 69 70 which.edge(as.phylo(dendroIcscan), ColPloIcscan==3) [1] 9 10 50 68 69 70 which.edge(as.phylo(dendroIcscan), ColPloIcscan==4) [1] 8 9 10 50 68 69 70 There is no exemple, and it doesn't make sens in itself… who could help me with that? Benjamin ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
Re: [R-sig-phylo] Triploid microsatellites?
Hi, I'm also curently developinga R package: https://github.com/giby/Linarius that can be used for triploid… actually it is designed for mixed ploidy levels. But right now, I focus on AFLP. As I told you there is much more thing availlable for microsatelites. Benjamin Le Vendredi 30 Mai 2014 09:17 GMT, Vojtěch Zeisek vo...@trapa.cz a écrit: Hello, thank You both. poppr looks interesting, I need to explore it more. Adegenet is famous package. I didn't know it can also handle triploid data. I found problem when importing data to it. Functions of import2genind group (read.genetix, read.structure, read.fstat and read.genepop) are only for diploid data. So I used read.loci. The input file was easy: first line with names of markers etc, first row with names of samples, second row with populations and from third row alleles. I coded alleles in this way 123/234/345, so that each individual has 3 alleles. Missing alleles are just NA. ssrs3n.loci - read.loci(ssrs3n.txt, header=TRUE, loci.sep=\t, allele.sep=/, col.pop=2, col.loci=3:10, row.names=1) ssrs3n.loci Allelic data frame: 130 individuals 8 loci 1 additional variable ssrs3n.genind - loci2genind(ssrs3n.loci) ssrs3n.genind # ### Genind object ### # - genotypes of individuals - S4 class: genind @call: df2genind(X = as.matrix(x[, attr(x, locicol)]), sep = /, pop = pop) @tab: 130 x 115 matrix of genotypes @ind.names: vector of 130 individual names @loc.names: vector of 8 locus names @loc.nall: number of alleles per locus @loc.fac: locus factor for the 115 columns of @tab @all.names: list of 8 components yielding allele names for each locus @ploidy: 2 @type: codom Optional contents: @pop: factor giving the population of each individual @pop.names: factor giving the population of each individual @other: - empty - As You can see, it was imported as diploid and I haven't found way how import it as triploid data. Imported data matrix seems to be wrong. When I used input file formatted in the same way for diploids, it works perfectly... Any ideas how to fix that? Thank You in advance, Vojtěch Zeisek Dne Pá 30. května 2014 03:34:49 jste napsal(a): Hi there, yes, adegenet handles any (constant) ploidy for most purposes. For input formats etc. please see the tutorial on basics, section 'documents' on: http://adegenet.r-forge.r-project.org/ Please feel free to use the adegenet forum for adegenet-related questions. Cheers Thibaut From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on behalf of Gilles Benjamin Leduc [g...@hi.is] Sent: 29 May 2014 17:12 To: Vojtěch Zeisek Cc: mailinglist R Subject: Re: [R-sig-phylo] Triploid microsatellites? Hi, Yes it is possible in R, there is a package created for related purposes: poppr or something like that… The dev version on github should be preferred. I have seen several R work with polyploids and microsatelites, unfortunately… I work with ALFP :p Benjamin Le Jeudi 29 Mai 2014 13:40 GMT, Vojtěch Zeisek vo...@trapa.cz a écrit: Hello, I wonder if it is possible to handle triploid microsatellite (yes, all individuals are regular 3n) data in adegenet and another R packages. And if so, how to enter the data. Any experiences and/or Ideas are very welcomed. :-) Structure and BAPS are working well. Yours sincerely, Vojtěch Zeisek -- Vojtěch Zeisek http://trapa.cz/en/ Department of Botany, Faculty of Science Charles University in Prague Benátská 2, Prague, 12801, CZ http://botany.natur.cuni.cz/en/ Institute of Botany, Academy of Science Zámek 1, Průhonice, 25243, CZ http://www.ibot.cas.cz/en/ Czech Republic ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
Re: [R-sig-phylo] Triploid microsatellites?
Hi, Yes it is possible in R, there is a package created for related purposes: poppr or something like that… The dev version on github should be preferred. I have seen several R work with polyploids and microsatelites, unfortunately… I work with ALFP :p Benjamin Le Jeudi 29 Mai 2014 13:40 GMT, Vojtěch Zeisek vo...@trapa.cz a écrit: Hello, I wonder if it is possible to handle triploid microsatellite (yes, all individuals are regular 3n) data in adegenet and another R packages. And if so, how to enter the data. Any experiences and/or Ideas are very welcomed. :-) Structure and BAPS are working well. Yours sincerely, Vojtěch Zeisek -- Vojtěch Zeisek http://trapa.cz/en/ Department of Botany, Faculty of Science Charles University in Prague Benátská 2, Prague, 12801, CZ http://botany.natur.cuni.cz/en/ Institute of Botany, Academy of Science Zámek 1, Průhonice, 25243, CZ http://www.ibot.cas.cz/en/ Czech Republic ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
[R-sig-phylo] export R data to Arlequin
Hi all, My supervisor asked me to compute some parameter using Arlequin. I am used to proceed my data with R and everything is in R compatible format. Then I would like to know if there is any R command to export my data for Arlequin. I have noticed that arlequin had a Rcmdr link, but I haven't found the way to use it… Any experienced user could help me starting with… Even if there is a Huge FM for it, I just can't figure out how to start … best regards Benjamin ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/