Skip to content

LineageSampler

Tim Vaughan edited this page Jun 18, 2014 · 4 revisions

This is an inheritancePostProcessor which truncates all lineages at a particular time, randomly samples from among these new leaves and keeps only sampled leaves and their ancestors. The element has the following form:

    <inheritancePostProcessor spec='LineageSampler'
        nSamples="INTEGER"
        pSample="DOUBLE"
        samplingTime="DOUBLE"
        reverseTime="BOOLEAN"
        markAnnotation="STRING"
        noClean="BOOLEAN">

      <!-- zero or more populationSize elements -->

    </inheritancePostProcessor>

Either nSamples, pSample OR one or more populationSize elements are required. Specifying nSamples causes a maximum of that many lineages to be sampled. Specifying pSample causes each lineage to be sampled with a fixed probability. (The value of the pSample must be between 0 and 1.) Using populationSize elements instead causes the number of samples specified by those elements to be drawn from those particular populations. In both cases, the actual number drawn may be smaller than the specified number if the number of available lineages is smaller than that number.

The optional samplingTime attribute specifies a time at which the graph will be truncated, creating new leaf nodes at the points where extant lineages cross that time. The samples are then drawn from these nodes only. If this attribute is omitted, leaves are sampled from from the whole graph.

The optional reverseTime attribute (default value "false") specifies the time direction in which the graph is to be read, defining which nodes are ancestral to the others.

The optional markAnnotation attribute specifies that the sampled nodes and their ancestors should be annotated with the string provided. No other change to the graph is made if this attribute is present.

The optional noClean attribute (default value "false") determines whether or not LineageSampler will remove/clean singleton nodes that do not represent a state change from the generated tree.