Re: [R-sig-phylo] use R to download the DNA barcode sequence of a list, of species from GenBank
Hi Yuxin, you can also try out the phyloGenerator tool to download specific sequences from GenBank (http://willpearse.github.io/phyloGenerator/index.html). You only need a species list to do so, for more details read the manual. Best, Eugen Am 14.07.2014 12:00, schrieb r-sig-phylo-requ...@r-project.org: > Send R-sig-phylo mailing list submissions to > r-sig-phylo@r-project.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > or, via email, send a message with subject or body 'help' to > r-sig-phylo-requ...@r-project.org > > You can reach the person managing the list at > r-sig-phylo-ow...@r-project.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of R-sig-phylo digest..." > > > Today's Topics: > >1. use R to download the DNA barcode sequence of a listof > species from GenBank (cheny...@hotmail.com) >2. Re: use R to download the DNA barcode sequence of a list of > species from GenBank (Karolis Ramanauskas) >3. Fw: Re: use R to download the DNA barcode sequence of a list > of species from GenBank (cheny...@hotmail.com) > > > -- > > Message: 1 > Date: Sun, 13 Jul 2014 23:39:13 +0800 > From: "cheny...@hotmail.com" > To: r-sig-phylo > Subject: [R-sig-phylo] use R to download the DNA barcode sequence of a > listof species from GenBank > Message-ID: > Content-Type: text/plain > > Dear All, > > I have a list of about 2,000 plant species, and want to construct a > phylogenetic tree for them. I'd like to use the DNA barcode data availabe in > GenBank. Then I will first need to download these DNA sequences from the > Internet. I know that read.GenBank in package "ape" is capable to do it if I > have the GenBank accession numbers. But what I only have now is their species > names. Does anybody know which R function can batch-process it with only > species names from GenBank? > > Many thanks in advance. > Yuxin > > > > Yuxin Chen > Phd Candidate > School of Life Sciences > Sun Yat-sen University > Guangzhou, P. R. China, 510006 > cheny...@gmail.com or cheny...@mail2.sysu.edu.cn > > [[alternative HTML version deleted]] > > > -- > > Message: 2 > Date: Sun, 13 Jul 2014 12:31:03 -0500 > From: Karolis Ramanauskas > To: cheny...@hotmail.com, R-sig-phylo@r-project.org > Subject: Re: [R-sig-phylo] use R to download the DNA barcode sequence > of a list of species from GenBank > Message-ID: > > Content-Type: text/plain > > Good day, > > I understand you have done some work already, but you may want to try my > PhyloMill pipeline. It will do exactly what you need. It is written in > Python, not R. You will need to give it the names of ingroup and outgroup > taxa and which loci you want to use. If the loci you want to use are not > predefined in PhyloMill, I can create the definitions, just let me know > which loci you want to use. > > PhyloMill will actually do a lot more than just download and align > sequences, it will filter mislabeled sequences, reverse-complement if > needed, etc. It will also create a consensus sequence when multiple GI > accessions are available for that taxon and locus. > > https://github.com/karolisr/krpy > > Peace, > Karolis Ramanauskas > Department of Biological Sciences > University of Illinois at Chicago > 840 W. Taylor St. SEL 4093 M/C 067 > Chicago, IL 60607 > E-Mail: kram...@uic.edu > >> From: "cheny...@hotmail.com" >> Subject: [R-sig-phylo] use R to download the DNA barcode sequence of a > list of species from GenBank >> Date: July 13, 2014 10:39:13 AM CDT >> To: r-sig-phylo >> >> Dear All, >> >> I have a list of about 2,000 plant species, and want to construct a > phylogenetic tree for them. I'd like to use the DNA barcode data availabe > in GenBank. Then I will first need to download these DNA sequences from the > Internet. I know that read.GenBank in package "ape" is capable to do it if > I have the GenBank accession numbers. But what I only have now is their > species names. Does anybody know which R function can batch-process it with > only species names from GenBank? >> >> Many thanks in advance. >> Yuxin >> >> >> >> Yuxin Chen >> Phd Candidate >> School of Life Sciences >> Sun Yat-sen University >> Guangzhou, P. R. China, 510006 >> cheny...@gmail.com or
[R-sig-phylo] Error with chronopl function
Hi everybody, I try to find out the lambda value for the chronos() function in ape and use the CV method. chronopl() is running, but in the end I get infinite ylim values (CV) and the error message: Error in plot.window(...) : need finite 'ylim' values In addition: Warning messages: 1: In min(x) : no non-missing arguments to min; returning Inf 2: In max(x) : no non-missing arguments to max; returning -Inf I guess something is wrong with my tree, because with other trees the function works well. I have a ML tree constructed on the Cipres Gateway using RAxML blackbox. Does anyone know how this error happens and what I might do to fix it? Best, Eugen ___ 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] Distance matrix from phylogeny
Hi folks, I have phylogeny with absolute branch lengths in million years. How do I get a distance matrix with values between 0 and 1? Best, Eugen ___ 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] co-occurrence vs. phylogenetic distance plot
HI@all, guess I made something wrong, cause my question didn't show up. Anyway, I was looking for a way to plot co-occurrence vs. phylogenetic distance in R. I'm working with picante but there seems to be no such function in the package. Anyone an idea? greets Eugen -- Eugen Egorov PhD Student Department of Ecology - Animal Ecology Faculty of Biology Philipps-Universität Marburg Karl-von-Frisch-Str. 8 35032 Marburg Germany mail: eugen...@biologie.uni-marburg.de phone: +49 6421 28 23490 ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
[R-sig-phylo] co-occurrence vs. phylogenetic distance plot
___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Re: [R-sig-phylo] Pruning a tree
Well, Liams suggestion produced an error message "only zeros are allowed to be mixed with negative indices". I just tried a bunch of command lines from various internet sites and came up with what seems to be a solution. Here the skript: tree<-read.tree("tree.tre") data<-read.csv("data.csv") data.frame(data[,1])->data1 rownames(data1)<-data[,1] attach(data1) name.check(tree, data1) -> overlap comptree<-drop.tip(tree, overlap$Tree.not.data) ...and this works, but I don't know why exactly...seems like rownames is an imprtant factor, cause it doesn't work without that command line...for whatever reason... Does that make any sense? - Original Message - From: "Graham Slater" To: "Liam J. Revell" Cc: "Eugen Egorov" ; Sent: Friday, March 04, 2011 6:33 PM Subject: Re: [R-sig-phylo] Pruning a tree Yes, name.check() will only work with a named vector of data or data frame, so Liam's code should work for you. it also looks like your names in the vector "species" are different from those of the tip labels, as you say that nc$Tree.not.data gives you a bunch of numbers but your vector is made of Species underscore number, e.g. Species_1. If that's the case, either change your file of species names to be just numbers, or use the following to change your tree tip labels before using liam's code. tree$tip.label <- paste("Species", tree$tip.label, sep = "_") Graham Slater Department of Ecology and Evolutionary Biology University of California, Los Angeles 621 Charles E Young Drive South Los Angeles CA 90095-1606 (310) 825-4669 gsla...@ucla.edu www.eeb.ucla.edu/gslater On Mar 4, 2011, at 7:45 AM, Liam J. Revell wrote: Hi Eugen, Did you try my suggestion? In your case, if the species you want to keep are in a row separated text file, with a header ("species"), first read them in: > species.to.keep<-read.table(file="species.list.file",header=T) Now, for "phylo" object tree, type: > pruned.tree<-drop.tip(tree,tree$tip.label[-match(species.to.keep[,1], > tree$tip.label)]) - Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ (new) email: liam.rev...@umb.edu (new) blog: http://phytools.blogspot.com On 3/4/2011 6:52 AM, Eugen Egorov wrote: First of all, thank you for helping :) Well, this didn't work out, although it should work perfectly. When I type in "nc <- name.check(tree, data)" and then "nc" I get all tree species (over 3000 species) in the $Tree.not.data part. In the $Data.not tree part I see 281 numbers from "1" to "281", this is the number of species in my data file. Seems like R doesnt recognize the species names in the data file. The data file is a .csv file and looks like this: species Species_1 Speceis_2 Species_3 Species_281 so its one column and nothing else. What should I do? Thanks a lot - Original Message - From: "Graham Slater" To: "Eugen Egorov" Cc: Sent: Thursday, March 03, 2011 7:54 PM Subject: Re: [R-sig-phylo] Pruning a tree drop.tip assumes you have identified the tips that you want to remove, which you could do using nc <- name.check(tree, data). newtree <- drop.tip(tree, nc[[1]]) or newtree <- drop.tip(tree, nc$Tree.not.data) # note that Tree has a caps and not using this could cause a weird tree with no tips to be output. But if your data are simply a list of names (and I assume here you mean you have a vector of names rather than an actual list) and you don't know exactly which species are missing then the following might be easier: missing <- tree$tip.label[is.na(match(tree$tip.label, listofnames))] ## will use the match() function to identify the tips that are not present in your list - it essentially is trying to match the tip names from the tree to your list and if there is no match it reports NA for that tip. we get the tip names corresponding to those NAs here newtree <- drop.tip(tree, missing) # this will remove those tips graham On Mar 3, 2011, at 9:15 AM, Eugen Egorov wrote: Hi all, I have a huge tree and a list with species. Now I want to prune the tree, so only species appearing in the list are left in the tree. I tried the geiger package to compare tree species with those in the list, but that didn't work out, because I recieved a tree with 0 tips and 1 node after using "drop.tip$tree.not.data". I guess I have to format the list, but I don't know in which way. Any idea how I do that? greets Eugen [[alternative HTML version deleted]] ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phy
Re: [R-sig-phylo] Pruning a tree
First of all, thank you for helping :) Well, this didn't work out, although it should work perfectly. When I type in "nc <- name.check(tree, data)" and then "nc" I get all tree species (over 3000 species) in the $Tree.not.data part. In the $Data.not tree part I see 281 numbers from "1" to "281", this is the number of species in my data file. Seems like R doesnt recognize the species names in the data file. The data file is a .csv file and looks like this: species Species_1 Speceis_2 Species_3 Species_281 so its one column and nothing else. What should I do? Thanks a lot - Original Message - From: "Graham Slater" To: "Eugen Egorov" Cc: Sent: Thursday, March 03, 2011 7:54 PM Subject: Re: [R-sig-phylo] Pruning a tree drop.tip assumes you have identified the tips that you want to remove, which you could do using nc <- name.check(tree, data). newtree <- drop.tip(tree, nc[[1]]) or newtree <- drop.tip(tree, nc$Tree.not.data) # note that Tree has a caps and not using this could cause a weird tree with no tips to be output. But if your data are simply a list of names (and I assume here you mean you have a vector of names rather than an actual list) and you don't know exactly which species are missing then the following might be easier: missing <- tree$tip.label[is.na(match(tree$tip.label, listofnames))] ## will use the match() function to identify the tips that are not present in your list - it essentially is trying to match the tip names from the tree to your list and if there is no match it reports NA for that tip. we get the tip names corresponding to those NAs here newtree <- drop.tip(tree, missing) # this will remove those tips graham On Mar 3, 2011, at 9:15 AM, Eugen Egorov wrote: Hi all, I have a huge tree and a list with species. Now I want to prune the tree, so only species appearing in the list are left in the tree. I tried the geiger package to compare tree species with those in the list, but that didn't work out, because I recieved a tree with 0 tips and 1 node after using "drop.tip$tree.not.data". I guess I have to format the list, but I don't know in which way. Any idea how I do that? greets Eugen [[alternative HTML version deleted]] ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Graham Slater Ph. D. Department of Ecology and Evolutionary Biology University of California, Los Angeles 610 Charles E. Young Drive South Los Angeles, CA 90095-1606 (424) 442-4348 gsla...@ucla.edu www.eeb.ucla.edu/gslater ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
[R-sig-phylo] Pruning a tree
Hi all, I have a huge tree and a list with species. Now I want to prune the tree, so only species appearing in the list are left in the tree. I tried the geiger package to compare tree species with those in the list, but that didn't work out, because I recieved a tree with 0 tips and 1 node after using "drop.tip$tree.not.data". I guess I have to format the list, but I don't know in which way. Any idea how I do that? greets Eugen [[alternative HTML version deleted]] ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
[R-sig-phylo] generating trees based on a complete tree, with data from a table
Hi, I have a question about tree construction with ape. I have a tree with ~180 species, and a table with plots and presence/absence data of these species. Now I want for each plot to generate a tree with the present species. i don't quite get it how to tell R! to do so. I guess I have to work with the drop.tip command? For example: newick format tree: a,b),(c,d)),e),f); table: plot number a b c d e f 1 0 1 1 0 1 0 2 1 1 1 0 1 1 3 1 0 1 1 0 0greets Eugen GRATIS für alle WEB.DE Nutzer: Die maxdome Movie-FLAT! Jetzt freischalten unter http://movieflat.web.de ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo