PanStat: A Python toolkit for the statistical and visualization of core and pan genes in Pan-genome
Installation
python3 -m pip install panstat
Usage
panstat -h
1. stat
Usage: panstat stat [OPTIONS]
Calculate statistics for core and pan genes
Options:
-i, --input-file PATH Path to the input data file [required]
-o, --output-file PATH Path where the results will be saved [default: output_stat.txt]
-n, --num-samples INTEGER Number of samples to compute [required]
-t, --share_type [intersection|union]
Type of share to compute
--header INTEGER Row number to use as the column names [default: 0]
--sep TEXT Delimiter to use for reading the input file (e.g., "\t" for tab)
--start-col INTEGER Column index to start reading sample data from [default: 1]
--show-progress BOOLEAN Show progress
--chunksize INTEGER The chunksize lines to read
--chunk INTEGER The index of chunk
-h, -?, --help Show this message and exit.
examples:
panstat stat -h
panstat stat -i input.txt -o output.txt -n 13 -t intersection
panstat stat -i input.txt -o output.txt -n 13 -t intersection --chunksize 100 --chunk 2 [read 101-200 lines]
2. plot
Usage: panstat plot [OPTIONS] RESULT_DIR
Generate Boxplot with statistics results
Options:
-R, --Rscript TEXT Path to the executable Rscript [default: Rscript]
-w, --write TEXT Write the R code to a file
--option TEXT Options in the format key=value for boxplot, eg. title="Demo Stats", x_lab="Shared_Numbers",
y_lab="Data"
-h, -?, --help Show this message and exit.
examples:
panstat plot -h
panstat plot out/result
panstat plot out/result --write boxplot.R
panstat plot out/result --write boxplot.R --option x_lab=XXX --option width=30 --option dpi=500
default options:
infile = 'processed_stats.tsv'
output = 'boxplot'
x_lab = 'Genomes'
y_lab = 'Families'
title = 'BoxPlot'
legend_title = 'Type'
dpi = 300
width = 14
height = 7
3. batch
Usage: panstat batch [OPTIONS]
Generate batch shells and SJM job
Options:
-i, --input-file PATH Path to the input data file
-sep, --sep TEXT Delimiter to use for reading the input file (e.g., "\t" for tab)
-s, --start-col INTEGER Column index to start reading sample data from [default: 1]
-t, --threshold INTEGER The threshold to divide the combinations [default: 200000]
-O, --output-dir PATH Path to the output directory [default: .]
--job TEXT Generate SJM Job
--no-check Do not check queues for SJM
-h, -?, --help Show this message and exit.
examples:
panstat batch -h
panstat batch -i input.txt -t 200000 -O out
panstat batch -i input.txt -t 200000 --job run.job
Result
prefix
- x: core genes (intersection)
- y: pan genes (union)
shell directory
shell/
├── plot.sh
├── x2
│ └──stat.x2_1.sh
├── y2
│ └──stat.y2_1.sh
...
├── x14
│ ├── stat.x14_1.sh
│ ├── stat.x14_2.sh
│ ├── ...
│ └── stat.x14_100.sh
...
└── y29
└──stat.y29_1.sh
statistical result
result/
├── x2
│ └──x2_1.txt
├── y2
│ └──y2_1.txt
...
├── x14
│ ├── x14_1.txt
│ ├── x14_2.txt
│ ├── ...
│ └── x14_100.txt
...
└── y29
└──y29_1.txt
visualization result
processed_stats.tsv
plot.R
pointplot.png
pointplot.pdf
Metadata
Release files for panstat 1.0.4
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 |
|---|---|---|---|---|
| panstat-1.0.4.tar.gz | 13.7 kB | Without provenance | Details for panstat-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| panstat-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for panstat-1.0.4-py3-none-any.whl |
Total release size: 31.1 kB
Release files / panstat-1.0.4.tar.gz
| Download URL | panstat-1.0.4.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f0a0e880c0156782483efd677817d4fb7dea6ecb8376893c506af2625cde2d1
|
|
BLAKE2b-256 checksum How to use checksums |
f4a18e09fcca63a6674da6a8f104f4e2a3de1911427e7eefc5101ad1073e3d0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.8
|
Release files / panstat-1.0.4-py3-none-any.whl
| Download URL | panstat-1.0.4-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2e151298ca31aeb111ee4764998934d18c299a19d0a14cc91dd6f059953f48e
|
|
BLAKE2b-256 checksum How to use checksums |
c56b933c6f44fea4704e8e43a885bcf171edbbaba8eaa975f5a042ca21803298
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.8
|
Security for panstat 1.0.4
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.