FastFieldDeletor: The FastFieldDeletor class

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

Description

The DiscreteDeletor and ContinuousDeletor processes generate deletion event objects with rates determined by the general rate of the process and the "rate.multiplier" parameter. The probability of rejecting an event is determined by the product of the "deletion.tolerance" parameters from the affected sites. If the majority of the sites have low deletion tolerance most of the events are rejected, which slows down the simulation without performing much events.

The FastFieldDeletor process scales down the rate and length distribution of the proposed events based on the highest insertion tolerance value observed in the root sequence (see the package vignette for details), thus making the simulation more efficient.

The available length distributions are (see also the package vignette):

Insertion proceses can insert sites with deletion tolerance higher than the largest deletion tolerance observed in the root sequence. The user can specify the largest expected tolerance value through the toleranceMargin virtual field. The process is then scaled by max(initial_highest_tolerance, toleranceMargin).

Package:
Class FastFieldDeletor

Object
~~|
~~+--PSRoot
~~~~~~~|
~~~~~~~+--Process
~~~~~~~~~~~~|
~~~~~~~~~~~~+--GeneralInDel
~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~+--GeneralDeletor
~~~~~~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~~~~~~+--FastFieldDeletor

Directly known subclasses:

public static class FastFieldDeletor
extends GeneralDeletor

Usage

1
2
FastFieldDeletor(name="Anonymous", type="geometric", length.param.1=NA,
  length.param.2=NA, tolerance.margin=0, ...)

Arguments

name

Object name.

type

Type of the process (see above).

length.param.1

Object name.

length.param.2

Object name.

tolerance.margin

Object name.

...

Additional arguments.

Fields and Methods

Methods:

checkConsistency -
getEventsAtSite -
getLengthParam1 -
getLengthParam2 -
getToleranceMargin -
getType -
setLengthParam1 -
setLengthParam2 -
setParameterAtSite -
setToleranceMargin -
setType -
summary -

Methods inherited from GeneralDeletor:
checkConsistency, getEventsAtSite, is, summary

Methods inherited from GeneralInDel:
checkConsistency, getAcceptBy, getProposeBy, getRate, hasUndefinedRate, is, proposeLength, setAcceptBy, setProposeBy, setRate, summary

Methods inherited from Process:
!=, ==, as.character, checkConsistency, clone, getAlphabet, getEventsAtSite, getId, getName, getParameterAtSite, getSiteSpecificParamIds, getSiteSpecificParamList, getWriteProtected, hasSiteSpecificParameter, hasUndefinedRate, is, setAlphabet, setId, setName, setParameterAtSite, setSiteSpecificParamIds, setSiteSpecificParamList, 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

For more information see FastFieldDeletor.

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 a FastFieldDeletor object, default (geometric) type
	# length.param.1 is "lambda"
	p<-FastFieldDeletor(rate=1,length.param.1=0.9, tolerance.margin=0.8)
	# get type
	p$type
	# get object summary
	summary(p)
	# set/get lambda
	p$lengthParam1<-0.8
	p$lengthParam1
	# set/get tolerance margin
	p$toleranceMargin<-0.5
	p$toleranceMargin
	# create a nucleotide sequence, attach process
	s<-NucleotideSequence(length=30,processes=list(list(p)))
	# set state pattern
	s$states<-c("A","A","T","T","G","G","C","C")
	# sample deletion tolerances
	setDeletionTolerance(s,p,sample(seq(from=0,to=0.8,by=0.01),30,replace=TRUE))
	# plot deletion tolerance
	plotParametersAtSites(s,p,"deletion.tolerance")
	# simulate
	sim<-PhyloSim(root.seq=s, phylo=rcoal(2))
	Simulate(sim)
	# show alignment
	sim$alignment
 

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