plotOverall: Plot the conservity of the positions

Description Usage Arguments Value References Examples

View source: R/plotConser.R

Description

This function plots the overall alignment's conservity using the conservity vector generated from the function conservityTable.

Usage

1
plotOverall(conserV)

Arguments

conserV

a vector with serveral number of conservity

Value

a plot to view the overall alignment's conservity

References

R - Bar Charts: Bar:Chart Labels, Title and Colors. Tutorialpoints-R Tutorial Link

Silva, A. (2020) TestingPackage: An Example R Package For BCB410H. Unpublished. Link

R Bar Plot (2018) DataMentor Getting Started in Data Science With R Link

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Example 1: Plot a conservity against of each position for testSeqShort

data(testSeqShort)
testSeq <- testSeqShort

# Use conservityTable() to create table for testSeqShort,
# and pass it to plotOverall() for plotting
table  <- conservityTable(testSeq)
oPar <- par(mar = c(2, 4, 2, 1)) # Set plot parameters to layout plot in center.
plotOverall(table)

# Example 2: Plot a conservity against of each position for raw data
# sampleSeq3.txt. This should takes longer time to run.
findpath <- system.file("extdata", "sampleSeq3.txt", package = "conservedPos")
rawSeq <- Biostrings::readBStringSet(findpath,"fasta")

# Use conservityTable() to create table for rawSeq,
# and pass it to plotOverall() for plotting
table <- conservityTable(rawSeq)
oPar <- par(mar = c(2, 4, 2, 1)) # Set plot parameters to layout plot in center.
plotOverall(table)

hezijin/conservedPos documentation built on Jan. 1, 2021, 3:18 a.m.