End-to-end analysis of cancer transcriptomes and genomes in R.
OncoSeq keeps bulk RNA-seq counts, somatic mutations, gene-level copy number and clinical follow-up for one set of tumours in a single container, and provides the analyses a cancer genomics study needs from import to figure. Every result is stored back in the object, together with a provenance log, so a complete study travels as one file.
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("babasaraki/OncoSeq")
The TCGA importer additionally needs TCGAbiolinks:
BiocManager::install("TCGAbiolinks")
library(OncoSeq)
# A curated cBioPortal study, or your own counts with importCounts()
ose <- importCBioPortal("blca_tcga_pan_can_atlas_2018",
genes = c("TP53", "RB1", "FGFR3", "ERBB2"))
# ... or the shipped example cohort
ose <- exampleOncoSeq()
ose <- qcMetrics(ose)
ose <- filterLowExpression(ose, group = "condition")
ose <- normalizeCounts(ose, method = "vst")
ose <- diffExpress(ose, ~ condition,
contrast = c("condition", "tumour", "normal"),
engine = "DESeq2")
plotVolcano(ose)
head(getAnalysis(ose, "de"))
Or run the whole chain at once:
res <- runOncoSeq(ose, ~ condition,
contrast = c("condition", "tumour", "normal"),
geneSets = readGMT("hallmark.gmt"))
names(analyses(res))
| Stage | Functions |
|---|---|
| Import |
importGDC(), importCBioPortal(), importCounts(), importTximport(), importMAF(), asOncoSeq()
|
| Quality control |
qcMetrics(), filterLowExpression(), detectOutliers()
|
| Normalisation |
normalizeCounts() — CPM, TMM, upper-quartile, RLE, VST, rlog, log2-TPM |
| Differential expression |
diffExpress() over DESeq2 / edgeR / limma-voom, compareEngines()
|
| Enrichment |
runGSEA(), runORA(), readGMT(), msigdbrSets()
|
| Mutations |
mutationSummary(), mutationFrequency(), tumourMutationBurden(), oncoplotData()
|
| Copy number |
cnvSummary(), cnvFrequency(), cnvExpressionCorrelation()
|
| Survival |
survivalFit(), coxModel(), survivalScreen()
|
| Integration |
mutationStatus(), integrateMutationExpression(), alignLayers()
|
| Plots |
plotSamplePCA(), plotVolcano(), plotMAplot(), plotExpressionHeatmap(), plotKM(), plotOncoprint(), plotEnrichmentBar(), plotCNVFrequency(), plotMutationFrequency()
|
| Pipeline | runOncoSeq() |
OncoSeqExperiment extends SummarizedExperiment, so assay(),
colData(), rowData() and friends work as usual. It adds:
mutations(x) — somatic variants in long formatcnv(x) — gene-level copy-number callsanalyses(x) — every result you have computedprovenance(x) — what was done to the object, in orderSubsetting samples propagates to every layer, and validity checking keeps the sample identifiers concordant.
exampleOncoSeq() — a simulated count-scale cohort for examples and
teachingblcaExample — a real 420-gene by 400-sample slice of the TCGA bladder
urothelial carcinoma cohort, with expression, mutations, copy number and
survivalvignette("OncoSeq")
GPL-3.
This package was independently conceived, designed, developed, and maintained by the author. AI tools, particularly Anthropic Claude Opus 5, were used selectively to provide technical assistance in areas where additional guidance was needed, including troubleshooting, debugging, code refinement, and resolving specific implementation challenges.
The author retained full control over the package's scope, architecture, functionality,
source code, documentation, unit tests, and validation processes. All AI-assisted
suggestions were critically reviewed, adapted where necessary, and tested by the author.
Package validation included running R CMD check --as-cran and BiocCheck locally and
through continuous integration.
No code was knowingly copied from third-party packages or repositories, and all dependencies are accessed through their publicly documented APIs. The package is distributed under the GPL-3 licence.
The author assumes full responsibility for the originality, correctness, maintenance, and scientific integrity of the package.
This disclosure is provided in accordance with Bioconductor's AI and Third Party Code policy.