Skip to main content

CombosStat: A utility tool designed to compute shared data statistics for given combinations of data samples

Installation

python3 -m pip install combos_stat

Usage

combos_stat -h

1. stat

Usage: python -m combos_stat.bin.main stat [OPTIONS]

  Calculate statistics for shared data counts based on combinations of samples.

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:
    combos_stat stat -h
    combos_stat stat -i input.txt -o output.txt -n 13 -t intersection
    combos_stat stat -i input.txt -o output.txt -n 13 -t intersection --chunksize 100 --chunk 2 [read 101-200 lines]

2. plot

Usage: python -m combos_stat.bin.main 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:
    combos_stat plot -h
    combos_stat plot out/result
    combos_stat plot out/result --write boxplot.R
    combos_stat 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: python -m combos_stat.bin.main 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:
    combos_stat batch -h
    combos_stat batch -i input.txt -t 200000 -O out
    combos_stat batch -i input.txt -t 200000 --job run.job

Result

prefix

  • x: intersection
  • y: 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

result directory

result/
├── x2
│   └──x2_1.txt
├── y2
│   └──y2_1.txt
...
├── x14
│   ├── x14_1.txt
│   ├── x14_2.txt
│   ├── ...
│   └── x14_100.txt
...
└── y29
    └──y29_1.txt

Download files

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

Source Distribution

combos_stat-1.0.3.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

combos_stat-1.0.3-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file combos_stat-1.0.3.tar.gz.

File metadata

  • Download URL: combos_stat-1.0.3.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.8

File hashes

Hashes for combos_stat-1.0.3.tar.gz
Algorithm Hash digest
SHA256 9eae2908251aaa37e2e989f491cdd74022fbcf7069dd48429f43ec21e689c5af
MD5 0e2f241d038321e889ebe1ff6b84cfc6
BLAKE2b-256 da6ea3e84d7d2bb864ad3c1c8cd6e12a8a1d86d734447a1b252665bae31a7047

See more details on using hashes here.

File details

Details for the file combos_stat-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: combos_stat-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.8

File hashes

Hashes for combos_stat-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0f8fc08702bb3ba5a14cd6abcc8e969d00f7612c4af46c400c517ddfa8da8ecd
MD5 bc983b491bfaaacc08f1fe89d4f7bbe2
BLAKE2b-256 674c1f01cb17e0f3a6b200bbbc53ff9055f7f370310c181334033ff3ed168ea3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Supported by

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