Class "SffReadsQ" for next generation reads stored in SFF files (Roche 454 and Life Sciences Ion Torrent) and their quality scores

Share:

Description

SffReadsQ class is a container for storing, next-generation sequencing read data, read id, and sequencing quality information imported directly from SFF files generated by technologies such as Roche 454 and Life Sciences Ion Torrent. This class provides a way to store and manipulate, in a coordinated fashion, next generation reads stored in SFF files, their identifiers and quality scores.

Objects from this class are the result of readSff, or can be constructed from DNAStringSet, QualityScore, and BStringSet objects, using a call to the constructor SffReadsQ, as described below.

Usage

1
2
3
## Constructor:

SffReadsQ(sread, quality, qualityIR, adapterIR, customIR, clipMode="raw", header)

Arguments

sread

an object of class "DNAStringSet" representing the sequence data.

quality

an object of class "BStringSet", or "FastqQuality" representing the quality values associated with the sequence in sread.

qualityIR

an object of type "IRanges" object, specifying the quality clip points.

adapterIR

an object of type "IRanges" object, specifying the adapter clip points.

customIR

an object of type "IRanges" object, specifying the user custom clip points.

## qualityIR, adapterIR, and customIR are allowed to by empty

clipMode

a character string specifying the clipping mode to use for the object, see availableClipModes for more information.

header

a list object with sff header information, see readSffHeader for more information.

Slots

Slot header is inherited from SffHeader. Slots sread, qualityIR, adapterIR, customIR and clipMode are inherited from SffReads. An additional slot defined in this class is:

quality:

Object of class "BStringSet" representing a quality score (see readFastq for some discussion of quality score).

Extends

Class "SffReads", directly. Class "SffHeader", by class "SffReads", distance 2.

Methods

quality

inherited from signature(object = "ANY"): access the quality slot of object.

[

signature(x = "SffReads", i = "ANY", j = "missing"): This method creates a new SffReads object containing only those reads indexed by i. Additional methods on ‘[,SffReads’ do not provide additional functionality, but are present to limit appropriate use.

writeFastaQual

signature(object = "SffReadsQ"): ...

writeFastq

signature(object = "SffReadsQ", file = "character", mode="character", ...): Write object to file in fastq format. mode defaults to ‘w’. This creates a new file, or fails if file already exists. Use mode="a" to append to an existing file. file is expanded using path.expand.

writePhredQual

signature(object = "FastqQuality", filepath, mode="w")

writePhredQual

signature(object = "SffReadsQ", filepath, mode="w"): Write object's quality values to filepath in phred qual format (numeric). append defaults to ‘w’. This creates a new file, or fails if filepath already exists. Use mode="a" to append to an existing file. filepath is expanded using path.expand.

writeFastaQual

signature(object = "SffReadsQ", basefilename = "character", append="logical", ...): Write object to basefilename in fasta and phred qual format. append defaults to ‘FALSE’. This creates a new file, or fails if basefilename already exists. Use append=TRUE to append to an existing file. basefilename is expanded using path.expand and the suffixes [basefilename].fasta (sequence) and [basefilename].fasta.qual (qualities) are added.

append

signature(x = "SffReadsQ", values = "SffReads"): append the sread, quality and id slots of values after the corresponding fields of x.

Author(s)

Matt Settles with lots of code 'borrowed' from Martin Morgan's ShortRead Package

See Also

readSff for creation of objects of this class from SFF files.

Examples

1
2
3
4
5
6
7
8
showClass("SffReadsQ")
showMethods(class="SffReadsQ", where=getNamespace("rSFFreader"),
            inherit=FALSE)
showMethods(class="SffReads", where=getNamespace("rSFFreader"),
            inherit=FALSE)

sff <- readSff(system.file("extdata","Small454Test.sff",package="rSFFreader"))
quality(sff)