Learn R Programming

qrqc (version 1.26.0)

plotBases-methods: Plot Bases by Position

Description

plotBases plots the frequency or proportion of bases by position in the read.

plotBases uses the Sanger base color scheme: blue is Cytosine, green is Adenine, black is Guanine, red is Thymine, and purple in N (any base). Other IUPAC nucleotides are colored using RColorBrewer.

Usage

plotBases(obj, type="freq", bases=NULL, legend=TRUE)

Arguments

obj
an S4 object of class that inherits from SequenceSummary (either FASTASummary or FASTQSummary) from readSeqFile.
type
a character string that is either "freq" or "prop" indicating whether to plot frequencies or proportions on the y-axis.
bases
a vector of characters indicating which bases to include. The default value NULL indicates to plot _all_ bases.
legend
a logical value indicating whether to include a legend on the top right.

See Also

basePlot

Examples

Run this code
## Not run: 
#   ## Load a FASTQ file, with sequence hashing.
#   s.fastq <- readSeqFile(system.file('extdata', 'test.fastq', package='qrqc'))
# 
#   ## Plot base frequencies
#   plotBases(s.fastq, type="freq")
# 
#   ## Plot base proportions
#   plotBases(s.fastq, type="prop")
# ## End(Not run)

Run the code above in your browser using DataLab