Guest User

Untitled

a guest
Dec 18th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. biocLite("SingleCellExperiment")
  2. biocLite("scran")
  3. library(SingleCellExperiment)
  4. library(scran)
  5. list_of_sce <- list()
  6. # Looping though the UMI_count 'split_factor' columns at a time
  7. split_factor = 500
  8. for(i in seq(1,ncols, split_factor)) {
  9. num_loop = floor(i / split_factor) + 1
  10. idx = ncols
  11. if (i + split_factor < ncols) {
  12. idx = i + split_factor
  13. }
  14. sce <- SingleCellExperiment(list(counts=UMI_count[, i : idx]))
  15. # Normalization of the dataset containing
  16. # heterogenous cell data (different cell types)
  17. clusters <- quickCluster(sce)
  18. sce <- computeSumFactors(sce, cluster=clusters)
  19. list_of_sce[[num_loop]] <- sce
  20. }
  21. cbind(list_of_sce)
Add Comment
Please, Sign In to add comment