getEventsAtSite.GeneralDeletor: Title

Description Usage Arguments Value Author(s) See Also Examples

Description

Title.

This method generates a list containing a single deletion event object. 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.

Usage

1
2
## S3 method for class 'GeneralDeletor'
getEventsAtSite(this, target.site, ...)

Arguments

this

A GeneralDeletor object.

target.site

The target Site object.

...

Not used.

Value

A list of event objects.

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see GeneralDeletor.

Examples

 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 the Sequence object
	s<-NucleotideSequence(string="ATGCCCGGCGGATTTATTA");
	# create a GeneralDeletor object
	# proposed deletion length: 4, always accept
	d<-GeneralDeletor(
			name = "Del Bosque",
			rate = 0.5,
			propose.by=function(process, sequence, position){ 4 },
			accept.by=function(process, sequence, range){ TRUE }
 	)
	# attach process to site
	attachProcess(s,d);
	# set the rate multiplier
	setRateMultipliers(s,d,2)
	# get the list of active events at site 6
	events<-getEventsAtSite(d,s$sites[[6]])
	events;
	# print sequence
	s
	# set the position for the event object
	e<-events[[1]];
	e$.position<-6;
	# perform the deletion event
	Perform(e)
	# check the results
	s
 

phylosim documentation built on Nov. 22, 2019, 1:07 a.m.