Skip to content

Commit

Permalink
fix MeanVarPlot edge case, fix NegBinomDETest missing fmla
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwbutler committed May 23, 2017
1 parent 4cce113 commit 3bd092a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: Seurat
Version: 1.4.0.15
Date: 5/17/2017
Version: 1.4.0.16
Date: 5/23/2017
Title: Seurat : R toolkit for single cell genomics
Description: Seurat : R toolkit for single cell genomics.
Author: Rahul Satija
Expand Down
5 changes: 3 additions & 2 deletions R/seurat.R
Original file line number Diff line number Diff line change
Expand Up @@ -2162,9 +2162,10 @@ setMethod("NegBinomDETest", "seurat",
warning(paste0("Skipping gene --", x, ". No variance in expression between the two clusters.", sep = " "))
return(2)
}
fmla <- as.formula(paste0("GENE ", " ~ ", paste(latent.vars, collapse = "+")))
p.estimate <- 2
try(p.estimate <- summary(glm.nb(fmla,data = to.test))$coef[2,4], silent = T)
return(summary(glm.nb(fmla,data = to.test))$coef[2,4])
return(p.estimate)
}))
if(length(which(p_val == 2)) > 0){
genes.use <- genes.use[-which(p_val==2)]
Expand Down Expand Up @@ -4518,7 +4519,7 @@ setMethod("MeanVarPlot", signature = "seurat",
for(i in 1:max.bin) {
my.inds <- ((bin.size * (i - 1)):(bin.size * i - 1))+1
my.inds <- my.inds[my.inds <= length(genes.use)]
genes.iter=genes.use[my.inds]; data.iter=data[genes.iter,]
genes.iter=genes.use[my.inds]; data.iter=data[genes.iter,, drop = F]
data.x[genes.iter]=apply(data.iter,1,fxn.x); data.y[genes.iter]=apply(data.iter,1,fxn.y)
setTxtProgressBar(pb, i)
}
Expand Down

0 comments on commit 3bd092a

Please sign in to comment.