getGC-methods: Get a Data Frame of GC Content from a 'SequenceSummary'...

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. getGC is an accessor function that reshapes the base frequency data into a data frame and returns the GC content by position.

This accessor function is useful if you want to map variables to custom ggplot2 aesthetics. Frequencies or proportions of all bases (not just GC) can be accessed with getBase and getBaseProp respectively.

Usage

1
  getGC(x)

Arguments

x

an S4 object that inherits from SequenceSummary from readSeqFile.

Value

getGC returns a data.frame with columns:

position

the position in the read.

gc

GC content per position in the read.

Methods

signature(x = "SequenceSummary")

getGC 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

getSeqlen, getBase, getBaseProp, getQual, getMCQual, getKmer, gcPlot

Examples

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

  # A custom GC plot
  d <- merge(getQual(s.fastq), getGC(s.fastq), by.x="position", by.y="position")
  p <- ggplot(d) + geom_linerange(aes(x=position, ymin=lower,
    ymax=upper, color=gc)) + scale_color_gradient(low="red",
    high="blue") + scale_y_continuous("GC content")
  p

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