plotAlignment: Plot multiple sequence alignments

Description Usage Arguments Value References Examples

View source: R/sequenceComparison.R

Description

A function that plot a heatmap of multiple sequence alignments, showing all nucleotide that is different from the reference sequence

Usage

1
plotAlignment(alignment, refid, startIdx, endIdx)

Arguments

alignment

A MsaAAMultipleAlignment object which is a result of multiple sequence alignment

refid

A string indicating the name of reference sequence. This sequence must be in the alignment

startIdx

A integer indicating the start position of alignment that user wants to plot

endIdx

A integer indicating the end position of alignment that user wants to plot

Value

Returns a plot

References

Charif D, Lobry J. 2007. “SeqinR 1.0-2: a contributed package to the R project for statistical computing devoted to biological sequences retrieval and analysis.” In Bastolla U, Porto M, Roman H, Vendruscolo M (eds.), Structural approaches to sequence evolution: Molecules, networks, populations, series Biological and Medical Physics, Biomedical Engineering, 207-232. Springer Verlag, New York.

Raivo Kolde (2019). pheatmap: Pretty Heatmaps. R package version 1.0.12. https://CRAN.R-project.org/package=pheatmap

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Example 1
# Create a basic msa and then plot a tree from it
library(Biostrings)
set1 <- Biostrings::DNAStringSet("ATCGATCG")
set2 <- Biostrings::DNAStringSet("ATTTTTTT")
set3 <- Biostrings::DNAStringSet("ATCGATTT")
setTotal <- union(set1, set2)
setTotal <- union(setTotal, set3)
names(setTotal) <- c("a", "b", "c")
align <- multipleSeqAlign(setTotal)
plotAlignment(align, refid = "a", startIdx = 1, endIdx = 8)

quick2063706271/Cov2Comparator documentation built on Dec. 22, 2021, 10:59 a.m.