getBase-methods: Get a Data Frame of Base Frequency Data from a...

Description Usage Arguments Value Methods Author(s) See Also Examples

Description

An object that inherits from class SequenceSummary contains base frequency data by position gathered by readSeqFile. getBase is an accessor function that reshapes the base frequency data by position into a data frame.

This accessor function is useful if you want to map variables to custom ggplot2 aesthetics. Base proportions can be accessed with getBaseProp.

Usage

1

Arguments

x

an S4 object that inherits from SequenceSummary from readSeqFile.

drop

a logical value indicating whether to drop bases that don't have any counts.

Value

getBase returns a data.frame with columns:

position

the position in the read.

base

the base.

frequency

the number of a base found per position in the read.

Methods

signature(x = "SequenceSummary")

getBase is an accessor function that works on any object read in with readSeqFile; that is, objects that inherit from SequenceSummary.

Author(s)

Vince Buffalo <vsbuffalo@ucdavis.edu>

See Also

getGC, getSeqlen, getBaseProp, getQual, getMCQual, basePlot

Examples

1
2
3
4
5
6
7
  ## Load a FASTQ file, with sequence hashing.
  s.fastq <- readSeqFile(system.file('extdata', 'test.fastq',
    package='qrqc'))

  # A custom base plot
  ggplot(getBase(s.fastq)) + geom_line(aes(x=position, y=frequency,
    color=base)) + facet_grid(. ~ base) + scale_color_dna()

vsbuffalo/qrqc documentation built on May 3, 2019, 7:07 p.m.