GenericSeq-class: Class "GenericSeq"

GenericSeq-classR Documentation

Class "GenericSeq"

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

showClass("GenericSeq") 

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