A High-Hygiene Explainable AI and Patient-Centric Uniqueness Framework for Breast Cancer Subtyping
Project description
OncoResolve: Reusable Python Bioinformatics Package
A High-Hygiene Explainable AI and Patient-Centric Uniqueness Framework for Breast Cancer Subtyping. This package allows you to clean custom transcriptomic matrices, run PAM50 predictions using pre-trained TCGA models, compute N-of-1 patient Uniqueness scores (CUS), and predict overall survival risk scores (CRS).
Installation
Local development install
From the root of this project folder:
pip install -e .
Direct install from GitHub
pip install git+https://github.com/shubhamkjha369/OncoResolve.git
Reusable Library Usage
Once installed, you can import the package using capital OncoResolve:
import OncoResolve as orr
import pandas as pd
# 1. Prepare and Harmonize your custom RNA-seq expression matrix (genes as columns)
# Pass in the path to the tcga_entrez_to_hugo.pkl mapping file
df_clean = orr.harmonize_namespaces(df_raw, "path/to/tcga_entrez_to_hugo.pkl")
df_scaled = orr.scale_cohort(df_clean)
# Load the required features list directly from the pre-trained model metadata
# and align columns alphabetically (filling missing genes with 0.0)
required_features = sorted(orr.OncoPrognosis().model_.summary.index.tolist())
# Alternatively, use a custom list of consensus genes:
# required_features = list(pd.read_parquet("path/to/final_consensus_biomarkers.parquet")["gene"])
df_aligned = orr.align_features(df_scaled, required_features)
# 2. Run classification using pre-trained SVM or Logistic Regression models
# Note: Since models are bundled, you don't need to specify paths to load pre-trained models!
clf = orr.OncoClassifier(model_type="svm")
predictions = clf.predict(df_aligned) # Returns PAM50 subtype strings
probabilities = clf.predict_proba(df_aligned) # Returns class probabilities DataFrame
# 3. Compute Patient Uniqueness Scores (CUS)
df_cus = orr.compute_cus(df_aligned, barcodes=df_aligned.index, alpha=0.001)
# 4. Predict Overall Survival Risk Scores (Consensus Cox CRS)
# Note: Since survival models are bundled, no path specification is required!
prog = orr.OncoPrognosis()
risk_scores = prog.predict_risk(df_aligned)
Authors
- Shubham Jha (shubhamkjha369@gmail.com)
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 oncoresolve-1.0.0.tar.gz.
File metadata
- Download URL: oncoresolve-1.0.0.tar.gz
- Upload date:
- Size: 714.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66cbb666d50de27b73dd1d4d6df04ab406579fd1011ee56ed3be908bc58c3dab
|
|
| MD5 |
ee7bec3712dfcc14550fca02c9d26587
|
|
| BLAKE2b-256 |
65c09464cbf93cf3f8f07645e54761ca352943b46d810aaf8d167c3a7e769f86
|
File details
Details for the file oncoresolve-1.0.0-py3-none-any.whl.
File metadata
- Download URL: oncoresolve-1.0.0-py3-none-any.whl
- Upload date:
- Size: 726.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68f0e792f9a9f649b10131f975a04e057a73d51fc5ded668900ce6389f7074c1
|
|
| MD5 |
e7cf9abef0a4ebb21c8651cd2ab96e77
|
|
| BLAKE2b-256 |
c52b4bccbd354b69edd7872b23b34f23961bf4b0b4f55d7ddc2f19d5c4904d8d
|