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

1
  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.

Author(s)

Vince Buffalo <vsbuffalo@ucdavis.edu>

See Also

basePlot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.