From ed4863d18003ddf639eabf374f476007301e3b5a Mon Sep 17 00:00:00 2001 From: Zizhen Yao Date: Fri, 3 Sep 2021 11:07:59 -0700 Subject: [PATCH] Add RcppParallel dependency --- DESCRIPTION | 4 ++-- R/harmonize.R | 1 + R/util.R | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7ce3b73..568db5f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: scrattch.hicat Title: Hierarchical Iterative Clustering Analysis for Transcriptomic data -Version: 1.0.7 +Version: 1.0.8 Authors@R: c(person("Zizhen", "Yao", email = "zizheny@alleninstitute.org", role = c("aut")), person("Lucas", "Graybuck", email = "lucasg@alleninstitute.org", role = c("aut", "cre")), person("Cindy", "van Velthoven", email = "cindy.vanvelthoven@alleninstitute.org", role = c("aut")), @@ -18,7 +18,7 @@ Encoding: UTF-8 LazyData: TRUE VignetteBuilder: knitr RoxygenNote: 7.0.2 -Requires: Matrix,Rphenograph, +Requires: Matrix,Rphenograph,RcppParallel Imports: Rcpp, BiocNeighbors, diff --git a/R/harmonize.R b/R/harmonize.R index c754308..d9fd16a 100644 --- a/R/harmonize.R +++ b/R/harmonize.R @@ -24,6 +24,7 @@ prepare_harmonize<- function(dat.list, meta.df=NULL, cl.list=NULL, cl.df.list = dat = dat.list[[p]] setNames(rep(p, ncol(dat)), colnames(dat)) })) + platform = factor(platform, names(dat.list)) gene.counts <- do.call("c",lapply(names(dat.list), function(p){ dat = dat.list[[p]] setNames(Matrix::colSums(dat > 0), colnames(dat)) diff --git a/R/util.R b/R/util.R index e06f4d4..fd09ab1 100644 --- a/R/util.R +++ b/R/util.R @@ -714,6 +714,7 @@ get_cl_stats <- function(mat, if(!is.factor(cl)){ cl = as.factor(cl) } + library(RcppParallel) mc.cores = mc.cores setThreadOptions(numThreads = mc.cores) transpose=FALSE