Skip to content

Commit

Permalink
Fixed conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-d-campbell committed Oct 3, 2021
2 parents c96bb98 + 588fa5c commit 8698668
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ LinkingTo: Rcpp, RcppEigen
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
RoxygenNote: 7.1.2
BugReports: https://github.com/campbio/celda/issues
biocViews: SingleCell, GeneExpression, Clustering, Sequencing, Bayesian
NeedsCompilation: yes
14 changes: 12 additions & 2 deletions R/decon.R
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,18 @@ setMethod(
pseudocount = 1e-20
)

# This part needs to be optimized
estRmat[seq(nrow(counts)), which(batch == bat)] <- estRmat.temp
# Speed up sparse matrix value assignment by cbind -> order recovery
allCol <- paste0("col_", seq_len(ncol(estRmat)))
colnames(estRmat) <- allCol

subCol <- paste0("col_", which(batch == bat))
colnames(estRmat.temp) <- subCol

estRmat <- estRmat[, !(allCol %in% subCol)]
estRmat <- cbind(estRmat, estRmat.temp)

# Recover order and set names
estRmat <- estRmat[, allCol]
dimnames(estRmat) <- list(geneNames, allCellNames)

resBatch[[bat]] <- list(
Expand Down
5 changes: 5 additions & 0 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// decontXEM
Rcpp::List decontXEM(const Eigen::MappedSparseMatrix<double>& counts, const NumericVector& counts_colsums, const NumericVector& theta, const bool& estimate_eta, const NumericMatrix& eta, const NumericMatrix& phi, const IntegerVector& z, const bool& estimate_delta, const NumericVector& delta, const double& pseudocount);
RcppExport SEXP _celda_decontXEM(SEXP countsSEXP, SEXP counts_colsumsSEXP, SEXP thetaSEXP, SEXP estimate_etaSEXP, SEXP etaSEXP, SEXP phiSEXP, SEXP zSEXP, SEXP estimate_deltaSEXP, SEXP deltaSEXP, SEXP pseudocountSEXP) {
Expand Down

0 comments on commit 8698668

Please sign in to comment.