Seq-class: Class '"Seq"'

Description Extends Fields Methods Author(s) See Also Examples

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

1
2
3
4
5
6
s <- Seq$new(id="My sequence",
             sequence="AGCAGCTACGACT",
             alphabet=c("A","C","G","T"))
s
s$rev()
s

Example output

Loading required package: Rcpp
This is package 'sequences'

Reference class  "Seq" 
Id: My sequence
Length: 13
Alphabet: ACGT
Sequence: AGCAGCTACGACT
Reference class  "Seq" 
Id: My sequence -- reversed
Length: 13
Alphabet: ACGT
Sequence: TCAGCATCGACGA

sequences documentation built on May 2, 2019, 6:45 a.m.