Skip to content

Commit 34f00af

Browse files
committed
Deprecation warning of aggregrateAcrossCells and fitTrendVar fix
1 parent 2d36d75 commit 34f00af

10 files changed

Lines changed: 24 additions & 23 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: StatescopeR
22
Type: Package
33
Title: StatescopeR framework for discovery of cell states from cell type-specific gene expression profiles inferred from bulk mRNA profiles
4-
Version: 1.0.0
4+
Version: 1.0.1
55
Authors@R:c(
66
person(given = "Mischa", family = "Steketee", role = c("aut", "cre"),
77
email = "m.f.b.steketee@amsterdamumc.nl",

NEWS.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
## StatescopeR 0.99.0 (3-6-2025)
2-
32
- Initial Bioconductor submission
43

54
## StatescopeR 0.99.1-0.99.6 (16-7-2025 - 26-7-2025)
6-
75
- Fixing Basilisk issues
86

97
## StatescopeR 0.99.7-0.99.21 (28-7-2025 - 23-7-2025)
10-
118
- Adjusting Vignette & Examples to make Check process quick enough to not
129
timeout
1310

1411
## StatescopeR 0.99.22 (22-10-2025)
15-
1612
- Revision after review, in short: Some documentation changes, removal of custom
1713
functions in favor of existing good implementations & removal of new classes in
1814
favor of adding to SummarizedExperiment metadata, see
@@ -23,7 +19,6 @@ for more details.
2319
- Minimizing Vignette & Examples to make Check process quick enough to not
2420
timeout
2521

26-
2722
## StatescopeR 0.99.25-0.99.31 (26-11-2025)
2823
- R dependency >= 4.6.0 reflecting new Bioconductor release and minimized
2924
number of samples for deconvolution for quicker vignette/examples
@@ -43,3 +38,9 @@ and made vignette less minimal
4338

4439
## StatescopeR 0.99.36 (8-4-2026)
4540
- Removed mkl dependency for mac support and removed .bbsoptions for upcoming R universe build system
41+
42+
## StatescopeR 1.0.0 (28-4-2026)
43+
- Bioconductor release!
44+
45+
## StatescopeR 1.0.1 (20-5-2026)
46+
- Deprecation warning of aggregrateAcrossCells and fitTrendVar fix

R/BLADE_deconvolution.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
#' scRNAseq <- scRNAseq[, !scRNAseq$`cell type` %in% celltypes_to_remove]
5050
#'
5151
#' ## Create pseudobulk and normalize to cp10k
52-
#' pseudobulk <- aggregateAcrossCells(scRNAseq, ids = scRNAseq$individual)
53-
#' normcounts(pseudobulk) <- calculateCPM(pseudobulk) / 100
52+
#' pseudobulk <- scuttle::aggregateAcrossCells(scRNAseq, ids = scRNAseq$individual)
53+
#' normcounts(pseudobulk) <- scuttle::calculateCPM(pseudobulk) / 100
5454
#' pseudobulk <- as(pseudobulk, "SummarizedExperiment")
5555
#' rownames(pseudobulk) <- rownames(scRNAseq)
5656
#'

R/Refinement.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
#' scRNAseq <- scRNAseq[, !scRNAseq$`cell type` %in% celltypes_to_remove]
4848
#'
4949
#' ## Create pseudobulk and normalize to cp10k
50-
#' pseudobulk <- aggregateAcrossCells(scRNAseq, ids = scRNAseq$individual)
51-
#' normcounts(pseudobulk) <- calculateCPM(pseudobulk) / 100
50+
#' pseudobulk <- scuttle::aggregateAcrossCells(scRNAseq, ids = scRNAseq$individual)
51+
#' normcounts(pseudobulk) <- scuttle::calculateCPM(pseudobulk) / 100
5252
#' pseudobulk <- as(pseudobulk, "SummarizedExperiment")
5353
#' rownames(pseudobulk) <- rownames(scRNAseq)
5454
#' ## Load signature

R/create_signature.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ create_signature <- function(scRNAseq, hvg_genes = FALSE, n_hvg_genes = 3000L,
6262
## Correct Omega by mean-var trend
6363
new_omega <- omega[, 0] ## make df with same # rows
6464
for (ct in colnames(omega)) {
65-
trend <- fitTrendVar(mu[, ct], omega[, ct])$trend
65+
trend <- scran::fitTrendVar(mu[, ct], omega[, ct])$trend
6666
new_omega[, ct] <- trend(mu[, ct])
6767
}
6868

inst/scripts/example_Statescope.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ true_fractions <- gather_true_fractions(scRNAseq, ids = scRNAseq$individual,
3838
save(true_fractions, file = 'inst/extdata/example_true_fractions.RData')
3939

4040
## Normalize (cp10k) and logtransform scRNAseq
41-
cpm(scRNAseq) <- calculateCPM(scRNAseq)
41+
cpm(scRNAseq) <- scuttle::calculateCPM(scRNAseq)
4242
logcounts(scRNAseq) <- log1p(cpm(scRNAseq)/100)
4343

4444
## Create pseudobulk and normalize to cp10k (logging is done within Statescope)
45-
pseudobulk <- aggregateAcrossCells(scRNAseq, ids = scRNAseq$individual)
46-
normcounts(pseudobulk) <- calculateCPM(pseudobulk)/100
45+
pseudobulk <- scuttle::aggregateAcrossCells(scRNAseq, ids = scRNAseq$individual)
46+
normcounts(pseudobulk) <- scuttle::calculateCPM(pseudobulk)/100
4747
pseudobulk = as(pseudobulk, "SummarizedExperiment")
4848
rownames(pseudobulk) = rownames(scRNAseq)
4949

man/BLADE_deconvolution.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/Refinement.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-BLADE_deconvolution.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ test_that("BLADE deconvolution works properly with prior on simulation data", {
2020
scRNAseq <- scRNAseq[, !scRNAseq$`cell type` %in% celltypes_to_remove]
2121

2222
## Create pseudobulk and normalize to cp10k
23-
pseudobulk <- aggregateAcrossCells(scRNAseq, ids = scRNAseq$individual)
24-
normcounts(pseudobulk) <- calculateCPM(pseudobulk) / 100
23+
pseudobulk <- scuttle::aggregateAcrossCells(scRNAseq, ids = scRNAseq$individual)
24+
normcounts(pseudobulk) <- scuttle::calculateCPM(pseudobulk) / 100
2525
pseudobulk <- as(pseudobulk, "SummarizedExperiment")
2626
rownames(pseudobulk) <- rownames(scRNAseq)
2727

vignettes/StatescopeR.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ StatescopeR takes the following inputs: 1) scRNAseq reference/signature 2) bulk
105105

106106
```{r 'Prepare StatescopeR input'}
107107
## Normalize (cp10k) and logtransform scRNAseq
108-
cpm(scRNAseq) <- calculateCPM(scRNAseq)
108+
cpm(scRNAseq) <- scuttle::calculateCPM(scRNAseq)
109109
logcounts(scRNAseq) <- log1p(cpm(scRNAseq) / 100)
110110
111111
## Create scRNAseq reference/signature with 50 hvg for quick example
@@ -120,8 +120,8 @@ selected_genes <- select_genes(scRNAseq, 30L, 50L,
120120
)
121121
122122
## Create pseudobulk and normalize to cp10k (logging is done within Statescope)
123-
pseudobulk <- aggregateAcrossCells(scRNAseq, ids = scRNAseq$individual)
124-
normcounts(pseudobulk) <- calculateCPM(pseudobulk) / 100
123+
pseudobulk <- scuttle::aggregateAcrossCells(scRNAseq, ids = scRNAseq$individual)
124+
normcounts(pseudobulk) <- scuttle::calculateCPM(pseudobulk) / 100
125125
pseudobulk <- as(pseudobulk, "SummarizedExperiment")
126126
rownames(pseudobulk) <- rownames(scRNAseq)
127127

0 commit comments

Comments
 (0)