Browse code

Fix the background input bug when the input class is not SingleCellExperiment

Yuan authored on 15/01/2022 01:17:29
Showing 2 changed files

... ...
@@ -246,6 +246,8 @@ setMethod("decontX", "ANY", function(x,
246 246
     # Remove cells with the same ID between x and the background matrix
247 247
     background <- .checkBackground(x = x, background = background,
248 248
                                    logfile = logfile, verbose = verbose)
249
+
250
+    countsBackground <- background
249 251
   }
250 252
 
251 253
   .decontX(
... ...
@@ -6,6 +6,11 @@
6 6
 
7 7
 using namespace Rcpp;
8 8
 
9
+#ifdef RCPP_USE_GLOBAL_ROSTREAM
10
+Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
11
+Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
12
+#endif
13
+
9 14
 // decontXEM
10 15
 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);
11 16
 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) {