SamHeader: Return a SamHeader object

Description Usage Arguments Value Internal implementation See Also

View source: R/SamHeader.R

Description

S3 method that returns an S3 SamHeader objet.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
SamHeader(x, ...)

## S3 method for class 'character'
SamHeader(x, source = SamSource(NULL), ...)

## S3 method for class 'Sam'
SamHeader(x, ...)

## S3 method for class 'SamHeader'
as.data.frame(x, ...)

Arguments

x

For SamHeader(x), this is the object to extract or build a sam header object from. It can be a character vector of unparsed header lines or a Sam object. For as.data.frame(x), it can only be a SamHeader object.

...

Required for S3 object method implementation. Not currently used.

source

The SamSource object to associate with a header. If x is a Sam object, it will use that objects SamSource, otherwise it will use a default SamSource()

Value

For SamHeader(), a SamHeader object.

For as.data.frame(SamHeader), a data frame as generated by parseSamHeaderLines,

Internal implementation

A SamHeader object is supposed to be opaque to the user, with internals accesible via SamSource(x), as.data.frame(x), and areHeaderTagsParsed(x).

Currently this object is structured as a list with two elements: header which is the header data frame and areHeaderTagsParsed, which is TRUE when the record sub-tags are parsed parsed and FALSE otherwise. Currently this is always false. The object also has an attribute, source, which is the source object. This structure may change on a patch release with no notice.

See Also

Sam, SamSource, as.data.frame.SamSource


jefferys/SamSeq documentation built on Oct. 25, 2019, 8:11 a.m.