Documentation for SLiM function treeSeqMetadata, which is a method of the SLiM class SLiMBuiltin. 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.

treeSeqMetadata(filePath, userData)

Arguments

filePath

An object of type string or logical. Must be of length 1 (a singleton). See details for description.

userData

An object of type string or logical. Must be of length 1 (a singleton). The default value is T. See details for description.

Value

An object of type Dictionary object. Return will be of length 1 (a singleton)

Details

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

Returns a Dictionary containing top-level metadata from the .trees (tree-sequence) file at filePath. If userData is T (the default), the top-level metadata under the SLiM/user_metadata key is returned; this is the same metadata that can optionally be supplied to treeSeqOutput() in its metadata parameter, so it makes it easy to recover metadata that you attached to the tree sequence when it was saved. If userData is F, the entire top-level metadata Dictionary object is returned; this can be useful for examining the values of other keys under the SLiM key (see section 27.4), or values inside the top-level dictionary itself that might have been placed there by msprime or other software. This function can be used to read in parameter values or other saved state (tag property values, for example), in order to resuscitate the complete state of a simulation that was written to a .trees file. It could be used for more esoteric purposes too, such as to search through .trees files in a directory (with the help of the Eidos function filesAtPath()) to find those files that satisfy some metadata criterion.

Author

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

Examples

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