Learn R Programming

phylosim (version 3.0.5)

ContinuousDeletor: The ContinuousDeletor class

Description

This class implements a process which performs deletions with lengths sampled from a user-specified R expression returning a numeric value. See GeneralDeletor for the how the deletion processes works.

Package: Class ContinuousDeletor

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

Directly known subclasses:

public static class ContinuousDeletor extends GeneralDeletor

Usage

ContinuousDeletor(name="Anonymous", rate=NA, dist=NA, max.length=NA, ...)

Arguments

name

The name of the object.

rate

The general rate.

dist

The length sampling expression.

max.length

Maximum event length.

...

Additional arguments.

Fields and Methods

Methods:

checkConsistency -
getDist -
getMaxLength -
plot -
setDist -
setMaxLength -
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

See Also

GeneralDeletor DiscreteDeletor GeneralInDel

Examples

Run this code
# NOT RUN {
 	# create a ContinuousDeletor process
       o<-ContinuousDeletor(
               name="Conty",
               rate=0.25,
		dist=expression(1),
		max.length=2
       )
       # get object summary
       summary(o)
       # set/get length sampling expression
       o$dist<-expression(rnorm(1,mean=3,sd=3))
	o$dist
       # set/get maximum event length
	o$maxLength<-4
	o$maxLength
       # plot length density
       plot(o)
     
       # The following code illustrates how to use
       # a ContinuousDeletor process in a simulation
     
       # create a sequence object, attach process o
       s<-NucleotideSequence(string="AAAAAAAAAAGGGGAAAAAAAAAA",processes=list(list(o)))
       # set the deletion tolerance to zero in range 11:15
       # creating a region rejecting all deletions
       setDeletionTolerance(s,o,0,11:15)     
       # get deletion tolerances
       getDeletionTolerance(s,o)
       # create a simulation object
       sim<-PhyloSim(root.seq=s,phylo=rcoal(2))
       # simulate
       Simulate(sim)
       # print resulting alignment
       sim$alignment
 
# }

Run the code above in your browser using DataLab