BreastSubtypeR is an R/Bioconductor package for intrinsic molecular subtyping of breast cancer gene-expression data. It provides a common workflow for published nearest-centroid (NC-based) and single-sample predictor (SSP-based) methods, multi-method analysis and a local Shiny app.
For research use. Package outputs are not clinical assay results and do not replace validated clinical diagnostics.
Publication | Bioconductor package | Release user guide
Installation | Quick start | Input coverage | Methods | Shiny | Support
Install from the Bioconductor release compatible with your R installation. Consult the package page for the requirements of your selected channel.
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("BreastSubtypeR")
Use a separate library and compatible R version for Bioconductor devel:
BiocManager::install(version = "devel")
BiocManager::install("BreastSubtypeR")
For GitHub development source, use a separate library configured for its Bioconductor dependencies, then install GitHub main:
if (!requireNamespace("remotes", quietly = TRUE))
install.packages("remotes")
remotes::install_github("JohanHartmanGroupBioteam/BreastSubtypeR")
Distribution channels can differ; matching version numbers do not guarantee
matching source. Record the installation channel and source revision alongside
packageVersion("BreastSubtypeR") and sessionInfo().
Run the public packaged OSLO2-EMIT0 example with a Bioconductor release or GitHub installation:
library(BreastSubtypeR)
data("OSLO2EMIT0obj", package = "BreastSubtypeR")
set.seed(1)
mapped <- Mapping(
OSLO2EMIT0obj$se_obj,
RawCounts = FALSE,
method = "max",
impute = FALSE
)
result <- BS_Multi(
data_input = mapped,
methods = "AUTO",
Subtype = FALSE,
hasClinical = FALSE
)
head(result$res_subtypes)
Mapping() preserves missing measurements by default and resolves duplicate
probes before optional imputation. For nonraw input, impute = TRUE uses ten
supported other gene profiles from the full eligible supplied input, filling
only original holes in represented genes selected for existing NC/SSP outputs.
Absent genes are not added. Unsupported or partially unresolved targets produce
a structured error with internal diagnostics; observed values are preserved.
Missing raw counts are rejected, and no raw-derived expression is imputed.
Existing scales are unchanged, including 2^x for nonraw SSP input.
Each hole uses one to ten original observed contributors among the ten selected
profiles. Retained infinities are rejected when optional KNN runs; disabled and
complete-output bypasses introduce no new infinity filter. This revised
implementation differs from the original publication's pipeline. Incomplete-input
estimates and downstream predictions may change even with explicit impute = TRUE.
Subtype = FALSE requests the five-class summary; hasClinical = FALSE
disables clinical ROR outputs. Rows are samples and method columns contain
subtype calls. Entropy summarizes disagreement among available calls; it
is not a calibrated confidence or accuracy measure. Outputs can differ
between package versions.
Vis_Multi(result$res_subtypes)
For your own data, follow ?Mapping for identifiers, annotation and receptor
metadata. RawCounts = FALSE expects log2-normalized expression; raw RNA-seq
counts require gene lengths. See the
release input preparation guide.
InputCoverage() and the Shiny coverage table are available in current GitHub
source. Availability in installed packages can differ between distribution
channels and source revisions. Matching package version numbers do not establish
feature availability. Check your installed version with
"InputCoverage" %in% getNamespaceExports("BreastSubtypeR") before running
this additional example.
InputCoverage(mapped)
Reports represented/absent genes and evaluable gene-pair rules for
NC-based (PAM50), AIMS, SSPBC (ssp.subtype) and SSPBC (ssp.pam50), using
bundled-model denominators and per-sample rule ranges. Inputs are already
processed and may include imputation. Coverage does not establish prediction
reliability, calibration feasibility or coverage of every ROR component;
it does not change method eligibility. See ?InputCoverage.
| Family | Method IDs |
|---|---|
| NC-based: PAM50 implementations |
parker.original, genefu.scale, genefu.robust
|
| NC-based: ER balancing |
cIHC, cIHC.itr, PCAPAM50
|
| NC-based: subgroup centering |
ssBC, ssBC.v2
|
| SSP-based |
AIMS, sspbc
|
BS_Multi also accepts an explicit set, such as
methods = c("AIMS", "sspbc"). AUTO selects methods using implemented
cohort rules based on receptor annotations and subgroup sizes. It returns
per-method calls, not a consensus prediction. Selection does not establish
complete input adequacy or clinical validity. Method assumptions, exact
AUTO rules and threshold provenance remain in the
development vignette source.
Research ROR outputs use Spearman centroid correlations. Commercial Prosigna uses Pearson correlations within its validated assay workflow; BreastSubtypeR scores and groups are not clinical Prosigna results.
Experimental 18-gene ROR-PC labels the existing
ROR-PC (Subtype + Clinic + Prolif.Subtype) output; its companion is
Experimental 18-gene ROR-PC group, stored under
ROR-PC Group (Subtype + Clinic + Prolif.Subtype). Legacy column names,
types and values remain unchanged. This is separate from the original
11-gene Parker ROR-PC.
Experimental 18-gene ROR-PC: this research calculation differs from the published Lien implementation. Its prognostic performance and risk-category thresholds have not been independently validated. It is not a clinical Prosigna result and must not guide patient care.
The package retains a calibrated, unstandardized 18-gene mean; Lien's
published calculation standardizes each gene across patients. Reproducing
Lien's results does not validate this package variant. Relevant public NC
calls emit one bsr_experimental_ror_pc_warning; BS_Multi() aggregates the
notice once when a returned component contains the experimental outputs.
No such warning is emitted by package loading, Mapping(),
hasClinical = FALSE, or AIMS/SSPBC-only results. See the ROR guide below for
warning handling, including options(warn = 2).
The package retains the original Parker-derived grouping comparisons:
exact equality at an unscaled cutoff can return numeric text instead of a
valid risk category. This known defect is temporarily deferred for separate
scientific review, not endorsed as a valid category. The corrected
NODE-dependent additional ROR-PC grouping remains unchanged. See
the ROR guide
and ?BS_parker for the exact cutoffs and methodological references.
BreastSubtypeR::iBreastSubtypeR()
The app runs locally in your R session. Install optional interface dependencies if needed:
install.packages(c("shiny", "bslib"))
The workflow below describes current GitHub main; Bioconductor builds can have an older interface.
.txt extension. AUTO exports
separate method calls and entropy;
Full metrics are available for supported single NC methods.Relevant selected Full metrics carry the experimental 18-gene ROR-PC notice and display labels. Exports retain their existing column names and data, with the interpretation recorded in the existing provenance comments. Calls-only and AUTO exports do not acquire this score-specific notice.
Changing inputs or relevant settings clears stale predictions and downloads. See the development Shiny guide source for the preprocessing, recovery and export details.

