Alma stands for Alignment Markup and is a small utility to format protein sequence aligment in HTML.

Alma has been build exclusively to be used within Rmarkdown files, so that Biostrings elements can be nicely printed when we render Rmarkdown into HTML.

Load example file

aa_file <- system.file("exdata/REM_example.fasta", package = "alma")
aa_set <- Biostrings::readAAStringSet(filepath = aa_file)

Generally we like that protein sequences are printed using colour code to identify aminoacid, Biostrings, being build to be used within R, does not perform that.

print(aa_set)

Temporary section - how to display HTML from code?

cat("<pre><SPAN style=\"color:#33cc00\">I</SPAN></pre>")
print("<SPAN>I</SPAN>")
# knitr::asis_output(cat("<pre><SPAN style=\"color:#33cc00\">I</SPAN></pre>"))
cat("<pre><SPAN style=\"color:#33cc00\">I</SPAN></pre>")

print amino acids

cat(aa2html(aa_set = aa_set))


othomantegazza/alma documentation built on May 30, 2019, 8:07 p.m.