SffHeader

Share:

Description

Class SffHeader contains meta-data stored in the header of the SFF files read in.

Objects from this class are the result of readSffHeader, or from the result of readSff. The resulting object will contain a header slot which is a list. If multiple sff files were processed by either of the above functions, this list will contain meta-data about each of these files in corresponding positions in the list.

Meta-data included is defined in the SFF file specifications and include:

filename:

The name of the file that was read in.

magic_number:

779314790, which encodes the string ".sff"

version:

Version number

index_offset:

An optional field which indicates the position of a read index within the file.

index_length:

An optional field which indicates the length of a read index within the file.

number_of_reads:

Stores the number of reads in the file.

header_length:

The number of bytes required by header fields.

key_length:

The length of the key sequence used for these reads.

number_of_flows_per_read:

The number of flows carried out during sequencing of the reads.

flowgram_format_code:

Indicates the format of the flowgram encoding. Currently "1" is the only valid value.

flow_chars:

Indicates the nucleotide bases used for each sequencing flow.

key_sequence:

Nucleotide sequence use for these reads.

Slots

header:

Object of class "list", containing data frames or lists of data frames summarizing a description of the SFF files.

Methods

header

signature(object = "SffHeader"): access the header slot of object, returning a list object.

Author(s)

Matt Settles <msettles@uidaho.edu>

See Also

SffReads,SffReadsQ.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
showClass("SffHeader")

## The readSffHeader can be used to extract header information from one or more sff files:
sffFiles = c(system.file("extdata", "SmallTorrentTest.sff", package = "rSFFreader"), 
             system.file("extdata","Small454Test.sff",package="rSFFreader"))
header <- readSffHeader(sffFiles)
header
header(header)[[1]]$number_of_reads
header(header)[[2]]$number_of_reads

## Header information is also retrieved when using readSff:
sff <- readSff(sffFiles)

## Number of flows for dataset 1 and 2:
header(sff)[[1]]$number_of_flows_per_read
header(sff)[[2]]$number_of_flows_per_read