Skip to main content

Encoding phylogenetic trees with summary statistics.

Project description

treesumstats

Representing phylogenetic trees (or forests of such trees) as summary statistics.

PyPI version PyPI downloads Docker pulls

Implemented summary statistics

Input data

One needs to supply a time-scaled phylogenetic tree in newick format. If the file contains several trees (one tree per line), it will be considered as a forest.

Installation

There are 4 alternative ways to run treesumstats on your computer: with docker, apptainer, in Python3, or via command line (requires installation with Python3).

Run in python3 or command-line (for linux systems, recommended Ubuntu 21 or newer versions)

You could either install python (version 3.9 or higher) system-wide and then install treesumstats via pip:

sudo apt install -y python3 python3-pip python3-setuptools python3-distutils
pip3 install treesumstats

or alternatively, you could install python (version 3.9 or higher) and treesumstats via conda (make sure that conda is installed first). Here we will create a conda environment called phyloenv:

conda create --name phyloenv python=3.9
conda activate phyloenv
pip install treesumstats

Basic usage in a command line

If you installed treesumstats in a conda environment (here named phyloenv), do not forget to first activate it, e.g.

conda activate phyloenv

Run the following command to calculate the summary statistics for an input tree tree.nwk and save them to an output tab-delimited file stats.tab. (The non-mandatory option --add_descriptions would add a column with statistics descriptions to the output table.)

treesumstats_encode --nwk tree.nwk --tab stats.tab --add_descriptions

Help

To see detailed options, run:

treesumstats_encode --help

Run with docker

Basic usage

Once docker is installed,

run the following command to calculate the summary statistics for an input tree tree.nwk and save them to an output tab-delimited file stats.tab. (The non-mandatory option --add_descriptions would add a column with statistics descriptions to the output table.)

docker run -v <path_to_the_folder_containing_the_tree>:/data:rw -t evolbioinfo/treesumstats --nwk /data/tree.nwk --tab /data/stats.tab --add_descriptions

This will produce a tab-delimited file stats.tab in the <path_to_the_folder_containing_the_tree> folder,

containing the summary statistic names in the statistic column, their values in the value column and their descriptions in the description column.

Help

To see advanced options, run

docker run -t evolbioinfo/treesumstats -h

Run with apptainer

Basic usage

Once apptainer is installed,

run the following command to calculate the summary statistics for an input tree tree.nwk and save them to an output tab-delimited file stats.tab. (The non-mandatory option --add_descriptions would add a column with statistics descriptions to the output table.)

apptainer run docker://evolbioinfo/treesumstats --nwk tree.nwk --tab stats.tab --add_descriptions

This will produce a tab-delimited file stats.tab,

containing the summary statistic names in the statistic column, their values in the value column and their descriptions in the description column.

Help

To see advanced options, run

apptainer run docker://evolbioinfo/treesumstats -h

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

treesumstats-0.1.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

treesumstats-0.1-py3-none-any.whl (39.7 kB view details)

Uploaded Python 3

File details

Details for the file treesumstats-0.1.tar.gz.

File metadata

  • Download URL: treesumstats-0.1.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.0

File hashes

Hashes for treesumstats-0.1.tar.gz
Algorithm Hash digest
SHA256 56c384a753f7300fc6f6eab94e33643a7463da9b33ca40d67d2366fb669da414
MD5 edbb034b15f9cce82da2400e68e085ae
BLAKE2b-256 cf5956a9b251c6b0821cf2f717fb7cda91accea483e30be4109e4d54d453f868

See more details on using hashes here.

File details

Details for the file treesumstats-0.1-py3-none-any.whl.

File metadata

  • Download URL: treesumstats-0.1-py3-none-any.whl
  • Upload date:
  • Size: 39.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.0

File hashes

Hashes for treesumstats-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 486acba864827351b351e9a10170e8f14673fc2fccaa1ec0358868ca5e5d4254
MD5 41c22cb2016b9227b4035fc304b9b9a7
BLAKE2b-256 aa9e0ab46589cb40f67d465a12d18c4468172a20db4841f74cd3e0512d463bc3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page