Analytical framework for BS-seq data comparison and visualization
Project description
BSXplorer
Analytical framework for BS-seq data comparison and visualization.
For Python API reference manual and tutorials visit: https://shitohana.github.io/BSXplorer.
Installation
pip install bsxplorer
Console usage
- bsxplorer-metagene - Create Metagene report
- bsxplorer-category - Categorize regions by P_cg metric and render HTML-report
- bsxplorer-metagene - Visualize chromosome methylation levels and render HTML-report
Config file
All console scripts require configuration file – tab separated file with columns:
Column NAMES should NOT be INCLUDED in real configuration file.
| Group name | Path to report | Path to annotation | Flank length | Min region length | Genome type | Report type |
|---|---|---|---|---|---|---|
| Mock | mock-1.CX_report.txt | annotation.gff | 2000 | 0 | gff | bismark |
| Mock | mock-2.CX_report.txt | annotation.gff | 2000 | 0 | gff | bismark |
| Infected | infected-1.CX_report.txt | annotation.gff | 2000 | 0 | gff | bismark |
| Infected | infected-2.CX_report.txt | annotation.gff | 2000 | 0 | gff | bismark |
Columns with underlined are required.
Currently only gff genome_type and only bismark report_type are supported in colsole version of BSXplorer, although you still can read various formats from Python API.
bsxplorer-metagene
bsxplorer-metagene --help
usage: BSXplorer [-h] [-o NAME] [--dir DIR] [-m BLOCK_MB] [-t] [-s {wmean,mean,median,min,max,1pgeom}] [-u UBIN] [-d DBIN] [-b BBIN] [-q QUANTILE] [-C CONFIDENCE] [-S SMOOTH] [-H VRESOLUTION] [-V HRESOLUTION]
[--separate_strands] [--export {pdf,svg,none}] [--ticks TICKS TICKS TICKS TICKS TICKS]
config
Metagene report creation tool
positional arguments:
config Path to config file
optional arguments:
-h, --help show this help message and exit
-o NAME, --out NAME Output filename (default: Metagene_Report_12-02-24_10-48-20)
--dir DIR Output and working dir (default: $CWD)
-m BLOCK_MB, --block_mb BLOCK_MB
Block size for reading. (Block size ≠ amount of RAM used. Reader allocates approx. Block size * 20 memory for reading.) (default: 50)
-t, --threads Do multi-threaded or single-threaded reading. If multi-threaded option is used, number of threads is defined by `multiprocessing.cpu_count()` (default: False)
-s {wmean,mean,median,min,max,1pgeom}, --sumfunc {wmean,mean,median,min,max,1pgeom}
Summary function to calculate density for bin with. (default: wmean)
-u UBIN, --ubin UBIN Number of windows for upstream region (default: 50)
-d DBIN, --dbin DBIN Number of windows for downstream downstream (default: 50)
-b BBIN, --bbin BBIN Number of windows for body region (default: 100)
-q QUANTILE, --quantile QUANTILE
Quantile of most varying genes to draw on clustermap (default: 0.75)
-C CONFIDENCE, --confidence CONFIDENCE
Probability for confidence bands for line-plot. 0 if disabled (default: 0.95)
-S SMOOTH, --smooth SMOOTH
Windows for SavGol function. (default: 10)
-H VRESOLUTION Vertical resolution for heat-map (default: 100)
-V HRESOLUTION Vertical resolution for heat-map (default: 100)
--separate_strands Do strands need to be processed separately (default: False)
--export {pdf,svg,none}
Export format for plots (set none to disable) (default: pdf)
--ticks TICKS TICKS TICKS TICKS TICKS
Names of ticks (5 labels with ; separator in " brackets) (default: None)
bsxplorer-category
bsxplorer-category --help
usage: BSXplorer-Categorise [-h] [-o NAME] [--dir DIR] [-m BLOCK_MB] [-t] [-s {wmean,mean,median,min,max,1pgeom}] [-u UBIN] [-d DBIN] [-b BBIN] [-q QUANTILE] [-C CONFIDENCE] [-S SMOOTH] [-H VRESOLUTION] [-V HRESOLUTION]
[--separate_strands] [--export {pdf,svg,none}] [--ticks TICKS TICKS TICKS TICKS TICKS] [--cytosine_p CYTOSINE_P] [--min_cov MIN_COV] [--region_p REGION_P] [--save_cat | --no-save_cat]
config
BM, UM categorisation tool
positional arguments:
config Path to config file
optional arguments:
-h, --help show this help message and exit
-o NAME, --out NAME Output filename (default: Metagene_Report_12-02-24_10-51-50)
--dir DIR Output and working dir (default: $CWD)
-m BLOCK_MB, --block_mb BLOCK_MB
Block size for reading. (Block size ≠ amount of RAM used. Reader allocates approx. Block size * 20 memory for reading.) (default: 50)
-t, --threads Do multi-threaded or single-threaded reading. If multi-threaded option is used, number of threads is defined by `multiprocessing.cpu_count()` (default: False)
-s {wmean,mean,median,min,max,1pgeom}, --sumfunc {wmean,mean,median,min,max,1pgeom}
Summary function to calculate density for bin with. (default: wmean)
-u UBIN, --ubin UBIN Number of windows for upstream region (default: 50)
-d DBIN, --dbin DBIN Number of windows for downstream downstream (default: 50)
-b BBIN, --bbin BBIN Number of windows for body region (default: 100)
-q QUANTILE, --quantile QUANTILE
Quantile of most varying genes to draw on clustermap (default: 0.75)
-C CONFIDENCE, --confidence CONFIDENCE
Probability for confidence bands for line-plot. 0 if disabled (default: 0.95)
-S SMOOTH, --smooth SMOOTH
Windows for SavGol function. (default: 10)
-H VRESOLUTION Vertical resolution for heat-map (default: 100)
-V HRESOLUTION Vertical resolution for heat-map (default: 100)
--separate_strands Do strands need to be processed separately (default: False)
--export {pdf,svg,none}
Export format for plots (set none to disable) (default: pdf)
--ticks TICKS TICKS TICKS TICKS TICKS
Names of ticks (5 labels with ; separator in " brackets) (default: None)
--cytosine_p CYTOSINE_P
P-value for binomial test to consider cytosine methylated (default: .05)
--min_cov MIN_COV Minimal coverage for cytosine to keep (default: 2)
--region_p REGION_P P-value for binomial test to consider region methylated (default: .05)
--save_cat, --no-save_cat
Does categories need to be saved (default: True) (default: True)
bsxplorer-chr
bsxplorer-chr --help
usage: BSXplorer-ChrLevels [-h] [-o NAME] [--dir DIR] [-m BLOCK_MB] [-t THREADS] [-w WINDOW] [-l MIN_LENGTH] [-C CONFIDENCE] [-S SMOOTH] [--export {pdf,svg,none}] [--separate_strands] config
Chromosome methylation levels visualisation tool
positional arguments:
config Path to config file
optional arguments:
-h, --help show this help message and exit
-o NAME, --out NAME Output filename (default: Metagene_Report_12-02-24_10-52-40)
--dir DIR Output and working dir (default: $CWD)
-m BLOCK_MB, --block_mb BLOCK_MB
Block size for reading. (Block size ≠ amount of RAM used. Reader allocates approx. Block size * 20 memory for reading.) (default: 50)
-t THREADS, --threads THREADS
Do multi-threaded or single-threaded reading. If multi-threaded option is used, number of threads is defined by `multiprocessing.cpu_count()` (default: True)
-w WINDOW, --window WINDOW
Length of windows in bp (default: 1000000)
-l MIN_LENGTH, --min_length MIN_LENGTH
Minimum length of chromosome to be analyzed (default: 1000000)
-C CONFIDENCE, --confidence CONFIDENCE
Probability for confidence bands for line-plot. 0 if disabled (default: 0.95)
-S SMOOTH, --smooth SMOOTH
Windows for SavGol function. (default: 10)
--export {pdf,svg,none}
Export format for plots (set none to disable) (default: pdf)
--separate_strands Do strands need to be processed separately (default: False)
Project details
Release history Release notifications | RSS feed
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 bsxplorer-1.0.0rc4.tar.gz.
File metadata
- Download URL: bsxplorer-1.0.0rc4.tar.gz
- Upload date:
- Size: 73.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24d3ff77f566c4eb406b07de38fa30389be93bbe93fae55f344bb02a8e663051
|
|
| MD5 |
7acdb0671cd74fe41732798df3129321
|
|
| BLAKE2b-256 |
044b2b739f656a24d9a6b187ffc8d18a6cec8d497a4c8d808507e8c24caa008e
|
File details
Details for the file bsxplorer-1.0.0rc4-py3-none-any.whl.
File metadata
- Download URL: bsxplorer-1.0.0rc4-py3-none-any.whl
- Upload date:
- Size: 79.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c76d9c3ece903f6a1a061d417df854d977bfebd01947271d3d28584977c36ac2
|
|
| MD5 |
714adc66f5c2e14670ccb9a92ae66e00
|
|
| BLAKE2b-256 |
d0470f79d137c04773af12437d5ec4695caeb6c4e635fe2102842a9add6c3b7d
|