Tweedieverse provides a unified differential analysis
workflow for omics measurements whose empirical variance structure is
well represented by the Tweedie family. The framework is intended for
heterogeneous high-throughput data, including microbiome abundances,
single-cell RNA-seq measurements, bulk RNA-seq summaries, metabolite
intensities, and other continuous or count-like assays.
The package uses Bioconductor containers as the primary interface. A
single omics assay is represented as a
SummarizedExperiment,
TreeSummarizedExperiment, or
SingleCellExperiment, and matched multi-omics assays are
represented as a MultiAssayExperiment. This keeps feature
assays, sample metadata, and experiment-level annotations together and
makes the workflow compatible with the broader Bioconductor
ecosystem.
This vignette demonstrates six Bioconductor-oriented workflows:
TreeSummarizedExperiment,SingleCellExperiment,SingleCellExperiment,muscat::aggregateData(),airway
dataset stored in a SummarizedExperiment,MultiAssayExperiment.In omics data, biological processes or technical factors may induce
distinct statistical properties (such as overdispersion and
zero-inflation) across experimental platforms (or library preparation
protocols). Most published differential analysis methods are
omics-specific and assume a single probabilistic model for all features.
DESeq2 and edgeR use the negative binomial
distribution for sequencing counts. MAST uses a two-part
hurdle model for single-cell expression. MaAsLin2 supports
several microbiome association models, including linear and compound
Poisson models, while MaAsLin3 models prevalence and
abundance separately. limma fits linear models to
expression data, including transformed RNA-seq measurements.
These choices ignore the fact that data distributions are feature-specific and vary considerably both within and between platforms or technologies. A typical multi-omics study therefore runs a different tool for each assay, each with its own assumptions, preprocessing, and output format, and the resulting effect sizes and significance calls are difficult to compare.
Tweedieverse provides a single home for differential
analysis across omics data types. It is built on Tweedie generalized
linear models, whose flexibility enables feature-specific modeling of
omics data by adjusting a single configuration parameter per feature:
the Tweedie index p, which spans the Gaussian, Poisson,
compound Poisson-gamma, gamma, and inverse Gaussian distributions.
Tweedieverse estimates p separately for each
feature, so every feature is modeled with a mean-variance relationship
learned from its own data. This yields a unified framework that adapts
to biological and technological variability in multi-omics profiles.
Model adequacy and study design determine the validity and power of the
resulting tests; these examples demonstrate the workflow rather than
benchmark comparative performance.
With Tweedieverse, users can:
Tweedieverse();SummarizedExperiment,
SingleCellExperiment,
TreeSummarizedExperiment, or
MultiAssayExperiment, with sample metadata and feature
annotations kept intact;The sections below walk through each of these workflows.
Bioconductor provides established differential-analysis workflows: DESeq2 and edgeR use negative-binomial models for sequencing counts; limma uses linear models with empirical Bayes inference, including precision-weighted RNA-seq analysis with voom. MAST uses a two-part hurdle model for single-cell detection and positive expression. MaAsLin2 offers multivariable meta-omic association analysis with several model choices, including compound Poisson models, while MaAsLin3 combines prevalence and abundance analyses.
Tweedie modeling is also available through general-purpose CRAN tools. cplm fits compound Poisson regression models, and glmmTMB supports Tweedie generalized linear mixed models. statmod supplies Tweedie GLM families, while tweedie provides distribution and likelihood calculations. Tweedieverse uses cplm, glmmTMB, and statmod as modeling engines.
Tweedieverse adds a common omics workflow around these engines:
direct Bioconductor-container input, sample alignment, feature
filtering, domain-specific size-factor offsets, feature-wise fitting,
optional prevalence tests, multiple-testing correction, and consistently
structured association tables. It supports both fixed and estimated
variance powers and analyzes MultiAssayExperiment layers
through the same interface. Each layer is fitted independently; effect
sizes retain their assay- and link-specific interpretation.
After Bioconductor acceptance, the release version can be installed with:
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("Tweedieverse")The development version can be installed from GitHub:
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}
remotes::install_github("himelmallick/Tweedieverse")library(Tweedieverse)
library(SummarizedExperiment)
#> Loading required package: MatrixGenerics
#> Loading required package: matrixStats
#>
#> Attaching package: 'MatrixGenerics'
#> The following objects are masked from 'package:matrixStats':
#>
#> colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
#> colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
#> colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
#> colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
#> colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
#> colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
#> colWeightedMeans, colWeightedMedians, colWeightedSds,
#> colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
#> rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
#> rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
#> rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
#> rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
#> rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
#> rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
#> rowWeightedSds, rowWeightedVars
#> Loading required package: GenomicRanges
#> Loading required package: stats4
#> Loading required package: BiocGenerics
#> Loading required package: generics
#>
#> Attaching package: 'generics'
#> The following objects are masked from 'package:base':
#>
#> as.difftime, as.factor, as.ordered, intersect, is.element, setdiff,
#> setequal, union
#>
#> Attaching package: 'BiocGenerics'
#> The following objects are masked from 'package:stats':
#>
#> IQR, mad, sd, var, xtabs
#> The following object is masked from 'package:utils':
#>
#> data
#> The following objects are masked from 'package:base':
#>
#> anyDuplicated, aperm, append, as.data.frame, basename, cbind,
#> colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find,
#> get, grep, grepl, is.unsorted, lapply, Map, mapply, match, mget,
#> order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
#> rbind, Reduce, rownames, sapply, saveRDS, scale, sequence, table,
#> tapply, transform, unique, unsplit, which.max, which.min
#> Loading required package: S4Vectors
#>
#> Attaching package: 'S4Vectors'
#> The following object is masked from 'package:utils':
#>
#> findMatches
#> The following objects are masked from 'package:base':
#>
#> expand.grid, I, unname
#> Loading required package: IRanges
#> Loading required package: Seqinfo
#> Loading required package: Biobase
#> Welcome to Bioconductor
#>
#> Vignettes contain introductory material; view with
#> 'browseVignettes()'. To cite Bioconductor, see
#> 'citation("Biobase")', and for packages 'citation("pkgname")'.
#>
#> Attaching package: 'Biobase'
#> The following object is masked from 'package:MatrixGenerics':
#>
#> rowMedians
#> The following object is masked from 'package:matrixStats':
#>
#> rowMedians
library(SingleCellExperiment)
library(TreeSummarizedExperiment)
#> Loading required package: Biostrings
#> Loading required package: XVector
#>
#> Attaching package: 'Biostrings'
#> The following object is masked from 'package:base':
#>
#> strsplit
library(MultiAssayExperiment)
library(muscat)
library(airway)The example containers used in this vignette are distributed with the
package under inst/extdata. This allows the vignette to run
during Bioconductor checks without network access.
The microbiome and UMI examples are compact subsets of the real HMP2 and PBMC3k datasets used in the original TweedieLabs tutorials. The non-UMI example uses CC BY 4.0 Tabula Muris Smart-seq2 brain data. The Franzosa multi-omics example comes from the HuMMANet v1 archive. The preparation code, source details, and per-object licences are included in scripts/rebuild_example_data.R, scripts/README.md, and extdata/DATA_LICENSES.md inside the installed package.
microbiome_tse <- readRDS(system.file(
"extdata", "microbiome_tse.rds",
package = "Tweedieverse"
))
umi_sce <- readRDS(system.file(
"extdata", "umi_sce.rds",
package = "Tweedieverse"
))
nonumi_sce <- readRDS(system.file(
"extdata", "nonumi_sce.rds",
package = "Tweedieverse"
))
franzosa_example_mae <- readRDS(system.file(
"extdata", "franzosa_example_mae.rds",
package = "Tweedieverse"
))For microbiome data, Tweedieverse() accepts a
TreeSummarizedExperiment. The assay contains taxa/features
in rows and samples in columns; colData contains sample
metadata.
This subset contains the 20 most variable taxa across 48 baseline HMP2 samples, with 16 samples each from the nonIBD, CD, and UC groups. The source tables are distributed with MaAsLin2. Baseline selection and metadata preparation follow the original microbiome tutorial .
The example table contains relative abundances, so this analysis
disables additional offset normalization by setting
normalization = "NONE". For raw microbiome counts, omit
that argument to use the microbiome default TSS size-factor
offset.
microbiome_tse
#> class: TreeSummarizedExperiment
#> dim: 20 48
#> metadata(0):
#> assays(1): counts
#> rownames(20): Prevotella copri Bacteroides vulgatus ... Veillonella
#> unclassified Ruminococcus torques
#> rowData names(0):
#> colnames(48): CSM67UH7 CSM6J2H9_P ... MSM5LLIQ_P MSM79HBZ
#> colData names(11): site age ... dysbiosisCD collection
#> reducedDimNames(0):
#> mainExpName: NULL
#> altExpNames(0):
#> rowLinks: NULL
#> rowTree: NULL
#> colLinks: NULL
#> colTree: NULL
microbiome_fit <- Tweedieverse(
input_features = microbiome_tse,
output = NULL,
assay_name = "counts",
domain = "microbiome",
normalization = "NONE",
fixed_effects = c("diagnosis", "antibiotics", "age"),
reference = "diagnosis,nonIBD",
return_all = TRUE,
tweedie_p = NULL,
median_comparison = FALSE
)
#> The specified assay has been extracted
#> 2026-12-04 21:55:10.176284 INFO::Writing function arguments to log file
#> 2026-12-04 21:55:10.182761 INFO::Aligning assay columns with metadata rows
#> 2026-12-04 21:55:10.189545 INFO::Filter data based on min abundance and min prevalence
#> 2026-12-04 21:55:10.189962 INFO::Total samples in data: 48
#> 2026-12-04 21:55:10.190284 INFO::Min samples required with min abundance for a feature not to be filtered: 4.800000
#> 2026-12-04 21:55:10.190827 INFO::Total filtered features with prevalence-abundance filtering: 0
#> 2026-12-04 21:55:10.191255 INFO::Filtered feature names:
#> 2026-12-04 21:55:10.191916 INFO::Total filtered features with variance filtering: 0
#> 2026-12-04 21:55:10.192269 INFO::Filtered feature names:
#> 2026-12-04 21:55:10.192983 INFO::Offset size factors computed with normalization: NONE
#> 2026-12-04 21:55:10.194152 INFO::Excluded metadata with entropy less or equal to 0: collection
#> 2026-12-04 21:55:10.194806 INFO::Applying z-score to standardize continuous metadata
#> 2026-12-04 21:55:10.207557 INFO::Formula for fixed effects: expr ~ diagnosis + antibiotics + age
#> 2026-12-04 21:55:10.208274 INFO::Running selected analysis method: CPLM
#> 2026-12-04 21:55:10.227941 INFO::Fitting model to feature number 1, Prevotella copri
#> 2026-12-04 21:55:11.409506 INFO::Fitting model to feature number 2, Bacteroides vulgatus
#> 2026-12-04 21:55:11.602448 INFO::Fitting model to feature number 3, Bacteroides dorei
#> 2026-12-04 21:55:11.763617 INFO::Fitting model to feature number 4, Faecalibacterium prausnitzii
#> 2026-12-04 21:55:11.906055 INFO::Fitting model to feature number 5, Akkermansia muciniphila
#> 2026-12-04 21:55:12.060756 INFO::Fitting model to feature number 6, Bacteroides uniformis
#> 2026-12-04 21:55:12.203424 INFO::Fitting model to feature number 7, Bacteroides fragilis
#> 2026-12-04 21:55:12.327442 INFO::Fitting model to feature number 8, Bacteroides stercoris
#> 2026-12-04 21:55:12.471092 INFO::Fitting model to feature number 9, Bacteroides cellulosilyticus
#> 2026-12-04 21:55:12.596127 INFO::Fitting model to feature number 10, Eubacterium rectale
#> 2026-12-04 21:55:12.747278 INFO::Fitting model to feature number 11, Escherichia coli
#> Warning: Model fit failed for feature 'Escherichia coli': inner loop 1; cannot
#> correct step size
#> 2026-12-04 21:55:12.76058 INFO::Fitting model to feature number 12, Bacteroides ovatus
#> 2026-12-04 21:55:12.900607 INFO::Fitting model to feature number 13, Clostridium bolteae
#> 2026-12-04 21:55:13.043002 INFO::Fitting model to feature number 14, Bacteroides thetaiotaomicron
#> 2026-12-04 21:55:13.197477 INFO::Fitting model to feature number 15, Alistipes putredinis
#> 2026-12-04 21:55:13.303955 INFO::Fitting model to feature number 16, Subdoligranulum unclassified
#> 2026-12-04 21:55:13.497756 INFO::Fitting model to feature number 17, Ruminococcus gnavus
#> 2026-12-04 21:55:13.665783 INFO::Fitting model to feature number 18, Bacteroides massiliensis
#> 2026-12-04 21:55:13.780569 INFO::Fitting model to feature number 19, Veillonella unclassified
#> Warning: Model fit failed for feature 'Veillonella unclassified': NA/NaN/Inf in
#> 'x'
#> 2026-12-04 21:55:13.813483 INFO::Fitting model to feature number 20, Ruminococcus torques
#> 2026-12-04 21:55:13.960919 INFO::Counting prevalence for each feature
head(microbiome_fit)
#> feature metadata value coef stderr
#> 1 Clostridium bolteae diagnosis CD 3.1337650 0.8303239
#> 2 Bacteroides massiliensis diagnosis CD -3.8494500 1.1246612
#> 3 Bacteroides uniformis age age 0.5623203 0.1993187
#> 4 Bacteroides cellulosilyticus age age 1.3947464 0.4531786
#> 5 Subdoligranulum unclassified age age 0.3964299 0.1323723
#> 6 Ruminococcus gnavus age age -1.2215268 0.4317158
#> pval qval base.model tweedie.index N N.not.zero percent.zero
#> 1 0.0004870498 0.03506759 CPLM 1.780 48 34 29
#> 2 0.0013718752 0.04938751 CPLM 1.784 48 21 56
#> 3 0.0072123785 0.07418446 CPLM 1.759 48 42 12
#> 4 0.0036238469 0.07418446 CPLM 1.799 48 19 60
#> 5 0.0045416657 0.07418446 CPLM 1.912 48 48 0
#> 6 0.0070577406 0.07418446 CPLM 1.799 48 32 33Each row describes one feature–covariate coefficient. Factor
variables can produce several rows per feature, one per non-reference
level. These examples use median_comparison = FALSE and the
default log link.
feature , metadata , value :
Feature identifier, tested covariate, and factor level or continuous
predictor name. Factor effects are relative to the reference level.coef , stderr : Estimated coefficient and
its standard error on the link scale. With a log link,
exp(coef) is the fitted mean ratio at equal offsets.
Continuous covariates are standardized by default, so their coefficients
describe a one-standard-deviation increase unless
standardize = FALSE .pval , qval : Unadjusted test p-value and
multiple-testing adjusted p-value (Benjamini–Hochberg by default across
the reported coefficient tests within an assay).base.model , tweedie.index : Model
engine/family label and estimated or fixed variance power.N , N.not.zero , percent.zero
: Aligned sample count, number with positive measurements, and rounded
percentage of observed measurements equal to zero. Missing model
covariates can reduce a particular fit’s effective sample count.return_all = TRUE keeps the full result table in memory.
The default returns only rows with
qval <= max_significance (default 0.05). An empty
default table means no returned associations meet that cutoff, rather
than no models were attempted. Failed fits produce feature-named
warnings and are absent from the result table; inspect those warnings
before interpreting the results. The number of hypotheses here covers
only the selected features; these q-values are not results from testing
the entire source dataset.
diagnosis_results <- subset(microbiome_fit, metadata == "diagnosis")
diagnosis_results$mean_ratio <- exp(diagnosis_results$coef)
head(diagnosis_results[, c(
"feature", "value", "coef", "mean_ratio", "pval", "qval"
)], 2)
#> feature value coef mean_ratio pval qval
#> 1 Clostridium bolteae CD 3.133765 22.96026215 0.0004870498 0.03506759
#> 2 Bacteroides massiliensis CD -3.849450 0.02129144 0.0013718752 0.04938751The first displayed diagnosis association is Clostridium bolteae in CD relative to nonIBD: its coefficient is 3.13 and its adjusted p-value is 0.0351. The second is Bacteroides massiliensis, with coefficient -3.85 and adjusted p-value 0.0494. A positive coefficient indicates higher fitted relative abundance and a negative coefficient lower fitted relative abundance, adjusting for age and antibiotic use. These are conditional associations in this subset, not evidence of causality.
For an exploratory overview, the heatmap below includes associations
meeting qval <= 0.25, an explicitly relaxed 25% FDR
threshold. It shows up to five features and all retained contrasts for
those features. The package heatmap uses signed -log(qval),
clipped to [-20, 20]: red denotes positive abundance coefficients and
blue negative coefficients. Larger magnitudes indicate stronger
evidence. Empty feature–contrast combinations are displayed as zero;
they do not establish absence of an effect. The plot’s significance
label refers to the chosen 0.25 cutoff.
heatmap_results <- subset(microbiome_fit, !is.na(qval) & qval <= 0.25)
Tweedieverse_heatmap(
output_results = heatmap_results,
cell_value = "qval",
first_n = 5,
title = "HMP2 associations (q <= 0.25)",
data_label = "Taxon",
metadata_label = "Covariate / contrast"
)For single-cell RNA-seq data, Tweedieverse() accepts a
SingleCellExperiment. The UMI example uses integer molecule
counts.
This subset contains 20 genes and 60 PBMC3k cells, with 30 CD4 and 30 CD8 cells. Cell labels and raw UMI counts come from the processed object used in the original UMI tutorial . Genes are selected by count variance across the retained cells.
UMI counts are count-like. Here we pin the variance power to
p = 1, the Poisson variance case, and use the single-cell
domain. The library sizes in colData were calculated using all source
genes before selecting the 20 genes. Passing
scale_factor = "library_size" uses those full-library sizes
as offsets.
umi_sce
#> class: SingleCellExperiment
#> dim: 20 60
#> metadata(0):
#> assays(1): counts
#> rownames(20): MALAT1 TMSB4X ... RPS27A RPL10A
#> rowData names(0):
#> colnames(60): AAACGCTGACCAGT AAACGCTGGTTCTT ... AACCTACTGTGTTG
#> AACCTTACGAGACG
#> colData names(8): orig.ident nCount_RNA ... CellType library_size
#> reducedDimNames(0):
#> mainExpName: NULL
#> altExpNames(0):
umi_fit <- Tweedieverse(
input_features = umi_sce,
output = NULL,
assay_name = "counts",
domain = "single_cell",
scale_factor = "library_size",
fixed_effects = "CellType",
reference = "CellType,CD8",
tweedie_p = 1,
median_comparison = FALSE
)
#> The specified assay has been extracted
#> 2026-12-04 21:55:14.539214 INFO::Writing function arguments to log file
#> 2026-12-04 21:55:14.540154 INFO::Aligning assay columns with metadata rows
#> 2026-12-04 21:55:14.548321 INFO::Filter data based on min abundance and min prevalence
#> 2026-12-04 21:55:14.54871 INFO::Total samples in data: 60
#> 2026-12-04 21:55:14.549032 INFO::Min samples required with min abundance for a feature not to be filtered: 6.000000
#> 2026-12-04 21:55:14.614277 INFO::Total filtered features with prevalence-abundance filtering: 0
#> 2026-12-04 21:55:14.614857 INFO::Filtered feature names:
#> 2026-12-04 21:55:14.63042 INFO::Total filtered features with variance filtering: 0
#> 2026-12-04 21:55:14.630909 INFO::Filtered feature names:
#> 2026-12-04 21:55:14.633405 INFO::Offset size factors computed with normalization: USER
#> 2026-12-04 21:55:14.635737 INFO::Excluded metadata with entropy less or equal to 0: orig.ident
#> 2026-12-04 21:55:14.6362 INFO::Applying z-score to standardize continuous metadata
#> 2026-12-04 21:55:14.637978 INFO::Formula for fixed effects: expr ~ CellType
#> 2026-12-04 21:55:14.638387 INFO::Running selected analysis method: CPLM
#> 2026-12-04 21:55:14.650952 INFO::Fitting model to feature number 1, MALAT1
#> 2026-12-04 21:55:14.654468 INFO::Fitting model to feature number 2, TMSB4X
#> 2026-12-04 21:55:14.657179 INFO::Fitting model to feature number 3, B2M
#> 2026-12-04 21:55:14.659798 INFO::Fitting model to feature number 4, RPL10
#> 2026-12-04 21:55:14.662374 INFO::Fitting model to feature number 5, RPS6
#> 2026-12-04 21:55:14.665002 INFO::Fitting model to feature number 6, RPL13
#> 2026-12-04 21:55:14.667558 INFO::Fitting model to feature number 7, RPL3
#> 2026-12-04 21:55:14.670163 INFO::Fitting model to feature number 8, RPL19
#> 2026-12-04 21:55:14.67283 INFO::Fitting model to feature number 9, RPLP1
#> 2026-12-04 21:55:14.675513 INFO::Fitting model to feature number 10, RPS2
#> 2026-12-04 21:55:14.67805 INFO::Fitting model to feature number 11, RPS18
#> 2026-12-04 21:55:14.680619 INFO::Fitting model to feature number 12, RPL13A
#> 2026-12-04 21:55:14.683195 INFO::Fitting model to feature number 13, RPS12
#> 2026-12-04 21:55:14.685779 INFO::Fitting model to feature number 14, RPL14
#> 2026-12-04 21:55:14.688434 INFO::Fitting model to feature number 15, RPL11
#> 2026-12-04 21:55:14.69108 INFO::Fitting model to feature number 16, RPL32
#> 2026-12-04 21:55:14.69368 INFO::Fitting model to feature number 17, MPC2
#> 2026-12-04 21:55:14.696588 INFO::Fitting model to feature number 18, RPS4X
#> 2026-12-04 21:55:14.699253 INFO::Fitting model to feature number 19, RPS27A
#> 2026-12-04 21:55:14.702652 INFO::Fitting model to feature number 20, RPL10A
#> 2026-12-04 21:55:14.71329 INFO::Counting prevalence for each feature
head(umi_fit)
#> feature metadata value coef stderr pval qval
#> 1 RPS6 CellType CD4 0.4006848 0.09630737 0.0001063576 0.001920124
#> 2 RPL32 CellType CD4 0.3784633 0.09501197 0.0001920124 0.001920124
#> 3 B2M CellType CD4 -0.3007403 0.08640942 0.0009575612 0.003830245
#> 4 RPLP1 CellType CD4 0.4495490 0.12908761 0.0009513840 0.003830245
#> 5 RPL13A CellType CD4 0.2438439 0.06731234 0.0006148881 0.003830245
#> 6 RPS18 CellType CD4 0.3306069 0.10218562 0.0020085431 0.006695144
#> base.model tweedie.index N N.not.zero percent.zero
#> 1 Tweedie GLM 1 60 60 0
#> 2 Tweedie GLM 1 60 60 0
#> 3 Tweedie GLM 1 60 60 0
#> 4 Tweedie GLM 1 60 60 0
#> 5 Tweedie GLM 1 60 60 0
#> 6 Tweedie GLM 1 60 60 0The CellType rows compare CD4 with the CD8 reference
group. For example, RPS6 has coefficient 0.4 and
q-value 0.00192. At equal library size, its fitted CD4/CD8 mean ratio is
1.49. This is a cell-type illustration from one donor. Cells are not
independent biological replicates for population-level treatment
inference; use replicated samples and an appropriate design for that
question.
The non-UMI example uses read-count-like measurements. These can have
a more flexible mean-variance relationship than UMI counts, so we leave
tweedie_p = NULL and let Tweedieverse estimate the index
after filtering.
The source is the original Tabula Muris Smart-seq2 FACS dataset, distributed under CC BY 4.0 in Figshare version 8. This example retains 20 genes and 60 cells from mouse 3_10_M, balanced between astrocytes and oligodendrocytes. The SCRAN factors in colData were computed on all source genes for these cells before selecting the 20 most variable genes. The source counts are unchanged. This is a cell-type illustration within one mouse; it does not establish population-level differential expression across biological replicates. See the original study.
nonumi_sce
#> class: SingleCellExperiment
#> dim: 20 60
#> metadata(8): dataset source_doi ... source_md5 processing
#> assays(1): counts
#> rownames(20): Rn45s Plp1 ... Gsn Mfge8
#> rowData names(0):
#> colnames(60): A13.MAA000560.3_10_M.1.1 A15.MAA000560.3_10_M.1.1 ...
#> B19.MAA000550.3_10_M.1.1 B19.MAA000564.3_10_M.1.1
#> colData names(26): Neurog3>0_raw Neurog3>0_scaled ... celltype
#> source_size_factor
#> reducedDimNames(0):
#> mainExpName: NULL
#> altExpNames(0):
nonumi_fit <- Tweedieverse(
input_features = nonumi_sce,
output = NULL,
assay_name = "counts",
domain = "single_cell",
scale_factor = "source_size_factor",
fixed_effects = "celltype",
reference = "celltype,astrocyte",
standardize = FALSE,
tweedie_p = NULL,
median_comparison = FALSE
)
#> The specified assay has been extracted
#> 2026-12-04 21:55:14.803021 INFO::Writing function arguments to log file
#> 2026-12-04 21:55:14.80395 INFO::Aligning assay columns with metadata rows
#> 2026-12-04 21:55:14.805014 INFO::Filter data based on min abundance and min prevalence
#> 2026-12-04 21:55:14.805355 INFO::Total samples in data: 60
#> 2026-12-04 21:55:14.80567 INFO::Min samples required with min abundance for a feature not to be filtered: 6.000000
#> 2026-12-04 21:55:14.806035 INFO::Total filtered features with prevalence-abundance filtering: 0
#> 2026-12-04 21:55:14.806387 INFO::Filtered feature names:
#> 2026-12-04 21:55:14.806936 INFO::Total filtered features with variance filtering: 0
#> 2026-12-04 21:55:14.807284 INFO::Filtered feature names:
#> 2026-12-04 21:55:14.807611 INFO::Offset size factors computed with normalization: USER
#> 2026-12-04 21:55:14.810285 INFO::Excluded metadata with entropy less or equal to 0: Neurog3.0_raw,Neurog3.0_scaled,free_annotation,mouse.id,mouse.sex,subsetB,subsetB_cluster.ids,subsetC,subsetC_cluster.ids,subsetD,subsetD_cluster.ids,subsetE,subsetE_cluster.ids,tissue
#> 2026-12-04 21:55:14.810737 INFO::Bypass z-score application to metadata
#> 2026-12-04 21:55:14.811112 INFO::Formula for fixed effects: expr ~ celltype
#> 2026-12-04 21:55:14.811504 INFO::Running selected analysis method: CPLM
#> 2026-12-04 21:55:14.824059 INFO::Fitting model to feature number 1, Rn45s
#> 2026-12-04 21:55:15.006475 INFO::Fitting model to feature number 2, Plp1
#> 2026-12-04 21:55:15.171275 INFO::Fitting model to feature number 3, Cnp
#> 2026-12-04 21:55:15.312649 INFO::Fitting model to feature number 4, Malat1
#> 2026-12-04 21:55:15.50859 INFO::Fitting model to feature number 5, Trf
#> 2026-12-04 21:55:15.652689 INFO::Fitting model to feature number 6, Mbp
#> 2026-12-04 21:55:15.769462 INFO::Fitting model to feature number 7, Ptgds
#> 2026-12-04 21:55:15.899554 INFO::Fitting model to feature number 8, Apoe
#> 2026-12-04 21:55:16.059405 INFO::Fitting model to feature number 9, Mag
#> 2026-12-04 21:55:16.180467 INFO::Fitting model to feature number 10, Mal
#> 2026-12-04 21:55:16.300641 INFO::Fitting model to feature number 11, Clu
#> 2026-12-04 21:55:16.446622 INFO::Fitting model to feature number 12, Fth1
#> 2026-12-04 21:55:16.602267 INFO::Fitting model to feature number 13, Tubb4a
#> 2026-12-04 21:55:16.710531 INFO::Fitting model to feature number 14, Aldoc
#> 2026-12-04 21:55:16.854237 INFO::Fitting model to feature number 15, Aplp1
#> 2026-12-04 21:55:17.010945 INFO::Fitting model to feature number 16, Cst3
#> 2026-12-04 21:55:17.21197 INFO::Fitting model to feature number 17, Cd81
#> 2026-12-04 21:55:17.363578 INFO::Fitting model to feature number 18, Mobp
#> 2026-12-04 21:55:17.467351 INFO::Fitting model to feature number 19, Gsn
#> 2026-12-04 21:55:17.633386 INFO::Fitting model to feature number 20, Mfge8
#> 2026-12-04 21:55:17.786069 INFO::Counting prevalence for each feature
head(nonumi_fit)
#> feature metadata value coef stderr pval
#> 1 Trf celltype oligodendrocyte 9.970411 0.4825781 2.001878e-28
#> 2 Cnp celltype oligodendrocyte 4.140469 0.2190457 1.806553e-26
#> 3 Cst3 celltype oligodendrocyte -4.010578 0.2415055 1.040934e-23
#> 4 Mbp celltype oligodendrocyte 6.254016 0.3965322 1.215910e-22
#> 5 Aplp1 celltype oligodendrocyte 2.225031 0.1469565 8.236202e-22
#> 6 Mal celltype oligodendrocyte 10.409580 0.7187001 6.354322e-21
#> qval base.model tweedie.index N N.not.zero percent.zero
#> 1 4.003755e-27 CPLM 1.693 60 40 33
#> 2 1.806553e-25 CPLM 1.506 60 52 13
#> 3 6.939561e-23 CPLM 1.741 60 58 3
#> 4 6.079551e-22 CPLM 1.486 60 38 37
#> 5 3.294481e-21 CPLM 1.364 60 57 5
#> 6 2.118107e-20 CPLM 1.586 60 33 45Here the contrast is oligodendrocytes relative to astrocytes. The first returned gene, Trf, has coefficient 9.97, q-value 4^{-27}, and fitted variance power 1.693. The coefficient’s sign describes the direction after accounting for the precomputed SCRAN factor. The fitted index describes the variance model; it is not an effect size or significance measure.
Pseudobulk analysis aggregates single-cell counts to sample-level
counts before modeling. This is useful when the biological replicate,
rather than the cell, is the experimental unit. The muscat
package provides a Bioconductor-native workflow for this aggregation.
Its aggregateData() function summarizes a
SingleCellExperiment by variables in colData,
commonly cluster_id and sample_id.
This example follows the workflow used by the muscat
vignette: multi-subject single-cell data are first represented as a
prepared SingleCellExperiment, cells are aggregated into
cluster-by-sample pseudobulk counts, and the resulting sample-level
count matrix is analyzed with Tweedieverse(). The
package-provided example_sce object contains the required
cluster_id, sample_id, and
group_id fields and is a lightweight version of the Kang et
al. interferon stimulation example used throughout
muscat.
data("example_sce", package = "muscat")
pseudobulk_input <- example_sce[seq_len(100), ]
pseudobulk_sce <- muscat::aggregateData(
pseudobulk_input,
assay = "counts",
fun = "sum",
by = c("cluster_id", "sample_id"),
verbose = FALSE
)
SummarizedExperiment::assayNames(pseudobulk_sce)
#> [1] "B cells" "CD14+ Monocytes" "CD4 T cells"
#> [4] "CD8 T cells" "FCGR3A+ Monocytes"
pseudobulk_assay <- "CD4 T cells"
pseudobulk_counts <- SummarizedExperiment::assay(
pseudobulk_sce,
pseudobulk_assay
)
top_pseudobulk_genes <- order(
rowSums(pseudobulk_counts),
decreasing = TRUE
)[seq_len(20)]
pseudobulk_metadata <- unique(as.data.frame(
SummarizedExperiment::colData(pseudobulk_input)[, c("sample_id",
"group_id")]
))
rownames(pseudobulk_metadata) <- pseudobulk_metadata$sample_id
pseudobulk_metadata <- pseudobulk_metadata[
colnames(pseudobulk_counts), ,
drop = FALSE
]
pseudobulk_metadata$condition <- pseudobulk_metadata$group_id
pseudobulk_se <- SummarizedExperiment::SummarizedExperiment(
assays = list(counts = pseudobulk_counts[top_pseudobulk_genes, , drop =
FALSE]),
colData = pseudobulk_metadata
)
pseudobulk_fit <- Tweedieverse(
input_features = pseudobulk_se,
output = NULL,
assay_name = "counts",
domain = "bulk_rnaseq",
fixed_effects = c("condition"),
reference = "condition,ctrl",
tweedie_p = 1,
median_comparison = FALSE,
max_significance = 1
)
#> The specified assay has been extracted
#> 2026-12-04 21:55:18.210196 INFO::Writing function arguments to log file
#> 2026-12-04 21:55:18.21115 INFO::Aligning assay columns with metadata rows
#> 2026-12-04 21:55:18.212009 INFO::Filter data based on min abundance and min prevalence
#> 2026-12-04 21:55:18.212347 INFO::Total samples in data: 4
#> 2026-12-04 21:55:18.212638 INFO::Min samples required with min abundance for a feature not to be filtered: 0.400000
#> 2026-12-04 21:55:18.212976 INFO::Total filtered features with prevalence-abundance filtering: 0
#> 2026-12-04 21:55:18.213314 INFO::Filtered feature names:
#> 2026-12-04 21:55:18.213799 INFO::Total filtered features with variance filtering: 0
#> 2026-12-04 21:55:18.214145 INFO::Filtered feature names:
#> calcNormFactors has been renamed to normLibSizes
#> 2026-12-04 21:55:18.218271 INFO::Offset size factors computed with normalization: TMM
#> 2026-12-04 21:55:18.218929 INFO::Excluded metadata with entropy less or equal to 0:
#> 2026-12-04 21:55:18.219352 INFO::Applying z-score to standardize continuous metadata
#> 2026-12-04 21:55:18.221368 INFO::Formula for fixed effects: expr ~ condition
#> 2026-12-04 21:55:18.221771 INFO::Running selected analysis method: CPLM
#> 2026-12-04 21:55:18.234157 INFO::Fitting model to feature number 1, RPL11
#> 2026-12-04 21:55:18.236729 INFO::Fitting model to feature number 2, RPS27
#> 2026-12-04 21:55:18.238986 INFO::Fitting model to feature number 3, RPS8
#> 2026-12-04 21:55:18.241255 INFO::Fitting model to feature number 4, ISG15
#> 2026-12-04 21:55:18.243566 INFO::Fitting model to feature number 5, RPL5
#> 2026-12-04 21:55:18.245859 INFO::Fitting model to feature number 6, IFI6
#> 2026-12-04 21:55:18.24817 INFO::Fitting model to feature number 7, SH3BGRL3
#> 2026-12-04 21:55:18.250322 INFO::Fitting model to feature number 8, YBX1
#> 2026-12-04 21:55:18.252562 INFO::Fitting model to feature number 9, S100A11
#> 2026-12-04 21:55:18.254779 INFO::Fitting model to feature number 10, ENO1
#> 2026-12-04 21:55:18.257072 INFO::Fitting model to feature number 11, CD53
#> 2026-12-04 21:55:18.259462 INFO::Fitting model to feature number 12, S100A10
#> 2026-12-04 21:55:18.261667 INFO::Fitting model to feature number 13, S100A6
#> 2026-12-04 21:55:18.263837 INFO::Fitting model to feature number 14, TMEM59
#> 2026-12-04 21:55:18.266052 INFO::Fitting model to feature number 15, CD2
#> 2026-12-04 21:55:18.268235 INFO::Fitting model to feature number 16, NDUFS5
#> 2026-12-04 21:55:18.270446 INFO::Fitting model to feature number 17, CD52
#> 2026-12-04 21:55:18.272788 INFO::Fitting model to feature number 18, LAPTM5
#> 2026-12-04 21:55:18.275052 INFO::Fitting model to feature number 19, SYF2
#> 2026-12-04 21:55:18.277339 INFO::Fitting model to feature number 20, RPL22
#> 2026-12-04 21:55:18.284984 INFO::Counting prevalence for each feature
head(pseudobulk_fit)
#> feature metadata value coef stderr pval qval
#> 1 IFI6 condition stim 3.8839623 0.27615612 0.005017428 0.1003486
#> 2 ISG15 condition stim 3.8805689 0.57303845 0.021117751 0.2111775
#> 3 RPL5 condition stim -0.4307140 0.12650534 0.076498419 0.3059937
#> 4 ENO1 condition stim 0.4636025 0.13026340 0.070681909 0.3059937
#> 5 RPL22 condition stim -0.2870616 0.07274647 0.058629532 0.3059937
#> 6 SH3BGRL3 condition stim -0.1499796 0.07721882 0.191591787 0.4414440
#> base.model tweedie.index N N.not.zero percent.zero
#> 1 Tweedie GLM 1 4 4 0
#> 2 Tweedie GLM 1 4 4 0
#> 3 Tweedie GLM 1 4 4 0
#> 4 Tweedie GLM 1 4 4 0
#> 5 Tweedie GLM 1 4 4 0
#> 6 Tweedie GLM 1 4 4 0The condition coefficient compares stimulated samples
with control samples within CD4 T cells. For IFI6, the
coefficient is 3.88 and q-value is 0.1. The rows represent sample-level
pseudobulks rather than individual cells, so N counts
pseudobulk samples. max_significance = 1 displays all
available tests, including weak evidence; it does not declare them all
significant. This compact example omits donor blocking; a paired
stimulation study should include donor in the model.
For bulk RNA-seq data, Tweedieverse() accepts a
SummarizedExperiment. This example uses the Bioconductor
airway dataset, which contains RNA-seq read counts from
airway smooth muscle cells treated with dexamethasone.
The full airway object contains tens of thousands of
genes. To keep the vignette fast, the example keeps a small set of
high-count genes while preserving the original airway
sample metadata. Bulk RNA-seq uses TMM as the default
normalization strategy in Tweedieverse; this computes
library-size factors for the model offset without modifying the count
assay.
Set run_presence_absence_model = TRUE to include a test
for whether the feature is detected. By default, the prevalence fit
requires at least three samples with nonzero counts and three with zero
counts for each gene. Use min_presence_absence_count to
change both minimums. In bulk and pseudobulk data, genes with only one
or two zeros can still enter the abundance analysis. For retained genes
below either minimum, pval_presence is NA and
pval_abundance becomes the joint pval. When
the two reported p-values are exactly 0 and 1, the joint
pval is 0. Tweedieverse applies the selected
multiple-testing correction to the joint p-values to compute
qval.
Use return_all = TRUE to retrieve the full association
table with output = NULL, including associations above
max_significance. The default returns associations passing
the threshold. Missing q-values after median comparison are retained in
the full table and excluded from significant results.
data("airway", package = "airway")
airway_counts <- SummarizedExperiment::assay(airway, "counts")
top_airway_genes <- order(rowSums(airway_counts), decreasing = TRUE)[seq_len(
20)]
bulk_rnaseq_se <- SummarizedExperiment::SummarizedExperiment(
assays = list(counts = airway_counts[top_airway_genes, , drop = FALSE]),
colData = SummarizedExperiment::colData(airway)
)
bulk_rnaseq_se
#> class: SummarizedExperiment
#> dim: 20 8
#> metadata(0):
#> assays(1): counts
#> rownames(20): ENSG00000115414 ENSG00000011465 ... ENSG00000137801
#> ENSG00000142173
#> rowData names(0):
#> colnames(8): SRR1039508 SRR1039509 ... SRR1039520 SRR1039521
#> colData names(9): SampleName cell ... Sample BioSample
bulk_rnaseq_fit <- Tweedieverse(
input_features = bulk_rnaseq_se,
output = NULL,
assay_name = "counts",
domain = "bulk_rnaseq",
fixed_effects = c("dex"),
reference = "dex,untrt",
tweedie_p = 1,
median_comparison = FALSE,
run_presence_absence_model = TRUE,
max_significance = 0.05,
return_all = TRUE
)
#> The specified assay has been extracted
#> 2026-12-04 21:55:20.345004 INFO::Writing function arguments to log file
#> 2026-12-04 21:55:20.345924 INFO::Aligning assay columns with metadata rows
#> 2026-12-04 21:55:20.346831 INFO::Filter data based on min abundance and min prevalence
#> 2026-12-04 21:55:20.347184 INFO::Total samples in data: 8
#> 2026-12-04 21:55:20.347476 INFO::Min samples required with min abundance for a feature not to be filtered: 0.800000
#> 2026-12-04 21:55:20.347798 INFO::Total filtered features with prevalence-abundance filtering: 0
#> 2026-12-04 21:55:20.348157 INFO::Filtered feature names:
#> 2026-12-04 21:55:20.348638 INFO::Total filtered features with variance filtering: 0
#> 2026-12-04 21:55:20.348991 INFO::Filtered feature names:
#> calcNormFactors has been renamed to normLibSizes
#> 2026-12-04 21:55:20.351914 INFO::Offset size factors computed with normalization: TMM
#> 2026-12-04 21:55:20.352739 INFO::Excluded metadata with entropy less or equal to 0: albut
#> 2026-12-04 21:55:20.353179 INFO::Applying z-score to standardize continuous metadata
#> 2026-12-04 21:55:20.355242 INFO::Formula for fixed effects: expr ~ dex
#> 2026-12-04 21:55:20.355647 INFO::Running selected analysis method: CPLM
#> 2026-12-04 21:55:20.368727 INFO::Fitting model to feature number 1, ENSG00000115414
#> 2026-12-04 21:55:20.371354 INFO::Fitting model to feature number 2, ENSG00000011465
#> 2026-12-04 21:55:20.373608 INFO::Fitting model to feature number 3, ENSG00000198804
#> 2026-12-04 21:55:20.375813 INFO::Fitting model to feature number 4, ENSG00000156508
#> 2026-12-04 21:55:20.378036 INFO::Fitting model to feature number 5, ENSG00000164692
#> 2026-12-04 21:55:20.380275 INFO::Fitting model to feature number 6, ENSG00000116260
#> 2026-12-04 21:55:20.382457 INFO::Fitting model to feature number 7, ENSG00000087086
#> 2026-12-04 21:55:20.3847 INFO::Fitting model to feature number 8, ENSG00000115461
#> 2026-12-04 21:55:20.386984 INFO::Fitting model to feature number 9, ENSG00000077942
#> 2026-12-04 21:55:20.389219 INFO::Fitting model to feature number 10, ENSG00000166923
#> 2026-12-04 21:55:20.391465 INFO::Fitting model to feature number 11, ENSG00000087245
#> 2026-12-04 21:55:20.394027 INFO::Fitting model to feature number 12, ENSG00000091986
#> 2026-12-04 21:55:20.396313 INFO::Fitting model to feature number 13, ENSG00000103888
#> 2026-12-04 21:55:20.398647 INFO::Fitting model to feature number 14, ENSG00000210082
#> 2026-12-04 21:55:20.40084 INFO::Fitting model to feature number 15, ENSG00000124942
#> 2026-12-04 21:55:20.403137 INFO::Fitting model to feature number 16, ENSG00000108821
#> 2026-12-04 21:55:20.405419 INFO::Fitting model to feature number 17, ENSG00000196205
#> 2026-12-04 21:55:20.407664 INFO::Fitting model to feature number 18, ENSG00000150991
#> 2026-12-04 21:55:20.410024 INFO::Fitting model to feature number 19, ENSG00000137801
#> 2026-12-04 21:55:20.41229 INFO::Fitting model to feature number 20, ENSG00000142173
#> 2026-12-04 21:55:20.419931 INFO::Counting prevalence for each feature
head(bulk_rnaseq_fit)
#> feature metadata value coef stderr pval qval
#> 1 ENSG00000108821 dex trt -0.8287049 0.08821054 8.260095e-05 0.001652019
#> 2 ENSG00000137801 dex trt 1.3972630 0.23161755 9.374555e-04 0.009374555
#> 3 ENSG00000124942 dex trt 0.2768458 0.07273457 8.902531e-03 0.059350204
#> 4 ENSG00000164692 dex trt -0.2559281 0.08206528 2.062187e-02 0.095415880
#> 5 ENSG00000150991 dex trt 0.2134059 0.07101706 2.385397e-02 0.095415880
#> 6 ENSG00000087086 dex trt -0.3890967 0.14496888 3.634185e-02 0.121139513
#> coef_abundance stderr_abundance pval_abundance qval_abundance coef_presence
#> 1 -0.8287049 0.08821054 8.260095e-05 0.001652019 NA
#> 2 1.3972630 0.23161755 9.374555e-04 0.009374555 NA
#> 3 0.2768458 0.07273457 8.902531e-03 0.059350204 NA
#> 4 -0.2559281 0.08206528 2.062187e-02 0.095415880 NA
#> 5 0.2134059 0.07101706 2.385397e-02 0.095415880 NA
#> 6 -0.3890967 0.14496888 3.634185e-02 0.121139513 NA
#> stderr_presence pval_presence qval_presence base.model base.model_abundance
#> 1 NA NA NA CCT Tweedie GLM
#> 2 NA NA NA CCT Tweedie GLM
#> 3 NA NA NA CCT Tweedie GLM
#> 4 NA NA NA CCT Tweedie GLM
#> 5 NA NA NA CCT Tweedie GLM
#> 6 NA NA NA CCT Tweedie GLM
#> base.model_presence tweedie.index
#> 1 NA 1
#> 2 NA 1
#> 3 NA 1
#> 4 NA 1
#> 5 NA 1
#> 6 NA 1The dex contrast compares dexamethasone-treated with
untreated samples. For ENSG00000108821,
coef_abundance is -0.83 and the joint q-value is 0.00165. A
positive abundance coefficient indicates higher offset-adjusted mean
counts in treated samples.
With the presence model enabled, coef and
stderr retain abundance-model meaning; the joint CCT
p-value is not a test of a combined effect size.
coef_presence is a logistic-model log-odds coefficient,
while pval_abundance/qval_abundance and
pval_presence/qval_presence describe component
tests. Inspect pval_presence to see which genes lacked
enough zeros or detections to fit the prevalence model. For those genes,
the joint p-value falls back to the abundance p-value.
return_all = TRUE includes rows above 0.05; use
subset(bulk_rnaseq_fit, !is.na(qval) & qval <= 0.05)
for discovery selection. The full airway experiment is paired by cell
line; include cell alongside dex when
analyzing that study design.
For multi-omics data, Tweedieverse() accepts a
MultiAssayExperiment. The packaged Franzosa et al. example
is stored as an individual .rds file in
inst/extdata. It contains matched microbiome species
abundances and metabolite profiles. Each omics layer is analyzed
independently, and per-omics parameters can be supplied as named vectors
or lists.
franzosa_example_mae
#> A MultiAssayExperiment object of 2 listed
#> experiments with user-defined names and respective classes.
#> Containing an ExperimentList class object of length 2:
#> [1] taxaAbundanceProfile: SummarizedExperiment with 4 rows and 16 columns
#> [2] harmonizedMetaboliteProfile: SummarizedExperiment with 4 rows and 16 columns
#> Functionality:
#> experiments() - obtain the ExperimentList instance
#> colData() - the primary/phenotype DataFrame
#> sampleMap() - the sample coordination DataFrame
#> `$`, `[`, `[[` - extract colData columns, subset, or experiment
#> *Format() - convert into a long or wide DataFrame
#> assays() - convert ExperimentList to a SimpleList of matrices
#> exportClass() - save data to flat files
multi_fit <- Tweedieverse(
input_features = franzosa_example_mae,
output = NULL,
assay_name = "abundance",
domain = c(
taxaAbundanceProfile = "microbiome",
harmonizedMetaboliteProfile = "custom"
),
normalization = c(
taxaAbundanceProfile = "NONE",
harmonizedMetaboliteProfile = "MEDIAN"
),
fixed_effects = c("diseaseCat_clean", "Age"),
tweedie_p = list(
taxaAbundanceProfile = NULL,
harmonizedMetaboliteProfile = NULL
),
median_comparison = FALSE,
max_significance = 1
)
#> The specified assay has been extracted
#> 2026-12-04 21:55:20.527927 INFO::Writing function arguments to log file
#> 2026-12-04 21:55:20.528846 INFO::Aligning assay columns with metadata rows
#> 2026-12-04 21:55:20.529664 INFO::Filter data based on min abundance and min prevalence
#> 2026-12-04 21:55:20.530009 INFO::Total samples in data: 16
#> 2026-12-04 21:55:20.530318 INFO::Min samples required with min abundance for a feature not to be filtered: 1.600000
#> 2026-12-04 21:55:20.530646 INFO::Total filtered features with prevalence-abundance filtering: 0
#> 2026-12-04 21:55:20.530993 INFO::Filtered feature names:
#> 2026-12-04 21:55:20.531358 INFO::Total filtered features with variance filtering: 0
#> 2026-12-04 21:55:20.53167 INFO::Filtered feature names:
#> 2026-12-04 21:55:20.531996 INFO::Offset size factors computed with normalization: NONE
#> 2026-12-04 21:55:20.53259 INFO::Excluded metadata with entropy less or equal to 0:
#> 2026-12-04 21:55:20.533004 INFO::Applying z-score to standardize continuous metadata
#> 2026-12-04 21:55:20.535638 INFO::Formula for fixed effects: expr ~ diseaseCat_clean + Age
#> 2026-12-04 21:55:20.536075 INFO::Running selected analysis method: CPLM
#> 2026-12-04 21:55:20.548231 INFO::Fitting model to feature number 1, Bacteroides_vulgatus
#> 2026-12-04 21:55:20.660609 INFO::Fitting model to feature number 2, Ruminococcus_gnavus
#> 2026-12-04 21:55:20.823035 INFO::Fitting model to feature number 3, Eubacterium_rectale
#> 2026-12-04 21:55:20.945266 INFO::Fitting model to feature number 4, Faecalibacterium_prausnitzii
#> 2026-12-04 21:55:21.150751 INFO::Counting prevalence for each feature
#> The specified assay has been extracted
#> 2026-12-04 21:55:21.160829 INFO::Writing function arguments to log file
#> 2026-12-04 21:55:21.161704 INFO::Aligning assay columns with metadata rows
#> 2026-12-04 21:55:21.162517 INFO::Filter data based on min abundance and min prevalence
#> 2026-12-04 21:55:21.162843 INFO::Total samples in data: 16
#> 2026-12-04 21:55:21.163162 INFO::Min samples required with min abundance for a feature not to be filtered: 1.600000
#> 2026-12-04 21:55:21.163476 INFO::Total filtered features with prevalence-abundance filtering: 0
#> 2026-12-04 21:55:21.163801 INFO::Filtered feature names:
#> 2026-12-04 21:55:21.164189 INFO::Total filtered features with variance filtering: 0
#> 2026-12-04 21:55:21.164514 INFO::Filtered feature names:
#> 2026-12-04 21:55:21.165339 INFO::Offset size factors computed with normalization: MEDIAN
#> 2026-12-04 21:55:21.165963 INFO::Excluded metadata with entropy less or equal to 0:
#> 2026-12-04 21:55:21.166384 INFO::Applying z-score to standardize continuous metadata
#> 2026-12-04 21:55:21.168912 INFO::Formula for fixed effects: expr ~ diseaseCat_clean + Age
#> 2026-12-04 21:55:21.169335 INFO::Running selected analysis method: CPLM
#> 2026-12-04 21:55:21.18175 INFO::Fitting model to feature number 1, C54:3 TAG
#> 2026-12-04 21:55:21.310853 INFO::Fitting model to feature number 2, 3-Carboxypropyl trimethylammonium
#> 2026-12-04 21:55:22.370496 INFO::Fitting model to feature number 3, C54:4 TAG
#> 2026-12-04 21:55:22.41185 INFO::Fitting model to feature number 4, C54:5 TAG
#> 2026-12-04 21:55:22.559829 INFO::Counting prevalence for each feature
names(multi_fit)
#> [1] "taxaAbundanceProfile" "harmonizedMetaboliteProfile"
head(multi_fit$taxaAbundanceProfile)
#> omics feature metadata value
#> 1 taxaAbundanceProfile Eubacterium_rectale Age Age
#> 2 taxaAbundanceProfile Eubacterium_rectale diseaseCat_clean Healthy
#> 3 taxaAbundanceProfile Ruminococcus_gnavus Age Age
#> 4 taxaAbundanceProfile Faecalibacterium_prausnitzii diseaseCat_clean Healthy
#> 5 taxaAbundanceProfile Bacteroides_vulgatus Age Age
#> 6 taxaAbundanceProfile Faecalibacterium_prausnitzii Age Age
#> coef stderr pval qval base.model tweedie.index N
#> 1 -2.7824200 0.6723543 0.001166404 0.009331229 CPLM 1.959 16
#> 2 -4.0777339 1.2742125 0.006964917 0.027859668 CPLM 1.959 16
#> 3 1.6620788 0.8757181 0.080128960 0.160257919 CPLM 1.990 16
#> 4 2.2109010 1.1622964 0.079534477 0.160257919 CPLM 1.869 16
#> 5 0.5819870 0.5659511 0.322546636 0.446136909 CPLM 1.951 16
#> 6 0.5975592 0.5963310 0.334602682 0.446136909 CPLM 1.869 16
#> N.not.zero percent.zero
#> 1 16 0
#> 2 16 0
#> 3 16 0
#> 4 16 0
#> 5 16 0
#> 6 16 0
head(multi_fit$harmonizedMetaboliteProfile)
#> omics feature
#> 1 harmonizedMetaboliteProfile C54:3 TAG
#> 2 harmonizedMetaboliteProfile 3-Carboxypropyl trimethylammonium
#> 3 harmonizedMetaboliteProfile C54:5 TAG
#> 4 harmonizedMetaboliteProfile C54:3 TAG
#> 5 harmonizedMetaboliteProfile C54:5 TAG
#> 6 harmonizedMetaboliteProfile 3-Carboxypropyl trimethylammonium
#> metadata value coef stderr pval qval base.model
#> 1 Age Age 0.4576428 0.2540086 0.09482193 0.2528585 CPLM
#> 2 diseaseCat_clean Healthy -3.6533834 1.9329772 0.08125656 0.2528585 CPLM
#> 3 Age Age -0.3291460 0.1750951 0.08273022 0.2528585 CPLM
#> 4 diseaseCat_clean Healthy 0.5723166 0.4908363 0.26456010 0.5291202 CPLM
#> 5 diseaseCat_clean Healthy -0.2784898 0.3378094 0.42458092 0.6793295 CPLM
#> 6 Age Age -0.4177465 1.0004811 0.68309312 0.6830931 CPLM
#> tweedie.index N N.not.zero percent.zero
#> 1 1.99 16 16 0
#> 2 1.99 16 16 0
#> 3 1.99 16 16 0
#> 4 1.99 16 16 0
#> 5 1.99 16 16 0
#> 6 1.99 16 16 0Each list element is a separate association table, and its
omics column identifies the layer.
diseaseCat_clean rows compare the named value
with the reference disease category; Age rows describe a
one-standard-deviation increase because continuous predictors are
standardized by default. Within either layer, a positive log-link
coefficient means a higher fitted mean, conditional on the other
covariate and offset. Taxon abundances and metabolite intensities have
different measurement scales, so coefficients should be interpreted
within layers. q-values are adjusted separately per layer, not across
the entire multi-omics list. As above, max_significance = 1
displays tests without requiring a discovery threshold.
Median comparison uses Monte Carlo simulations when
median_comparison = TRUE. Set
median_comparison_seed = 123 to reproduce those
simulations. The seed is scoped with withr, restoring the
preceding random-number state after the median-comparison calculation.
When the seed is NULL, results can vary between runs.
sessionInfo()
#> R version 4.6.2 (2026-10-29)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 26.04.1 LTS
#>
#> Matrix products: default
#> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.32.so; LAPACK version 3.12.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> time zone: Etc/UTC
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats4 stats graphics grDevices utils datasets methods
#> [8] base
#>
#> other attached packages:
#> [1] airway_1.35.0 muscat_1.29.0
#> [3] MultiAssayExperiment_1.41.0 TreeSummarizedExperiment_2.23.0
#> [5] Biostrings_2.83.1 XVector_0.55.0
#> [7] SingleCellExperiment_1.37.1 SummarizedExperiment_1.45.0
#> [9] Biobase_2.75.1 GenomicRanges_1.67.0
#> [11] Seqinfo_1.5.0 IRanges_2.49.0
#> [13] S4Vectors_0.53.1 BiocGenerics_0.61.1
#> [15] generics_0.1.4 MatrixGenerics_1.27.0
#> [17] matrixStats_1.5.0 Tweedieverse_0.99.2
#> [19] BiocStyle_2.43.0
#>
#> loaded via a namespace (and not attached):
#> [1] RColorBrewer_1.1-3 sys_3.4.3 jsonlite_2.0.0
#> [4] shape_1.4.6.1 magrittr_2.0.5 ggbeeswarm_0.7.3
#> [7] farver_2.1.2 nloptr_2.2.1 rmarkdown_2.32
#> [10] GlobalOptions_0.1.4 fs_2.1.0 vctrs_0.7.3
#> [13] minqa_1.2.8 htmltools_0.5.9 S4Arrays_1.15.0
#> [16] progress_1.2.3 broom_1.0.13 BiocNeighbors_2.9.1
#> [19] SparseArray_1.15.0 variancePartition_1.45.0 sass_0.5.0
#> [22] KernSmooth_2.23-27 bslib_0.12.0 plyr_1.8.9
#> [25] pbkrtest_0.5.5 sandwich_3.1-3 zoo_1.9-1
#> [28] cachem_1.1.0 TMB_1.9.25 buildtools_1.0.0
#> [31] lifecycle_1.0.5 iterators_1.0.14 pkgconfig_2.0.3
#> [34] rsvd_2.0.0 Matrix_1.7-6 R6_2.6.1
#> [37] fastmap_1.2.0 rbibutils_2.4.1 clue_0.3-68
#> [40] digest_0.6.39 numDeriv_2016.8-1.1 colorspace_2.1-4
#> [43] scater_1.43.0 irlba_2.4.1 beachmat_2.31.1
#> [46] abind_1.4-8 mgcv_1.9-5 compiler_4.6.2
#> [49] withr_3.0.3 aod_1.3.3 doParallel_1.0.17
#> [52] backports_1.5.1 S7_1.0.0 BiocParallel_1.49.0
#> [55] DBI_1.4.0 viridis_0.6.5 biglm_0.9-3
#> [58] gplots_3.3.0 MASS_7.3-66 DelayedArray_0.41.0
#> [61] corpcor_1.6.10 rjson_0.2.23 caTools_1.18.5
#> [64] gtools_3.9.5 tools_4.6.2 vipor_0.4.7
#> [67] otel_0.3.0 beeswarm_0.4.0 ape_5.8-1
#> [70] remaCor_0.0.20 glue_1.8.1 nlme_3.1-172
#> [73] grid_4.6.2 reshape2_1.4.5 cluster_2.1.8.3
#> [76] glmmTMB_1.1.15.2 gtable_0.3.6 tidyr_1.3.2
#> [79] hms_1.1.4 BiocSingular_1.31.0 ScaledMatrix_1.23.0
#> [82] stringr_1.6.0 ggrepel_0.9.8 foreach_1.5.2
#> [85] pillar_1.11.1 yulab.utils_0.2.7 limma_4.1.3
#> [88] logging_0.10-111 circlize_0.4.18 splines_4.6.2
#> [91] dplyr_1.2.1 treeio_1.39.1 lattice_0.23-1
#> [94] tidyselect_1.2.1 ComplexHeatmap_2.31.0 maketools_1.3.2
#> [97] scuttle_1.25.0 knitr_1.52 RTMB_2.0
#> [100] blme_1.0-8 reformulas_0.4.4 gridExtra_2.3.1
#> [103] scrapper_1.9.0 edgeR_5.1.0 RhpcBLASctl_0.23-42
#> [106] xfun_0.63 statmod_1.5.2 pheatmap_1.0.13
#> [109] stringi_1.8.9 lazyeval_0.2.3 yaml_2.3.12
#> [112] boot_1.3-32 evaluate_1.0.5 codetools_0.2-20
#> [115] tibble_3.3.1 BiocManager_1.30.27 cli_3.6.6
#> [118] tweedie_3.2.2 cplm_0.7-12.1 Rdpack_2.6.6
#> [121] jquerylib_0.1.4 Rcpp_1.1.2 EnvStats_4.0.0
#> [124] coda_0.19-4.1 png_0.1-9 parallel_4.6.2
#> [127] ggplot2_4.0.5 prettyunits_1.2.0 bitops_1.1-0
#> [130] lme4_2.1-0 mvtnorm_1.5-0 viridisLite_0.4.3
#> [133] tidytree_0.5.0 lmerTest_3.2-1 scales_1.4.0
#> [136] purrr_1.2.2 crayon_1.5.3 fANCOVA_0.6-1
#> [139] GetoptLong_1.1.1 rlang_1.3.0