Command line interface

tsdate provides a Command Line Interface to access the basic functionality of the Python API.

$ tsdate

or

$ python3 -m tsdate

The second command is useful when multiple versions of Python are installed or if the tsdate executable is not installed on your path.

Argument details

This is the command line interface for tsdate, a tool to date tree sequences.

usage: tsdate [-h] [-V] {date,preprocess} ...

Positional Arguments

subcommand Possible choices: date, preprocess

Named Arguments

-V, --version show program’s version number and exit

Sub-commands:

date

Takes an inferred tree sequence topology and returns a dated tree sequence.

tsdate date [-h] [-m MUTATION_RATE] [-r RECOMBINATION_RATE] [-e EPSILON]
            [-t NUM_THREADS] [--probability-space PROBABILITY_SPACE]
            [--method METHOD] [--ignore-oldest] [-p] [-v VERBOSITY]
            tree_sequence output Ne
Positional Arguments
tree_sequence The path and name of the input tree sequence from which we estimate node ages.
output The path and name of output file where the dated tree sequence will saved.
Ne estimated effective (diploid) population size.
Named Arguments
-m, --mutation-rate
 The estimated mutation rate per unit of genome per generation. If provided, the dating algorithm will use a mutation rate clock to help estimate node dates. Default: None
-r, --recombination-rate
 The estimated recombination rate per unit of genome per generation. If provided, the dating algorithm will use a recombination rate clock to help estimate node dates. Default: None
-e, --epsilon Specify minimum distance separating time points. Also specifies the error factor in time difference calculations. Default: 1e-6
-t, --num-threads
 The number of threads to use. A simpler unthreaded algorithm is used unless this is >= 1. Default: None
--probability-space
 Should the internal algorithm save probabilities in ‘logarithmic’ (slower, less liable to to overflow) or ‘linear’ space (faster, may overflow). Default: ‘logarithmic’
--method Specify which estimation method to use: can be ‘inside_outside’ (empirically better, theoretically problematic) or ‘maximization’ (worse empirically, especially with a gamma approximated prior, but theoretically robust). Default: ‘inside_outside’
--ignore-oldest
 Ignore the oldest node in the tree sequence, which is often of low quality when using empirical data.
-p, --progress Show progress bar.
-v, --verbosity
 How much verbosity to output.

preprocess

Remove regions without data from an input tree sequence.

tsdate preprocess [-h] [--minimum_gap MINIMUM_GAP]
                  [--trim-telomeres TRIM_TELOMERES] [-v VERBOSITY]
                  tree_sequence output
Positional Arguments
tree_sequence The tree sequence to preprocess.
output The path and name of output file where the preprocessed tree sequence will saved.
Named Arguments
--minimum_gap The minimum gap between sites to trim from the tree sequence. Default: ‘1000000’
--trim-telomeres
 Should all material before the first site and after the last site be trimmed, regardless of the length of these regions. Default: ‘True’
-v, --verbosity
 How much verbosity to output.