Alphabet: The Alphabet class

Description Usage Arguments Fields and Methods Author(s) See Also Examples

Description

Class representing an alphabet (a set of symbols). Package:
Class Alphabet

Object
~~|
~~+--PSRoot
~~~~~~~|
~~~~~~~+--Alphabet

Directly known subclasses:
AminoAcidAlphabet, AnyAlphabet, BinaryAlphabet, CodonAlphabet, NucleotideAlphabet

public static class Alphabet
extends PSRoot

Usage

1
Alphabet(symbols=NA, type="Generic", ...)

Arguments

symbols

A character vector containing the symbols for the alphabet. All elements must have the same length and no duplicates are allowed. No element of the vector may contain the dash symbol, which is reserved for gaps.

type

An identifier for the Alphabet object.

...

Not used.

Fields and Methods

Methods:

!= -
== -
as.character -
checkConsistency -
getSize -
getSymbolLength -
getSymbols -
getType -
getWriteProtected -
hasSymbols -
is -
isEmpty -
setSize -
setSymbolLength -
setSymbols -
setType -
setWriteProtected -
summary -

Methods inherited from PSRoot:
checkConsistency, enableVirtual, getComments, getMethodsList, globalConsistencyCheck, intersect.list, is, is.na, ll, my.all.equal, plot, setComments, setMethodsList, summary, virtualAssignmentForbidden

Methods inherited from Object:
$, $<-, [[, [[<-, as.character, attach, attachLocally, clearCache, clearLookupCache, clone, detach, equals, extend, finalize, getEnvironment, getFieldModifier, getFieldModifiers, getFields, getInstantiationTime, getStaticInstance, hasField, hashCode, ll, load, names, objectSize, print, save

Author(s)

Botond Sipos, Gregory Jordan

See Also

Site Process Event BinaryAlphabet NucleotideAlphabet AminoAcidAlphabet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
		# create an alphabet object
		a<-Alphabet(type="Binary",symbols=c("0","1"));
		# print summary
		summary(a);
		# change the identifier
		a$type<-"Nucleotide";
		# change the symbol set
		a$symbols<-c("A","T","G","C");
		# print summary again
		summary(a);
		# clone the alphabet object
		b<-clone(a);
		# test the equality of the symbol sets
		a == b;
 

phylosim documentation built on May 29, 2017, 3:21 p.m.