Skip to content

Commit

Permalink
Remove gdata dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Hoffman committed Jun 25, 2018
1 parent 6a24c4b commit 8cd5736
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Imports:
irlba,
reshape2,
gplots,
gdata,
Rcpp (>= 0.11.0),
tclust,
ranger,
Expand Down Expand Up @@ -102,6 +101,7 @@ Collate:
'zfRenderSeurat.R'
RoxygenNote: 6.0.1
Suggests:
gdata,
testthat,
loomR,
phateR,
Expand Down
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,6 @@ importFrom(dtw,dtw)
importFrom(fitdistrplus,fitdist)
importFrom(foreach,"%dopar%")
importFrom(foreach,foreach)
importFrom(gdata,drop.levels)
importFrom(gdata,interleave)
importFrom(ggplot2,annotation_raster)
importFrom(ggridges,geom_density_ridges)
importFrom(ggridges,theme_ridges)
Expand Down
6 changes: 2 additions & 4 deletions R/interaction.R
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,6 @@ StashIdent <- function(object, save.name = "oldIdent") {
#'
#' @return A Seurat object where object@@ident has been appropriately modified
#'
#' @importFrom gdata drop.levels
#'
#' @export
#'
#' @examples
Expand Down Expand Up @@ -954,7 +952,7 @@ SetIdent <- function(object, cells.use = NULL, ident.use = NULL) {
)
)
object@ident[cells.use] <- ident.use
object@ident <- drop.levels(x = object@ident)
object@ident <- droplevels(x = object@ident)
return(object)
}

Expand Down Expand Up @@ -1194,7 +1192,7 @@ RenameCells <- function(object, add.cell.id = NULL, new.names = NULL,
colnames(object@raw.data) <- new.rawdata.names
rownames(object@meta.data) <- new.cell.names
object@cell.names <- new.cell.names

if (for.merge) {
return(object)
}
Expand Down
12 changes: 8 additions & 4 deletions R/zfRenderSeurat.R
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,13 @@ zf.insitu.ventral <- function(seuratObject, gene, label=TRUE, ...) {
view3d(zoom = .75, userMatrix = rotMat, fov = 0)
}

# @importFrom gdata interleave
#' @importFrom utils installed.packages
#' @export
#' @importFrom gdata interleave
zf.insitu.side <- function(expressionMatrix, nonmirror = TRUE, mirror = TRUE) {
if (!'gdata' %in% rownames(x = installed.packages())) {
stop("Please install gdata")
}
# Determine geometry
tierBins <- 30 # 1 bin per cell tier.
DVBins <- 64 # 1 bin every 5.625 degrees; compatible with our current 8-bin system.
Expand Down Expand Up @@ -641,23 +645,23 @@ zf.insitu.side <- function(expressionMatrix, nonmirror = TRUE, mirror = TRUE) {
}
}
# Take the coordinates and reformat the lists to pass to RGL
quadX <- interleave(
quadX <- gdata::interleave(
drawEmbryo$x1,
drawEmbryo$x2,
drawEmbryo$x3,
drawEmbryo$x4,
drop = TRUE
)
dim(x = quadX) <- c(dim(x = quadX)[1] * dim(x = quadX)[2], 1)
quadY <- interleave(
quadY <- gdata::interleave(
drawEmbryo$y1,
drawEmbryo$y2,
drawEmbryo$y3,
drawEmbryo$y4,
drop = TRUE
)
dim(x = quadY) <- c(dim(x = quadY)[1] * dim(x = quadY)[2], 1)
quadZ <- interleave(
quadZ <- gdata::interleave(
drawEmbryo$z1,
drawEmbryo$z2,
drawEmbryo$z3,
Expand Down

0 comments on commit 8cd5736

Please sign in to comment.