getQual-methods: Get a Data Frame of Quality Data from a 'FASTQSummary' object

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

Description

An object of class FASTQSummary contains quality data (binned by readSeqFile). getQual is an accessor function that reshapes the data into a data frame.

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

Usage

1

Arguments

x

an S4 object of class FASTQSummary from readSeqFile.

Value

getQual returns a data.frame with columns:

position

the position in the read.

ymin

the minimum quality found per a position in the read.

alt.lower

the 10% quantile found per a position in the read.

lower

the 25% quartile found per a position in the read.

middle

the median found per a position in the read.

upper

the 75% quartile found per a position in the read.

alt.upper

the 90% quantile found per a position in the read.

ymax

the maximum quality found per a position in the read.

mean

the mean quality (calculated from the binned data by using a weighted mean function) per the position in the read.

Methods

signature(x="FASTQSummary")

getQual is an accessor function that only works if there is quality data, thus it only works with objects of class FASTQSummary.

Author(s)

Vince Buffalo <vsbuffalo@ucdavis.edu>

See Also

getGC, getSeqlen, getBase, getBaseProp, getMCQual, qualPlot

Examples

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

  ## Mean quality by position
  p <- ggplot(getQual(s.fastq)) + geom_line(aes(x=position, y=mean), color="blue")
  p <- p + scale_y_continuous(limits=c(0, 42))
  p

  ## A different type of quality plot
  p <- ggplot(getQual(s.fastq)) + geom_linerange(aes(x=position,
    ymin=lower, ymax=upper, color=mean))
  p <- p +  scale_color_gradient("mean quality", low="red", high="green")
  p + scale_y_continuous("quality")

qrqc documentation built on Nov. 8, 2020, 7:03 p.m.