XGBoost ensemble classifier for DLBCL molecular subtypes (MCD, A53, N1, BN2, EZB, ST2, Other) based on gene expression data.
Requires Python 3.10–3.12. Clone the repo and install in editable mode:
git clone https://github.com/MLO-lab/lymphxpress
cd lymphxpress
pip install -e .lymphxpress path/to/expression.csv [OPTIONS]
Options:
-m, --models INT Number of ensemble models (default: 100)
-s, --scaler TEXT Scaler: rnaseq_dge | rnapanel (default: rnaseq_dge)
--no-scaler Skip scaling
-r, --seed INT Random seed (default: 0)
--out TEXT Output CSV path (default: results.csv)Input format: CSV with samples as rows and gene symbols as columns (first column = sample ID).
sample_id,GENE1,GENE2,...
S1,1.23,4.56,...
S2,0.78,2.34,...
import pandas as pd
from lymphxpress import LymphxpressClassifier
X_test = pd.read_csv("expression.csv", index_col=0)
clf = LymphxpressClassifier(n_models=100)
clf.add_test_data(X_test, scaler="rnaseq_dge")
clf.fit(seed=0)
predictions = clf.predict() # pandas Series: sample → subtype
probabilities = clf.predict_proba() # DataFrame: sample × subtypeManuscript in preparation.