Documentation for SLiM function initializeGenomicElement, which is a method of the SLiM class Initialize. Note that the R function is a stub, it does not do anything in R (except bring up this documentation). It will only do anything useful when used inside a slim_block function further nested in a slim_script function call, where it will be translated into valid SLiM code as part of a full SLiM script.

initializeGenomicElement(genomicElementType, start, end)

Arguments

genomicElementType

An object of type integer or GenomicElementType object. See details for description.

start

An object of type integer. See details for description.

end

An object of type integer. See details for description.

Value

An object of type GenomicElement object.

Details

Documentation for this function can be found in the official SLiM manual: page 648.

Add a genomic element to the chromosome at initialization time. The start and end parameters give the first and last base positions to be spanned by the new genomic element. The new element will be based upon the genomic element type identified by genomicElementType, which can be either an integer, representing the ID of the desired element type, or an object of type GenomicElementType specified directly. Beginning in SLiM 3.3, this function is vectorized: the genomicElementType, start, and end parameters do not have to be singletons. In particular, start and end may be of any length, but must be equal in length; each start/end element pair will generate one new genomic element spanning the given base positions. In this case, genomicElementType may still be a singleton, providing the genomic element type to be used for all of the new genomic elements, or it may be equal in length to start and end, providing an independent genomic element type for each new element. When adding a large number of genomic elements, it will be much faster to add them in order of ascending position with a vectorized call. The return value provides the genomic element(s) created by the call, in the order in which they were specified in the parameters to initializeGenomicElement().

Author

Benjamin C Haller (bhaller@benhaller.com) and Philipp W Messer (messer@cornell.edu)

Examples

## This just brings up the documentation:
initializeGenomicElement()