16 months ago by
EMBL Heidelberg, Germany
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.