I have set of taxa and I want to generate dynamically a phylogeney tree file based on a reference database.
EX. the users will choose the set of taxa that they're interested in, from ~1000 taxa and the I should create the corresponding phylogeney tree.
are there any R packages to create a tree from a set of taxa?
Depending on what is relevant to your situation, you can either pre-build a phylogenetic tree with all taxa and filter it based on user selection or you build a tree from scratch each time. The former will most likely give faster response to the user but my impression is that you may be after the later.
Regardless, to build a tree you need to:
- collect the relevant sequences for the selected taxa
- produce a multiple sequence alignment of these sequences
- build a phylogenetic tree from the alignment
To manipulate and build trees, you can use the R packages ape and phangorn. See for example the vignette from the phangorn package.
For multiple sequence alignment, you can use the Bioconductor msa package.
You didn't say what kind of tree you want to build. Assuming you want to build gene trees, then the relevant sequences are representative sequences for each gene you want to include in the tree.
excuse me what you mean by relevant sequences?
You didn't say what kind of tree you want to build. Assuming you want to build gene trees, then the relevant sequences are representative sequences for each gene you want to include in the tree.
its, a phylogeny tree (species and their classification: kingdom, phylum, class, order ....)