Aug 2026
character-properties - Summarize and report sampled character properties.
character-properties summarize [OPTIONS] C1.PN.site-property-samples.jsonl [...]
character-properties report [OPTIONS] SUMMARY ALIGNMENT PROPERTY
character-properties positive-selection [OPTIONS] SUMMARY ALIGNMENT [PROPERTY]
The summarize command reads one JSON Lines property stream per MCMC chain and computes the posterior mean, standard deviation, and median of every named property for each ungapped observed sequence character. A sampled category/state pair selects a value from that sample's property table.
Rate properties use the substitution model's own scale, before
scaling inside PhyloCTMC. They do not necessarily average
to one.
The command writes one versioned JSON document to standard output.
Property means, population posterior standard deviations, and exact
empirical medians are keyed by sequence name and use zero-based
ungapped-sequence-character coordinates. Samples from all
input chains are pooled by draw; chains are not weighted equally after
taking separate means.
For an even number of observations, the empirical median is the lower of the two central observed values. This definition is preserved by monotone transformations: the median log-rate is the logarithm of the median rate. Exact medians are computed in memory-bounded character blocks by replaying the file prefixes observed during the initial moments pass. Records appended after that pass are ignored, so summarization can run while MCMC sampling continues. The command stops with an error if an observed prefix is subsequently modified, replaced with different contents, or truncated.
The two report commands project summarized letter properties onto a template alignment. Each stored value continues to identify a non-gap observed letter by sequence name and ungapped character index; an alignment column is only a presentation group.
The ordinary report command either describes every nonempty column or selects letters globally before grouping the selected letters by column. An above or highest selection uses the highest-scoring selected letter as the column representative. A below or lowest selection uses the lowest-scoring selected letter. Row ordering is applied only after representative selection.
With no selection option, report prints the minimum, lower middle, and maximum of both the per-letter posterior means and per-letter posterior medians in every column. These column-level middle values are distinct from the posterior median stored for each individual letter.
The positive-selection command reports both
model-averaged site support and, when available, support conditioned on
positiveSelectionInModel being true. For an above
selection, each column uses the letter with the highest probability of
positive selection, conditional on selection being present in the model.
If that conditional summary is unavailable, it uses the highest overall
probability. The column is retained if either probability for that
letter passes the threshold. Both summaries refer to that same letter.
The matching dN/dS statistics do not help choose it. The default
property is posSelection; names ending in
-posSelection use the corresponding -dNdS
property when it exists.
model-averaged-probability, three
model-averaged-dNdS-* fields, and the corresponding
conditioned-* fields. Conditioned fields are empty when
unavailable. Both formats use one-based coordinates.
The four selection options are mutually exclusive. Percentage
selection first sorts the N projected non-gap letters and takes
exactly max(1, floor(N*PERCENT/100)). Equal scores do not
enlarge the selection and have no defined secondary order. Multiple
selected letters can subsequently collapse into one alignment-column
row.
positiveSelectionInModel is true. If that condition is
absent, the command reports an error rather than silently changing the
requested report.
Iterations must be nonnegative and strictly increasing within each chain. Only newline-terminated JSON Lines records are committed to the initial file snapshot; an unterminated record being written at the end of a file is ignored. Retained samples must have identical property names, sequence names, and ungapped character counts. Every observed character must have a category/state pair in every retained sample. Category/state indices, property-table bounds, finite values, and cross-chain shapes are validated before a result is emitted.
Positive-selection properties and probability thresholds must lie in
[0,1]. A conditioned view with no true samples produces a
model-averaged report and leaves conditioned fields empty.
Summarize two chains:
character-properties summarize \
run-1/C1.P1.site-property-samples.jsonl run-2/C1.P1.site-property-samples.jsonl \
--skip=1000 --subsample=2 > P1.site-property-summary.json
Describe every alignment column for a rate property:
character-properties report \
P1.site-property-summary.json P1.initial.fasta rate
Select letters whose posterior median rate exceeds 2 and order the resulting column representatives from high to low:
character-properties report summary.json alignment.fasta rate \
--above=2 --by=median --sort=decreasing
Report the highest 1% of letters, always retaining at least one:
character-properties report summary.json alignment.fasta rate --highest
Report model-averaged positive selection together with estimates conditional on its presence in the model:
character-properties positive-selection \
P1.site-property-summary.json P1.initial.fasta --above=0.95
Report model-averaged foreground positive selection using the vertebrate mitochondrial genetic code:
character-properties positive-selection summary.json alignment.fasta \
foreground-posSelection --unconditional --alphabet='Codons(,mt-vert)'