Last data update: 2014.03.03

R: mergedPhred functions: Retrieving and plotting of phred...
mergedPhredR Documentation

mergedPhred functions: Retrieving and plotting of phred quantities from whole Fastqq objects.

Description

The Fastqq objects contain position-wise counted phred values. The mergedPhred function adds the counted values for all FASTQ files together into a single matrix. The matrix then again contains position-wise counted phred values. The mergedPhredQuantiles and plotMergedPhredQuant are analogues to the phredQuantiles and plotPhredQuant functions.

Usage

mergedPhred(object)
mergedPhredQuantiles(object, quantiles)
plotMergedPhredQuant(object, main, ...)

Arguments

object

Fastqq: Object which contains collected values from nFiles FASTQ files.

quantiles

numeric: Vector of quantiles. All values must be in [0,1].

main

character: String wich is used as figure caption. Passed internally to plot function.

...

Optional arguments which are passed to the plot function in plotMergedPhredQuant.

Details

The function adds the phred values from all contained FASTQ data.

Value

mergedPhred returns a matrix with 94 rows and (maxSeqLen + 1) columns. mergedPhredQuantiles returns a data.frame with one row for each given quantile and max(seqLen(.)) columns. plotMergedPhredQuant returns nothing.

Author(s)

Wolfgang Kaisers

References

Cock PJA, Fields CJ, Goto N, Heuer ML, Rice PM The sanger FASTQ file format for sequences with quality scores and the Solexa/Illumina FASTQ variants. Nucleic Acids Research 2010 Vol.38 No.6 1767-1771 Ewing B, Green P Base-calling of automated sequencer traces using phred. II. Error probabilities. Genome Research 1998 Vol. 8 No. 3 186-194

Examples

basedir <- system.file("extdata",package="seqTools")
setwd(basedir)
fq <- fastqq(c("g4_l101_n100.fq.gz", "g5_l101_n100.fq.gz"), k=4, 
    probeLabel=c("g4", "g5"))
#
ph <- mergedPhred(fq)
ph[25:35, 1:15]
pq <- mergedPhredQuantiles(fq, c(0.25, 0.5, 0.75))
plotMergedPhredQuant(fq)
#

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(seqTools)
Loading required package: zlibbioc
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/seqTools/mergedPhred.Rd_%03d_medium.png", width=480, height=480)
> ### Name: mergedPhred
> ### Title: mergedPhred functions: Retrieving and plotting of phred
> ###   quantities from whole 'Fastqq' objects.
> ### Aliases: mergedPhred mergedPhred-methods mergedPhred,Fastqq-method
> ###   mergedPhredQuantiles mergedPhredQuantiles-methods
> ###   mergedPhredQuantiles,Fastqq-method plotMergedPhredQuant
> ###   plotMergedPhredQuant-methods plotMergedPhredQuant,Fastqq-method
> ### Keywords: mergedPhred mergedPhredQuantiles plotMergedPhredQuant
> 
> ### ** Examples
> 
> basedir <- system.file("extdata",package="seqTools")
> setwd(basedir)
> fq <- fastqq(c("g4_l101_n100.fq.gz", "g5_l101_n100.fq.gz"), k=4, 
+     probeLabel=c("g4", "g5"))
[fastqq] File ( 1/2) 'g4_l101_n100.fq.gz'	done.
[fastqq] File ( 2/2) 'g5_l101_n100.fq.gz'	done.
> #
> ph <- mergedPhred(fq)
> ph[25:35, 1:15]
    1  2  3 4  5  6  7  8  9 10 11 12 13 14 15
24  1  0  1 2  1  3  0  1  1  0  1  1  1  1  1
25  8  5  1 2  1  1  2  2  2  1  0  0  1  2  2
26  0  0  0 1  2  0  2  1  1  0  0  0  2  2  1
27  2  0  2 2  1  1  0  1  3  3  3  2  2  2  2
28  3  4  0 3  3  0  0  1  1  1  0  2  0  1  0
29  6  0  1 3  5  5  4  0  5  4  4  2  2  0  3
30 12  7  8 2  3  5  1  2  4  2  3  7  3  2  5
31 42 41 41 3  6  0  5  4  5  4  2  4  1  4  7
32  5  3  6 4 12  4  5 10  5  4 10  1  4  6  5
33 16 24 12 6  9 10  9  8  7 11  7  8  5  5  6
34 69 71 85 9 10 14 11  9 15  6 11 12 14 10  7
> pq <- mergedPhredQuantiles(fq, c(0.25, 0.5, 0.75))
> plotMergedPhredQuant(fq)
> #
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>