diff --git a/DESCRIPTION b/DESCRIPTION index 62df115..11cd4b3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: dreamlet Type: Package Title: Scalable differential expression analysis of single cell transcriptomics datasets with complex study designs -Version: 1.1.21 -Date: 2024-05-06 +Version: 1.1.22 +Date: 2024-05-14 Authors@R: person("Gabriel", "Hoffman", role=c("aut", "cre"), email="gabriel.hoffman@mssm.edu", comment=c(ORCID="0000-0002-0957-0224")) Description: Recent advances in single cell/nucleus transcriptomic technology has enabled collection of cohort-scale datasets to study cell type specific gene expression differences associated disease state, stimulus, and genetic regulation. The scale of these data, complex study designs, and low read count per cell mean that characterizing cell type specific molecular mechanisms requires a user-frieldly, purpose-build analytical framework. We have developed the dreamlet package that applies a pseudobulk approach and fits a regression model for each gene and cell cluster to test differential expression across individuals associated with a trait of interest. Use of precision-weighted linear mixed models enables accounting for repeated measures study designs, high dimensional batch effects, and varying sequencing depth or observed cells per biosample. VignetteBuilder: knitr diff --git a/NEWS.md b/NEWS.md index 7509b25..4ac666e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,8 @@ +# dreamlet 1.1.22 + - May 14, 2024 + - fix issue in `topTable()` with multiple `coef` values + # dreamlet 1.1.21 - fix issue in `run_mash()` with multiple coefficients - from https://github.com/GabrielHoffman/dreamlet/issues/18 diff --git a/R/dreamlet.R b/R/dreamlet.R index 1d30c6c..dac26d9 100644 --- a/R/dreamlet.R +++ b/R/dreamlet.R @@ -506,8 +506,8 @@ setMethod( # check that logFC exists, # since with multiple coefs it does not - if ("logFC" %in% colnames(res)) { - res <- res[abs(res$logFC) >= lfc, , drop = FALSE] + if ("logFC" %in% colnames(res) & lfc != 0 & length(coef) == 1) { + res <- res[abs(res$logFC) >= lfc, , drop = FALSE] } if (!is.null(genelist)) { @@ -520,6 +520,10 @@ setMethod( stop(cmd) } + if( all(c("t", "F.std") %in% colnames(res)) ){ + warning("Mixture of univariate and multivariate results is returned") + } + # sorting ord <- switch(sort.by, logFC = order(abs(res$logFC), decreasing = TRUE), diff --git a/docs/404.html b/docs/404.html index 870b82c..bc5406f 100644 --- a/docs/404.html +++ b/docs/404.html @@ -31,7 +31,7 @@ dreamlet - 1.1.21 + 1.1.22
+colData()
from one cell type.
# get data
df <- extractData(res.proc, "CD14+ Monocytes", genes = "ISG20")
@@ -588,7 +588,7 @@ Comparing expression in clusters
# The coefficient 'compare' is the value logFC between test and baseline:
# compare = cellClustertest - cellClusterbaseline
-df_Bcell <- topTable(fit, coef = "compare")
+df_Bcell <- topTable(fit, coef = "compare")
head(df_Bcell)
## logFC AveExpr t P.Value adj.P.Val
@@ -624,7 +624,7 @@ Gene-cluster specificity
genes <- rownames(df_cts)[apply(df_cts, 2, which.max)]
-plotPercentBars(df_cts, genes = genes)
+plotPercentBars(df_cts, genes = genes)
dreamlet::plotHeatmap(df_cts, genes = genes)
vignettes/errors.Rmd
errors.Rmd
dreamlet()
evaluates precision-weighted linear (mixed)
models on each gene that passes standard filters. The linear mixed model
-used by dream()
can be a little fragile for small sample
+used by dream()
can be a little fragile for small sample
sizes and correlated covariates. dreamlet()
runs
variancePartition::dream()
in the backend for each cell
-cluster. dream()
reports model failures for each cell
+cluster. dream()
reports model failures for each cell
cluster and dreamlet()
reports these failures to the user.
dreamlet()
returns all successful model
fits to be used for downstream analysis.
NEWS.md
+
run_mash()
with multiple coefficients
diff --git a/docs/reference/index.html b/docs/reference/index.html
index 1ff3798..c8f2c74 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -10,7 +10,7 @@
dreamlet
- 1.1.21
+ 1.1.22