Seq-class: Class '"Seq"'

Seq-classR Documentation

Class "Seq"

Description

The Seq class implements a nucleic acid sequence as well as various sequence transformations. It's aim is to illustrate the usage of reference classes.

Extends

All reference classes extend and inherit methods from "envRefClass".

Fields

id:

Object of class character defining the sequence identifier.

alphabet:

Object of class character defining the sequence alphabet.

sequence:

Object of class character with the actual sequence string.

Methods

transcribe():

Transcribes a DNA sequence into RNA.

seq():

Retuns the sequence string.

comp():

Complements the sequence.

rev():

Reverses the sequence.

valid():

Checks sequence validity.

setAlphabet():

Sets the sequence alphabet.

show():

Shows the 'Seq' instance.

Author(s)

Laurent Gatto <lg390@cam.ac.uk>

See Also

DnaSeq for a S4 implementation of the same subject.

Examples

s <- Seq$new(id="My sequence",
             sequence="AGCAGCTACGACT",
             alphabet=c("A","C","G","T"))
s
s$rev()
s

lgatto/sequences documentation built on Feb. 27, 2024, 11:11 p.m.