msaR is a an htmlwidgets wrapper of the BioJS MSA viewer javascript library. msa will pass alignments to the BioJS MSA.
library(msaR)
# read some sequences from a Multiple sequence alignment file.
<- system.file("sequences","AHBA.aln", package="msaR")
seqfile
# display the MSA.
msaR(seqfile, menu=F, overviewbox = F)
msaR(seqfile, menu=F, overviewbox = F)
# read some sequences from a Multiple sequence alignment file.
<- system.file("sequences","phosphoproteins.aln", package="msaR")
proteinseqfile
# loading AA with ape. Can also use Biostrings
<- ape::read.FASTA(proteinseqfile, type="AA")
proteins
# note the seqlogo will show up in your widget but
# not the vignette static output
msaR(proteins, menu=F, overviewbox = F, colorscheme = "clustal")
msaR can be used as a widget with the Shiny web application framework.
In ui.R
msaROutput("msa", width="100%")
In server.R
$msa <- renderMsaR(
outputmsaR(seqfile)
)