Command line interface#

Command line interface for tskit.

usage: python3 -m tskit [-h] [-V]
                        {info,trees,upgrade,vcf,individuals,nodes,edges,sites,mutations,populations,migrations,provenances}
                        ...

Positional Arguments#

subcommand

Possible choices: info, trees, upgrade, vcf, individuals, nodes, edges, sites, mutations, populations, migrations, provenances

Named Arguments#

-V, --version

show program’s version number and exit

Sub-commands:#

info#

Print summary information about a tree sequence.

python3 -m tskit info [-h] tree_sequence

Positional Arguments#

tree_sequence

The tskit tree sequence file

trees#

Print information about trees.

python3 -m tskit trees [-h] [--precision PRECISION] [--draw] tree_sequence

Positional Arguments#

tree_sequence

The tskit tree sequence file

Named Arguments#

--precision, -p

The number of decimal places to print in records

Default: 6

--draw, -d

Draw the trees

Default: False

upgrade#

Upgrade legacy tree sequence files.

python3 -m tskit upgrade [-h] [--remove-duplicate-positions]
                         source destination

Positional Arguments#

source

The source tskit tree sequence file in legacy format

destination

The filename of the upgraded copy.

Named Arguments#

--remove-duplicate-positions, -d

Remove any duplicated mutation positions in the source file.

Default: False

vcf#

Convert the tree sequence genotypes to VCF format.

python3 -m tskit vcf [-h] [--ploidy PLOIDY] [--contig-id CONTIG_ID]
                     tree_sequence

Positional Arguments#

tree_sequence

The tskit tree sequence file

Named Arguments#

--ploidy, -P

If the tree sequence does not contain information about individuals, create them by combining adjacent samples nodes into individuals of the specified ploidy. It is an error to provide this argument if the tree sequence does contain individuals

--contig-id, -c

Specify the contig id

Default: “1”

individuals#

Output individuals in tabular format.

python3 -m tskit individuals [-h] [--precision PRECISION] tree_sequence

Positional Arguments#

tree_sequence

The tskit tree sequence file

Named Arguments#

--precision, -p

The number of decimal places to print in records

Default: 6

nodes#

Output nodes in tabular format.

python3 -m tskit nodes [-h] [--precision PRECISION] tree_sequence

Positional Arguments#

tree_sequence

The tskit tree sequence file

Named Arguments#

--precision, -p

The number of decimal places to print in records

Default: 6

edges#

Output edges in tabular format.

python3 -m tskit edges [-h] [--precision PRECISION] tree_sequence

Positional Arguments#

tree_sequence

The tskit tree sequence file

Named Arguments#

--precision, -p

The number of decimal places to print in records

Default: 6

sites#

Output sites in tabular format.

python3 -m tskit sites [-h] [--precision PRECISION] tree_sequence

Positional Arguments#

tree_sequence

The tskit tree sequence file

Named Arguments#

--precision, -p

The number of decimal places to print in records

Default: 6

mutations#

Output mutations in tabular format.

python3 -m tskit mutations [-h] [--precision PRECISION] tree_sequence

Positional Arguments#

tree_sequence

The tskit tree sequence file

Named Arguments#

--precision, -p

The number of decimal places to print in records

Default: 6

populations#

Output population information in tabular format.

python3 -m tskit populations [-h] tree_sequence

Positional Arguments#

tree_sequence

The tskit tree sequence file

migrations#

Output migration information in tabular format.

python3 -m tskit migrations [-h] [--precision PRECISION] tree_sequence

Positional Arguments#

tree_sequence

The tskit tree sequence file

Named Arguments#

--precision, -p

The number of decimal places to print in records

Default: 6

provenances#

Output provenance information in tabular format.

python3 -m tskit provenances [-h] [-H] tree_sequence

Positional Arguments#

tree_sequence

The tskit tree sequence file

Named Arguments#

-H, --human

Print out the provenances in a human readable format

Default: False