Skip to content

Commit 9da857e

Browse files
fixes
1 parent a7abc62 commit 9da857e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

scripts/batch-effect-removal.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ colnames(design) <- snakemake@params[["model_variables"]]
2828
saveRDS(design, file=snakemake@output[["design_matrix"]])
2929

3030
# remove batch effects based on variables
31-
batch.removed <- removeBatchEffect(normcounts(sce), covariates=model.vars[, snakemake@params[["model_variables"]]])
32-
normcounts(sce) <- batch.removed
31+
batch.removed <- removeBatchEffect(logcounts(sce), covariates=model.vars[, snakemake@params[["model_variables"]]])
32+
logcounts(sce) <- batch.removed
3333
saveRDS(sce, file=snakemake@output[["sce"]])

scripts/hvg-correlation.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dev.off()
4242
# choose significantly correlated genes
4343
chosen <- unique(c(var.cor$gene1[sig.cor], var.cor$gene2[sig.cor]))
4444
# get normalized expressions
45-
norm.exprs <- exprs(sce)[chosen,,drop=FALSE]
45+
norm.exprs <- logcounts(sce)[chosen,,drop=FALSE]
4646

4747

4848
# plot heatmap

0 commit comments

Comments
 (0)