Skip to content

Commit

Permalink
1.1.24
Browse files Browse the repository at this point in the history
  • Loading branch information
GEHoffman committed May 28, 2024
1 parent 80cc40b commit 489d81f
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 18 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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.23
Date: 2024-05-16
Version: 1.1.24
Date: 2024-05-28
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
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

# dreamlet 1.1.24
- May 28, 2024
- `dreamlet()` gives clearer error message for singular design matrix
- `plotGeneHeatmap()` handles `zmax` correctly now

# dreamlet 1.1.23
- May 16, 2024
- `processOneAssay`, set `rescaleWeightsAfter=FALSE` by default
Expand Down
8 changes: 6 additions & 2 deletions R/dreamlet.R
Original file line number Diff line number Diff line change
Expand Up @@ -831,17 +831,21 @@ setMethod(
fit <- NULL
}
} else {
fit <- NULL
fit <- NA
attr(fit, "error.initial") = "Design matrix is singular, covariates are very correlated"
}

if (!quiet) message(format(Sys.time() - startTime, digits = 2))

err.init = attr(fit, "error.initial")
if( !is(fit, "MArrayLM") && is.na(fit) ) fit <- NULL

list(
fit = fit,
formula = form_mod,
n_retain = ncol(geneExpr),
errors = errorArray,
error.initial = attr(fit, "error.initial")
error.initial = err.init
)
})
# name each result by the assay name
Expand Down
2 changes: 2 additions & 0 deletions R/plotGeneHeatmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ setMethod(
zmax <- max(abs(tab$z.std), na.rm = TRUE)
} else {
if (max(abs(tab$z.std), na.rm = TRUE) > zmax) {
tab$z.std = pmax(tab$z.std, -zmax)
tab$z.std = pmin(tab$z.std, zmax)
warning("z.std > zmax", immediate. = TRUE)
}
}
Expand Down
4 changes: 3 additions & 1 deletion R/plotVarPart.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ setMethod(
xlab("") +
scale_y_continuous(limits = c(0, 100), expand = c(0, 3)) +
theme_classic() +
geom_boxplot(width = 0.07, fill = "grey", outlier.colour = "black") +
geom_boxplot(aes(outlier.colour = factor(variable)), width = 0.07, fill = "grey") +
scale_fill_manual(values = col) +
theme(
legend.position = "none", plot.title = element_text(hjust = 0.5),
Expand All @@ -92,3 +92,5 @@ setMethod(
fig
}
)


2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions docs/articles/non_lin_eff.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/processOneAssay.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/processOneAssay.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 489d81f

Please sign in to comment.