## ----LoadPackageToDetermineVersion,echo=FALSE,message=FALSE,results='hide'---- options(width=65) set.seed(0) library(msa) msaVersion <- packageDescription("msa")$Version msaDateRaw <- packageDescription("msa")$Date msaDateYear <- as.numeric(substr(msaDateRaw, 1, 4)) msaDateMonth <- as.numeric(substr(msaDateRaw, 6, 7)) msaDateDay <- as.numeric(substr(msaDateRaw, 9, 10)) msaDate <- paste(month.name[msaDateMonth], " ", msaDateDay, ", ", msaDateYear, sep="") ## ----InstallMSA,eval=FALSE----------------------------------------------- ## source("http://www.bioconductor.org/biocLite.R") ## biocLite("msa") ## ----LoadMSA,eval=FALSE-------------------------------------------------- ## library(msa) ## ----locateTeXshadeSty,eval=FALSE---------------------------------------- ## system.file("tex", "texshade.sty", package="msa") ## ----SimpleExFileNames--------------------------------------------------- mySequenceFile <- system.file("examples", "exampleAA.fasta", package="msa") mySequences <- readAAStringSet(mySequenceFile) mySequences ## ----doAlignment--------------------------------------------------------- myFirstAlignment <- msa(mySequences) myFirstAlignment ## ----IntegratePDF2------------------------------------------------------- msaPrettyPrint(myFirstAlignment, output="pdf", showNames="none", showLogo="none", askForOverwrite=FALSE, verbose=FALSE) ## ----VisualizePDF,results='asis'----------------------------------------- msaPrettyPrint(myFirstAlignment, y=c(164, 213), output="asis", showNames="none", showLogo="none", askForOverwrite=FALSE) ## ----OtherAlgorithms,---------------------------------------------------- myClustalWAlignment <- msa(mySequences, "ClustalW") myClustalWAlignment myClustalOmegaAlignment <- msa(mySequences, "ClustalOmega") myClustalOmegaAlignment myMuscleAlignment <- msa(mySequences, "Muscle") myMuscleAlignment ## ----ShowConsensusBottom,results="asis"---------------------------------- msaPrettyPrint(myFirstAlignment, output="asis", y=c(164, 213), subset=c(1:6), showNames="none", showLogo="none", consensusColor="ColdHot", showLegend=FALSE, askForOverwrite=FALSE) ## ----ShowLogoDefault,results="asis"-------------------------------------- msaPrettyPrint(myFirstAlignment, output="asis", y=c(164, 213), subset=c(1:6), showNames="none", showLogo="top", logoColors="rasmol", shadingMode="similar", showLegend=FALSE, askForOverwrite=FALSE) ## ----Shading1,results='asis'--------------------------------------------- msaPrettyPrint(myFirstAlignment, output="asis", y=c(164, 213), showNames="none", shadingMode="similar", shadingColors="blues", showLogo="none", showLegend=FALSE, askForOverwrite=FALSE) ## ----Shading2,results='asis'--------------------------------------------- msaPrettyPrint(myFirstAlignment, output="asis", y=c(164, 213), showNames="none", shadingMode="functional", shadingModeArg="structure", askForOverwrite=FALSE) ## ----ShowConsensusBottom2,results="asis"--------------------------------- msaPrettyPrint(myFirstAlignment, output="asis", y=c(164, 213), subset=c(1:6), showNames="none", showLogo="none", consensusColor="ColdHot", showLegend=FALSE, shadingMode="similar", askForOverwrite=FALSE, furtherCode=c("\\defconsensus{.}{lower}{upper}", "\\showruler{1}{top}")) ## ----GetBibTeX,eval=FALSE------------------------------------------------ ## toBibtex(citation("msa"))