Public packaged OSLO2-EMIT0 example after preprocessing and five-class AUTO subtyping. Raw Shannon entropy measures disagreement among available method calls, not calibrated confidence.
Use browseVignettes("BreastSubtypeR") and function help for your installed
version. For support, include a reproducible example, channel/source revision
and sessionInfo().
Yang Q, Hartman J, Sifakis EG (2025). BreastSubtypeR: a unified R/Bioconductor package for intrinsic molecular subtyping in breast cancer research. NAR Genomics and Bioinformatics, 7(4), lqaf131. doi:10.1093/nargab/lqaf131.
The article was selected as Editor's Choice, 2025 in NAR Genomics and Bioinformatics.
Use citation("BreastSubtypeR") for the installed package citation.
@article{Yang2025BreastSubtypeR,
author = {Yang, Qiao and Hartman, Johan and Sifakis, Emmanouil G.},
title = {{BreastSubtypeR}: a unified R/Bioconductor package for intrinsic molecular subtyping in breast cancer research},
journal = {NAR Genomics and Bioinformatics},
year = {2025},
volume = {7},
number = {4},
pages = {lqaf131},
doi = {10.1093/nargab/lqaf131},
url = {https://doi.org/10.1093/nargab/lqaf131}
}
BreastSubtypeR is distributed under the GNU General Public License version 3.