Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #239 from vib-singlecell-nf/develop
Browse files Browse the repository at this point in the history
Develop

Former-commit-id: 3cc43ce
  • Loading branch information
dweemx authored Oct 23, 2020
2 parents f792630 + 8f8b31f commit 0932e04
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@
branch = develop
[submodule "src/soupx"]
path = src/soupx
url = git@github.com:vib-singlecell-nf/soupx.git
url = https://github.com/vib-singlecell-nf/soupx.git
branch = develop
14 changes: 8 additions & 6 deletions src/utils/bin/sc_file_converter.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,17 @@ if(INPUT_FORMAT == 'seurat_rds' & OUTPUT_FORMAT == 'h5ad') {
# Reset Seurat slots
if(isTrue(x = args$`seurat_reset`)) {
print("Resetting @graphs in seurat object...")
seurat@graphs<-list()
seurat@graphs <- list()
print("Resetting @reductions in seurat object...")
seurat@reductions<-list()
seurat@reductions <- list()
print("Resetting @neighbors in seurat object...")
seurat@neighbors<-list()
print(paste0("Resetting @assays$",args$`seurat_assay`,"@data in seurat object..."))
seurat@assays[[args$`seurat_assay`]]@data<-matrix(ncol = 0, nrow = 0)
seurat@neighbors <- list()
# Set @assays`<assay>`@data to @assays`<assay>`@counts (as in CreateSeuratObject
# @assays`<assay>`@data cannot be set to empty matrix otherwise row.names(object) will be NULL
print(paste0("Setting @assays$",args$`seurat_assay`,"@data to @assays$",args$`seurat_assay`,"@counts (as in CreateSeuratObject) in seurat object..."))
seurat@assays[[args$`seurat_assay`]]@data <- seurat@assays[[args$`seurat_assay`]]@counts
print(paste0("Resetting @assays$",args$`seurat_assay`,"@scale.data in seurat object..."))
seurat@assays[[args$`seurat_assay`]]@scale.data<-matrix(ncol = 0, nrow = 0)
seurat@assays[[args$`seurat_assay`]]@scale.data <- matrix(ncol = 0, nrow = 0)
}
# Add sample ID as obs entry
seurat <- AddMetaData(
Expand Down

0 comments on commit 0932e04

Please sign in to comment.