A multiple hypothesis testing tool for pre-screening high-dimensional data using the Leave-n-Out approach.
Project description
lno-prescreener
A high-performance, multiple hypothesis testing tool for pre-screening factor selection in high-dimensional data using the Leave-n-Out (LnO) approach.
Designed for researchers working with metabolomic, genomic, or clinical datasets, this library provides a robust, multi-core pipeline to filter out false discoveries using adaptive univariate testing and combinatorial resampling.
FEATURES
- Scientifically Rigorous: Implements an adaptive decision tree (Anderson-Darling, Levene, KS, Mann-Whitney, t-tests) perfectly aligned with established LnO methodology.
- Highly Flexible: Works with any Pandas DataFrame. You can define your own target columns, cohort labels, and index parameters.
- Multi-Core Processing: Utilizes joblib parallel processing to evaluate thousands of features simultaneously, cutting compute times from hours to seconds.
- Missing Data Handling: Automatically purges incomplete features to maintain strict data integrity.
- Defensive Design: Explicit input validation prevents obscure math crashes and provides clear, human-readable errors if your data is misconfigured.
INSTALLATION
You can install lno-prescreener directly from PyPI: pip install lno-prescreener
QUICK START
Here is a concise example of how to load your data and run the pre-screener pipeline.
from lno_prescreener import LnOPrescreener
Initialize the pre-screener
screener = LnOPrescreener( data_input="sqrt_transformed_data.csv", target_variable="Diagnosis", case_label="ASD", control_label="TD", index_col=0 #(int or None) The column number to use as the row labels (default: 0). Set to None if your data does not have an ID column. )
Run the multiple hypothesis testing pipeline
results = screener.multiple_hypothesis_testing( run_l2o=False, run_l3o=True, fdr_threshold=0.1, p_val_threshold=0.05 )
Save the full comprehensive results to CSV
results.to_csv("prescreening_results.csv", index=False)
API REFERENCE
Initialization LnOPrescreener(data_input, target_variable='Diagnosis', case_label='ASD', control_label='TD', index_col=0)
- data_input: (str or DataFrame) Path to your CSV file, or a pre-loaded Pandas DataFrame.
- target_variable: (str) The exact name of the column containing your class labels.
- case_label: (str) The exact string used to identify cases in the target column.
- control_label: (str) The exact string used to identify controls in the target column.
- index_col: (int or None) The column number to use as the row labels (default: 0). Set to None if your data does not have an ID column.
Execution screener.multiple_hypothesis_testing(run_l2o=False, run_l3o=False, p_val_threshold=0.05, fdr_threshold=0.10)
- run_l2o: (bool) If True, runs the Leave-2-Out permutation tests. Note: Computationally expensive for large N.
- run_l3o: (bool) If True, runs the Leave-3-Out permutation tests. Note: Highly computationally expensive for large N.
- p_val_threshold: (float) The alpha threshold for the baseline and adaptive univariate tests (default: 0.05).
- fdr_threshold: (float) The maximum allowable False Discovery Rate for a feature to be flagged as significant (default: 0.10).
OUTPUT DATAFRAME The multiple_hypothesis_testing method returns a rich Pandas DataFrame containing:
- The original and shifted p-values.
- The specific statistical test applied by the adaptive decision tree.
- Bonferroni and Benjamini-Hochberg corrected p-values.
- Raw FDR scores and boolean Significant flags for Baseline, L1O, L2O, and L3O.
Project details
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 lno_prescreener-0.1.2.tar.gz.
File metadata
- Download URL: lno_prescreener-0.1.2.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f946cf13dac9156bc3d0de970751d1d93c838057c7ae6ec3628eaadf77511fc
|
|
| MD5 |
a26d2a390d0b452cd176baa11a26ef9e
|
|
| BLAKE2b-256 |
19af88ee28b772f80820f251d48ef4cbdf36d19d38b8d6cd44911023b0f8e452
|
File details
Details for the file lno_prescreener-0.1.2-py3-none-any.whl.
File metadata
- Download URL: lno_prescreener-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09f111174309f3ea31cfbcbacb04c11716583f94f9f67b3e4009876fdea2b0cc
|
|
| MD5 |
9050759d7b81fcc853e2942360d9f322
|
|
| BLAKE2b-256 |
3f3e4ee2bbdbe2ad3bca4b238a501940ac25c15df21d4de4dccb64b07ca8d8a8
|