knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
phyMSAViewer is a helpful tool that enables users to have a general overview on multiple selected sequences. It also provides multiple sequence alignment on the side and enables users to zoom on a particular range of the multiple sequence alignment to have a better view of the amino acids. Function uniprotToPhy enables users to view the phylogenetic tree with the multiple sequence alignment by entering Uniprot IDs. Function seqToPhy enables users to view the phylogenetic tree with the multiple sequence alignment by providing a fasta file containg the selected sequences. Function uniprotToFasta enables users to retrieve fasta file that contains sequences of interest by entering Uniprot IDs. The shiny implementation of phyMSAViewer is available as a Shiny App (indicated below). For more information, see details below. This document gives a tour of phyMSAViewer functionalities. It was written in Rmarkdown, using the knitr package for production.
See help(package=phyMSAViewer)
for further details and references provided by citation("phyMSAViewer")
. To download phyMSAViewer, use the following commands:
library(devtools) devtools::install_github("helen307/phyMSAViewer", build_vignettes=TRUE) library(phyMSAViewer)
To run the Shiny App:
shiny::runApp(appDir = system.file("phyMSAViewerShinyApp", package = "phyMSAViewer"),)
To list all functions available in the package:
lsf.str("package:phyMSAViewer")
Normally building a phylogenetic tree starts from providing with a sequence fasta file. In this package, we allow users to start by typing in the Uniprot IDs. Then we download the sequence data from Swiss-Prot. The reason why we chose to perform MSA (multiple sequence alignment) using the algorithm MUSCLE
is because ClusterW implements an interative method. Therefore, the calculation errors will be accumulated. MUSCLE
has a progressive algorithm that optimizes at each step. Here is an image that explains the alogrithm of MUSCLE in detail:
We used the neighbor-joining (NJ) algorithm to create our phylogenetic tree after we obtain the pairwise distances from the sequences. This algorithm joins the two closest sub-trees that are not already joined. A "neighbor" is defined as two texa that are connected by a single node in an unrooted tree. Here is an image showing how the NJ algorithm perform its greedy actions:
library(phyMSAViewer) phyMSA <- uniprotToPhy(ID="AC=P19838 OR AC=Q00653 OR AC=Q01201") # Access the phylogenetic tree with MSA plot directly from the object. phyMSA
# mySeqs <- Biostrings::readAAStringSet("<Your fasta file name>.fasta") seqPhyMSA <- seqToPhy(mySeqs) # mySeqs is a dataset in this package # Access the phylogenetic tree with MSA plot directly from the object. seqPhyMSA
# Use the following UniprotID for this function: P19838, Q00653, Q01201 phyMSAViewer::uniprotToFasta("AC=P19838 OR AC=Q00653 OR AC=Q01201") # A file called seqs.fasta will appear in the main directory.
session_info()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.