Browse code

Style check

Yuan authored on 01/10/2021 15:27:46
Showing 2 changed files

... ...
@@ -30,7 +30,7 @@ LinkingTo: Rcpp, RcppEigen
30 30
 License: MIT + file LICENSE
31 31
 Encoding: UTF-8
32 32
 LazyData: true
33
-RoxygenNote: 7.1.1
33
+RoxygenNote: 7.1.2
34 34
 BugReports: https://github.com/campbio/celda/issues
35 35
 biocViews: SingleCell, GeneExpression, Clustering, Sequencing, Bayesian
36 36
 NeedsCompilation: yes
... ...
@@ -495,22 +495,21 @@ setMethod(
495 495
       z = as.integer(res$z),
496 496
       pseudocount = 1e-20
497 497
     )
498
-    
498
+
499 499
     # Speed up sparse matrix value assignment by cbind -> order recovery
500
-    
501
-    allCol <- paste0("col_", 1:ncol(estRmat))
500
+    allCol <- paste0("col_", seq_len(ncol(estRmat)))
502 501
     colnames(estRmat) <- allCol
503
-    
502
+
504 503
     subCol <- paste0("col_", which(batch == bat))
505 504
     colnames(estRmat.temp) <- subCol
506
-    
505
+
507 506
     estRmat <- estRmat[, !(allCol %in% subCol)]
508 507
     estRmat <- cbind(estRmat, estRmat.temp)
509
-    
508
+
510 509
     # Recover order
511 510
     estRmat <- estRmat[, allCol]
512
-    
513
-    #(Old method) estRmat[seq(nrow(counts)), which(batch == bat)] <- estRmat.temp
511
+
512
+    ##estRmat[seq(nrow(counts)), which(batch == bat)] <- estRmat.temp
514 513
     dimnames(estRmat) <- list(geneNames, allCellNames)
515 514
 
516 515
     resBatch[[bat]] <- list(