Skip to content

Commit

Permalink
Account for cases where nGene < chunkSize
Browse files Browse the repository at this point in the history
  • Loading branch information
jfouyang committed May 10, 2022
1 parent 04e1118 commit 8bc0b5f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/makeShinyFiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ makeShinyFiles <- function(
space = H5S$new("simple", dims = gex.matdim, maxdims = gex.matdim),
chunk_dims = c(1,gex.matdim[2]))
chk = chunkSize
while(chk > (gex.matdim[1]-8)){
chk = floor(chk / 2) # Account for cases where nGene < chunkSize
}
if(class(obj)[1] == "Seurat"){
# Seurat Object
for(i in 1:floor((gex.matdim[1]-8)/chk)){
Expand Down

0 comments on commit 8bc0b5f

Please sign in to comment.