Description Usage Arguments Fields and Methods Author(s) See Also Examples
This is the class representing an event. Event objects usually are generated by the getEventsAtSite.*
methods based on the state of attached Site object and the properties of the generating Process object.
The Perform method will refuse to modify target objects if the position field is not set. The Perform method can be called only once for any Event object.
Package:
Class Event
Object
~~|
~~+--
PSRoot
~~~~~~~|
~~~~~~~+--
Event
Directly known subclasses:
public static class Event
extends PSRoot
1 |
name |
The name of the Event object. Often stores useful information. |
rate |
The rate of the event. |
site |
The associated Site object. |
position |
The position of associated Site object in the enclosing Sequence object (if any). |
process |
The generator Process object. |
handler |
The handler function for the Event object. It will be called by |
... |
Not used. |
Methods:
Perform | - | |
as.character | - | |
checkConsistency | - | |
getHandler | - | |
getName | - | |
getPosition | - | |
getProcess | - | |
getRate | - | |
getSite | - | |
getWriteProtected | - | |
is | - | |
setHandler | - | |
setName | - | |
setPosition | - | |
setProcess | - | |
setRate | - | |
setSite | - | |
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
Botond Sipos, Gregory Jordan
Site Process Sequence getEventsAtSite.GeneralSubstitution
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # Note: the following examples are not very useful
# unless you want to implement your own process.
# create a Sequence object and a Process object
seq<-NucleotideSequence(string="A");
p<-Process(alphabet=NucleotideAlphabet())
# get the Site object from the Sequence object
s<-seq$sites[[1]]
# attach p to s
attachProcess(s,p)
# create an Event object
e<-Event(name="A->G",rate=0.1,site=s,process=p,position=1)
# get object summary
summary(e)
# get event name
e$name
# set/get event rate
e$rate<-0.2
e$rate
# get site
e$site
# set/get event handler
e$.handler<-function(this){this$.site$state<-"G"}
e$handler
# perform the event
Perform(e)
# check the state of the target site
s$state
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.