This release is a pre-release and may not be stable for production use.
Enrich p-values
A simple script to compare p-values between a test and comparison dataset at a variety of p-value cutoffs. By plotting the enrichment score at a variety of cutoffs, it is possible to pick the optimal cutoff for your data.
Version: 1.0-beta2
Algorithm
For each p-value in the interval between max_pval (default: 0.05) and min_pval (default: 1e-15), we test at intervals of 1 and 5 for each order of magnitute, e.g. 0.05, 0.01, 0.005, 0.001, 5e-4, 1e-4, 5e-5, 1e-6, … 1e-15.
To test, we simply take all identities with a p-value less than the cutoff and compare them to all identities in the comparison set with p-values below the comp_set_pvalue. We simply ask what percentage or the test set are in the comparison set. We then do exactly the same with the entire set of identities in the comparison set that have a p-value greater than 0.98.
The identities are generally going to be gene or SNP names, but they can be anything (e.g. coordinates) as long as they overlap in the test and comparison data.
Installation
Install via PyPI:
pip install enrich_pvalues
Or install from github:
pip install https://github.com/TheFraserLab/enrich_pvalues/tarball/master
It should work with python 2 or 3, but python 3 is recommended.
Requirements
In requirements.txt, we use numpy, pandas, matplotlib, seaborn, tabulate, and tqdm.
Usage
First, dump a configuration file to describe your data:
enrich_pvalues dump-config enrich_atac.json
This will also print a help table describing each option. You need to describe your comparison data and your test data, and pick your p-value thresholds.
Next, split your comparison dataset into two tables: significant, and not-significant:
enrich_pvalues split -c enrich_atac.json --prefix atac /path/to/comp_data.txt.gz
Now, run the enrichment using those two tables and your test data:
enrich_pvalues run -c enrich_atac.json -o atac_scores.xls -p atac /path/to/test_data.txt
Note, the second to last argument is the prefix from the second step.
Finally, plot the data. This can also be done by passing e.g. --plot myplot.png to the run step.
enrich_pvalues plot --prefix caQTL atac_scores.xls atac_plot.pdf
Note: the scores can be excel format, pickled format, or text format, depending on the suffix. Also, the prefix in this plot step is different, it is used to title the plot only, and so can be whatever you want.
Metadata
Release files for enrich_pvalues 1.0b2
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 | |
|---|---|---|---|---|
| enrich_pvalues-1.0b2.tar.gz | 10.3 kB | Without provenance | Details |
Release files / enrich_pvalues-1.0b2.tar.gz
| Download URL | enrich_pvalues-1.0b2.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c475ea08ccce7299e6fa152784895d3fd2e781d53bd17275102ce9ce2fafeef
|
|
BLAKE2b-256 checksum How to use checksums |
faa36c6c9eaeb6cdee70e4ef5ab60e12343ba042d10647744dddbf9dce7918fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for enrich_pvalues 1.0b2
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.