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.
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)
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>")
cat(aa2html(aa_set = aa_set))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.