GenericSeq-class: Class "GenericSeq"

Description Objects from the Class Slots Methods Author(s) See Also Examples

Description

This virtual class defines a generic sequence object composed by an identifier, a sequence and an alphabet that defines the letters of the sequence. A set of accessor methods and setters are described below.

Objects from the Class

A virtual Class: No objects may be created from it.

Slots

id:

Object of class "character" that identifies the sequence instance.

alphabet:

Object of class "character" that defines all the letters that a valid sequence can be made of.

sequence:

Object of class "character" storing the actual sequence string of the sequence instance.

Methods

alphabet

signature(object = "GenericSeq"): retrieves the alphabet of valid sequence letters, returned as characher.

id

signature(object = "GenericSeq"): retrieves the identifier of the sequence instance.

id<-

signature(object = "GenericSeq", value = "character"): sets the identifier of the sequence instance to value.

length

signature(x = "GenericSeq"): returns the length the sequence instance, i.e. the number of characters of the sequence string.

print

signature(x = "GenericSeq"): prints the sequence of the instance.

rev

signature(x = "GenericSeq"): return the reverse of the sequence string of the sequence instance.

seq

signature(... = "GenericSeq"): returns the sequence character string of the instance.

seq<-

signature(object = "GenericSeq", value = "character"): changes the sequence string of the sequence instance to value. The new string must be compatbile with the sequence instance alphabet.

show

signature(object = "GenericSeq"): displays the object content.

[

signature(x = "GenSeq"): Subsets the sequence of x and returns the correspong subsetted object of same class as x.

Author(s)

Laurent Gatto <lg390@cam.ac.uk>

See Also

See DnaSeq and RnaSeq classes for examples of subclasses and readFasta on how to create instances.

Examples

1
showClass("GenericSeq") 

Example output

Loading required package: Rcpp
This is package 'sequences'

Virtual Class "GenericSeq" [package "sequences"]

Slots:
                                    
Name:         id  alphabet  sequence
Class: character character character

Known Subclasses: "DnaSeq", "RnaSeq"

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