Jasentool
Multipurpose tool for jobs related to the JASEN pipeline and Bonsai.
Full documentation: jasentool.readthedocs.io.
Installation
pip install jasentool
Older Linux distributions (recommended: conda)
On hosts with glibc < 2.28 (Ubuntu < 18.04, RHEL/CentOS < 8, Debian < 10), pip can't find binary wheels for current pandas and numpy on Python 3.12, so it falls back to source builds that need GCC 9.3 or newer. Use conda instead; conda-forge ships compatible binaries:
git clone https://github.com/SMD-Bioinformatics-Lund/jasentool.git
cd jasentool
conda env create -f environment.yml
conda activate jasentool
environment.yml pulls the heavy dependencies (pandas, numpy, matplotlib, biopython, pysam, cyvcf2, openpyxl) from conda-forge, then installs jasentool itself in editable mode.
compare-distances uses cgmlst-dists (from bioconda) to build its distance matrices, and environment.yml includes it. It isn't a pip dependency, so pip install jasentool won't bring it in; get it through conda or build it yourself. Without it, compare-distances falls back to a slower pure-Python calculation.
Usage
jasentool <subcommand> [options]
Run jasentool --help to list subcommands, or jasentool <subcommand> --help for per-subcommand help.
Subcommands
Post-run analysis
| Subcommand | Description |
|---|---|
check-backup |
Cross-check Bonsai samples against the backup storage tree |
rebuild-manifests |
Rebuild Bonsai manifests from the backup storage tree |
rerun-chewbbaca |
Re-run chewBBACA AlleleCall on a check-backup masked-assemblies CSV |
compare-distances |
Build cgMLST distance matrices for two chewBBACA tables and their difference |
find |
Query samples from MongoDB |
identify-missing |
Identify samples absent from JASEN results directory |
validate-pipelines |
Compare pipeline outputs against MongoDB records |
Pipeline processes
| Subcommand | Description |
|---|---|
annotate-delly |
Annotate Delly structural-variant VCFs with gene symbols and locus tags |
concatenate-files |
Concatenate multiple YAML files (e.g. versions.yml) |
count-reads |
Count reads in FASTQ file(s) |
create-blacklist |
Aggregate minority base frequencies across BAMs to produce a blacklist TSV |
create-yaml |
Create YAML input file for Bonsai upload |
format-cdm |
Build a CDM input file from a sample manifest |
minority-report |
Compute minority base frequency distribution from a samtools mpileup file |
post-align-qc |
Compute post-alignment QC from BAM |
Site-specific hooks
| Subcommand | Description |
|---|---|
reformat-csv |
Reformat BJORN CSV/SH files for JASEN |
Setup & reference data
| Subcommand | Description |
|---|---|
converge-catalogues |
Merge WHO, TBdb, and FoHM TB mutation catalogues |
download-bigsdb |
Download cgMLST scheme alleles from PubMLST or BIGSdb |
download-ncbi |
Download genome FASTA and GFF from NCBI |
transform-file-format |
Convert cgMLST target TSV to BED format |
Quick examples
Query samples from MongoDB
jasentool find \
--query MySampleID \
--db-name mydb \
--db-collection samples \
--output-file results.json
Identify missing samples
jasentool identify-missing \
--output-file missing.json \
--db-name mydb \
--db-collection samples \
--analysis-dir /path/to/jasen/results
Validate pipeline outputs
jasentool validate-pipelines \
--input-dir /path/to/new/results \
--output-dir /path/to/validation/output \
--db-name mydb \
--db-collection samples
Cross-check backup storage
jasentool check-backup \
--profile staphylococcus_aureus \
--backup-dir /backup/jasen \
--db-name bonsai \
--db-collection samples \
--address mongodb://bonsai.host:27017/ \
-o backup_status.csv
Compute post-alignment QC
jasentool post-align-qc \
--sample-id SAMPLE_ID \
--bam-file SAMPLE.bam \
--output-file SAMPLE_qc.json \
[--bed-file regions.bed] \
[--cpus 4]
See the Usage docs for full details.
Metadata
Release files for jasentool 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jasentool-1.3.0.tar.gz | 133.0 kB | Without provenance | Details for jasentool-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jasentool-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for jasentool-1.3.0-py3-none-any.whl |
Total release size: 269.9 kB
Release files / jasentool-1.3.0.tar.gz
| Download URL | jasentool-1.3.0.tar.gz |
|---|---|
| Size | 133.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
619981753c5c860723f92c869872d3b37ce00914e8c33821bcc91c9dbd06bc01
|
|
BLAKE2b-256 checksum How to use checksums |
2f75825c3a94bee9abed5c16bcb4d1e3f86faa011c4f5175692597f682bb5516
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / jasentool-1.3.0-py3-none-any.whl
| Download URL | jasentool-1.3.0-py3-none-any.whl |
|---|---|
| Size | 136.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1d20a0136b8394c598c72861220b8b013232bfde97c3472cf8ae7537a048c83
|
|
BLAKE2b-256 checksum How to use checksums |
6e7af9ff3539d1975e1465223279b597d9be013576900f18842a8b6d9abcd872
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Security for jasentool 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.