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.
Documentation: https://tskit.dev/tsbrowse/docs/stable/ (latest: https://tskit.dev/tsbrowse/docs/latest/)
It is particularly useful to help evaluate ARGs that have been inferred using tools such as tsinfer, sc2ts, Relate, Threads, etc.
Quickstart
Installation
Install 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.csv
(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
Tests 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.
Citing tsbrowse
If you use tsbrowse in your work, please cite this paper
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tsbrowse-0.1.0.tar.gz.
File metadata
- Download URL: tsbrowse-0.1.0.tar.gz
- Upload date:
- Size: 397.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1975dfefa4692ebf024253ca2c3d0db568944a50ec68b5bac2e8da32cd178cbc
|
|
| MD5 |
2af257aa0f23e98e7a5053f388522772
|
|
| BLAKE2b-256 |
0e556b9bcabb3df2e2774336909814ff70a639b803e9a53cf64c5943ed6a729e
|
Provenance
The following attestation bundles were made for tsbrowse-0.1.0.tar.gz:
Publisher:
release.yml on tskit-dev/tsbrowse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tsbrowse-0.1.0.tar.gz -
Subject digest:
1975dfefa4692ebf024253ca2c3d0db568944a50ec68b5bac2e8da32cd178cbc - Sigstore transparency entry: 919551074
- Sigstore integration time:
-
Permalink:
tskit-dev/tsbrowse@bed194a4a5bd23087b821ecf73e7cab432a2bf10 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/tskit-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bed194a4a5bd23087b821ecf73e7cab432a2bf10 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tsbrowse-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tsbrowse-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26e37777ce3472459777ccc9ec14ad84e5f0dec3d21223d6da4a58c373da6454
|
|
| MD5 |
f981e250ffc34a8028eb5fdd030b6148
|
|
| BLAKE2b-256 |
bd011dbc59be4c19dd9b35da202502b8d5249ce47bdd9e34406d8852f54ce6f4
|
Provenance
The following attestation bundles were made for tsbrowse-0.1.0-py3-none-any.whl:
Publisher:
release.yml on tskit-dev/tsbrowse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tsbrowse-0.1.0-py3-none-any.whl -
Subject digest:
26e37777ce3472459777ccc9ec14ad84e5f0dec3d21223d6da4a58c373da6454 - Sigstore transparency entry: 919551077
- Sigstore integration time:
-
Permalink:
tskit-dev/tsbrowse@bed194a4a5bd23087b821ecf73e7cab432a2bf10 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/tskit-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bed194a4a5bd23087b821ecf73e7cab432a2bf10 -
Trigger Event:
release
-
Statement type: