Learn R Programming

qrqc (version 1.26.0)

getMCQual-methods: Get a Data Frame of Simulated Qualitied from a FASTQSummary object

Description

An object that inherits from class FASTQSummary contains base quality data by position gathered by readSeqFile. getMCQual generates simulated quality data for each base from this binned quality data that can be used for adding smoothed lines via lowess.

This accessor function is useful if you want to map variables to custom ggplot2 aesthetics.

Usage

getMCQual(x, n=100)

Arguments

x
an S4 object that inherits from FASTQSummary from readSeqFile.
n
a numeric value indicating the number of quality values to draw per base.

Value

getMCQual returns a data.frame with columns:
position
the position in the read.
quality
simulated quality scores.

Methods

signature(x = "FASTQSummary")
getMCQual is a function that works on any object with class FASTQSummary read in with readSeqFile.

See Also

getGC, getSeqlen, getBase, getBaseProp, getQual, qualPlot

Examples

Run this code
  ## Load a FASTQ file, with sequence hashing.
  s.fastq <- readSeqFile(system.file('extdata', 'test.fastq',
    package='qrqc'))

  # A custom quality plot
  ggplot(getQual(s.fastq)) + geom_linerange(aes(x=position, ymin=lower,
    ymax=upper), color="grey") + geom_smooth(aes(x=position, y=quality),
    data=getMCQual(s.fastq), color="blue", se=FALSE)

Run the code above in your browser using DataLab