Description Usage Arguments Value Author(s) See Also Examples
Generate insertion event object given the state of the target site.
This method generates a list with one insertion event. The rate of the event is calculated as the product of the general rate of the process and the "rate.multiplier" site-process specific parameter. An empty list is returned if the rate is zero or NA.
1 2 | ## S3 method for class 'GeneralInsertor'
getEventsAtSite(this, target.site, ...)
|
this |
A GeneralInsertor object. |
target.site |
A Site object. |
... |
Not used. |
A list of Event objects.
Botond Sipos, Gregory Jordan
GeneralInsertor GeneralInDel Process Event
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 | # create a sequence object
s<-NucleotideSequence(string="AAAA")
# create a GeneralInsertor process, provide template sequence.
# propsed insert lengths:3, always accept.
i<-GeneralInsertor(
rate=0.5,
template.seq=NucleotideSequence(string="GGG"),
propose.by=function(process){3},
accept.by=function(process,sequence,window){TRUE}
)
# attach process to site
s$processes<-list(list(i));
# set rate multiplier
setRateMultipliers(s,i,2)
# get the list of active events from site 2
events<-getEventsAtSite(i,s$sites[[2]])
events
# set postition for event
e<-events[[1]]
e$.position<-2
# print sequence
s
# perform event
Perform(e)
# check sequence again
s
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.