Last data update: 2014.03.03

R: plotNucCount: Plots nucleotide counts from Fastqq objects.
plotNucCountR Documentation

plotNucCount: Plots nucleotide counts from Fastqq objects.

Description

The function creates plots from nucleotide counts from Fastqq objects.

Usage

plotNucCount(object, nucs=16, maxx,...)

Arguments

object

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

nucs

integer(optional): Index of nucleotides for which data is plotted. When value is missing, k-mer counts for all contained data is plotted.

maxx

integer(optional): When given, nucleotide counts are plotted for the first maxx nucleotide positions. This option is used for displaying detailed plots from the first read nucleotide positions (which are sometimes not equally distributed).

...

(currently unused).

Details

Values for i must be in {1,...,nFiles}. The nucs index encodes for IUPAC characters as shown in the following table.

1 A | 6 R | 11 M | 16 N
2 C | 7 Y | 12 B | 17 .
3 G | 8 S | 13 D | 18 -
4 T | 9 W | 14 H | 19 =
5 U | 10 K | 15 V | 20 ''

When count values for 'A' are to be plotted, 'nucs' must be =1. When count values for 'GC' are to be plotted, 'nucs' must be c(2,3).

Value

None.

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

See Also

Fastqq-class

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"))
#
plotNucCount(fq)
plotNucCount(fq, 1)
plotNucCount(fq, 1:2)
#

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/plotNucCount.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotNucCount
> ### Title: plotNucCount: Plots nucleotide counts from Fastqq objects.
> ### Aliases: plotNucCount plotNucCount-methods plotNucCount,Fastqq-method
> ### Keywords: plotNucCount kmer
> 
> ### ** 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.
> #
> plotNucCount(fq)
> plotNucCount(fq, 1)
> plotNucCount(fq, 1:2)
> #
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>