Skip to main content

Webapp to view and visualise the information structure in tskit ARGs

Project description

tsbrowse

Inspect large genetic genealogies (e.g. ARGs) stored in the tskit "succinct tree sequence" format, via a web app. Tsbrowse can scale to ARGs with millions of samples.

It is particularly useful to help evaluate ARGs that have been inferred using tools such as tsinfer, sc2ts, Relate, KwARG, Threads, etc.

Quickstart

First install tsbrowse from PyPI:

python -m pip install tsbrowse

A tskit tree sequence must first be preprocessed to a .tsbrowse file:

python -m tsbrowse preprocess /path/to/trees-file

This will write a .tsbrowse file that can then be viewed using the web app:

python -m tsbrowse serve /path/to/tsbrowse-file

This command will launch a web server that can be accessed at http://localhost:8080 in a web browser.

To display the genes track use:

python -m tsbrowse serve /path/to/tsbrowse-file --annotations-file genes.

(where genes.csv is a semicolon-separated text file containing a header and information about one gene per row in the order: chr;start;end;strand;ensembl ID;gene name)

An example tree sequence file can be found here: example.trees.

Tips

If you are using Windows Subsystem for Linux (WSL) you may need to disable Numba's CUDA support:

NUMBA_DISABLE_CUDA=1 python -m tsbrowse serve /path/to/tsbrowse-file

A PNG of a specific page in tsbrowse can be generated using the screenshot command:

python -m tsbrowse screenshot /path/to/tsbrowse-file mutations

Development

Test are run with pytest:

python -m pytest

To run the UI tests so you can see what the browser is doing use

python -m pytest --headed --slowmo 1000 tests/test_ui.py

playwright codegen is also useful for writing UI test code.

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

tsbrowse-0.0.3.tar.gz (394.8 kB view details)

Uploaded Source

Built Distribution

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

tsbrowse-0.0.3-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file tsbrowse-0.0.3.tar.gz.

File metadata

  • Download URL: tsbrowse-0.0.3.tar.gz
  • Upload date:
  • Size: 394.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for tsbrowse-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ebdd7b5d4eba9bd2f162779884473cc4613171df2bf0702d95e0a4def92d7ba9
MD5 05565368bbc7aeca30f18e5bc5a7bc74
BLAKE2b-256 5232a39425bfbf683f6a8189873ca153b4ff122f8f79112f28a343ddb4d0d0b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsbrowse-0.0.3.tar.gz:

Publisher: release.yml on tskit-dev/tsbrowse

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsbrowse-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: tsbrowse-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for tsbrowse-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 31f04a881b1af6821b62197bfef53d5657c55cb297e80183640efe6572f5b976
MD5 ec406aa70f34bcb9fad0c70a3502df0c
BLAKE2b-256 a9922ba4100cdde44a84c0649ab4ba505991e22cdf1847ac07c2a3da73094ee9

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsbrowse-0.0.3-py3-none-any.whl:

Publisher: release.yml on tskit-dev/tsbrowse

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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