Last data update: 2014.03.03

R: phredDist: Global relative content of Phred values in Fastqq...
phredDistR Documentation

phredDist: Global relative content of Phred values in Fastqq objects (or subsets).

Description

The phredDist function returns a named vector with relative Phred content from the whole Fastqq object or a subset which is denoted by a index i. The plotPhredDist function produces a plot of the phredDist values.

Usage

phredDist(object, i)
plotPhredDist(object, i, maxp=45, col, ...)

Arguments

object

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

i

integer(optional): Index of FASTQ file(s) from which Phred values are counted. When value is missing, Phred counts for all contained data is returned.

maxp

numeric(optional): Value of maximal plotted phred value (right limit of x-axis).

col

Colour encoding for plotted lines.

...

Additional values passed to plot function.

Details

i must be a numerical vector with values in {1,...,nFiles}. The plotPhredDist function is also prepared for additional arguments: The maxp value denotes the maximal Phred value until which the Phred values are plotted (possibly shrinks the x-Axis). The standard line color is topo.colors(10)[3]. Additional arguments (e.g. main="") can be passed to the plot function.

Value

phredDist returns numeric. plotPhredDist returns nothing.

Author(s)

Wolfgang Kaisers

References

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"))
#
phredDist(fq)
plotPhredDist(fq, main="g4 and g5")
#

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/phredDist.Rd_%03d_medium.png", width=480, height=480)
> ### Name: phredDist
> ### Title: phredDist: Global relative content of Phred values in Fastqq
> ###   objects (or subsets).
> ### Aliases: phredDist phredDist-methods phredDist,Fastqq-method
> ###   plotPhredDist plotPhredDist-methods plotPhredDist,Fastqq-method
> ### Keywords: phredDist plotPhredDist
> 
> ### ** 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.
> #
> phredDist(fq)
           0            1            2            3            4            5 
0.0000000000 0.0000000000 0.0055940594 0.0000000000 0.0000000000 0.0003960396 
           6            7            8            9           10           11 
0.0006930693 0.0017326733 0.0009900990 0.0011386139 0.0017821782 0.0005445545 
          12           13           14           15           16           17 
0.0005445545 0.0005940594 0.0007425743 0.0013861386 0.0012871287 0.0014356436 
          18           19           20           21           22           23 
0.0034158416 0.0030198020 0.0034158416 0.0014851485 0.0009405941 0.0039108911 
          24           25           26           27           28           29 
0.0060396040 0.0078712871 0.0081188119 0.0074752475 0.0070297030 0.0152970297 
          30           31           32           33           34           35 
0.0184653465 0.0336633663 0.0265841584 0.0389603960 0.0860891089 0.1713861386 
          36           37           38           39           40           41 
0.0457425743 0.0784158416 0.0526732673 0.0928217822 0.1015346535 0.1667821782 
          42           43           44           45           46           47 
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 
          48           49           50           51           52           53 
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 
          54           55           56           57           58           59 
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 
          60           61           62           63           64           65 
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 
          66           67           68           69           70           71 
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 
          72           73           74           75           76           77 
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 
          78           79           80           81           82           83 
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 
          84           85           86           87           88           89 
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 
          90           91           92           93 
0.0000000000 0.0000000000 0.0000000000 0.0000000000 
> plotPhredDist(fq, main="g4 and g5")
> #
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>