Skip to content

Commit

Permalink
update import based on RGLab/flowStats#16
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/openCyto@109942 bc3139a8-67e5-0310-9ffc-ced21a209358
  • Loading branch information
Mike Jiang committed Oct 26, 2015
1 parent da3132f commit e8263ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LazyLoad: yes
Depends:
flowWorkspace(>= 3.11.10)
Imports:
methods,Biobase,gtools,flowCore(>= 1.31.17),flowViz,ncdfFlow(>= 2.11.34),flowStats(>= 3.23.7),flowClust,MASS,clue,plyr,RBGL,graph,data.table,ks,RColorBrewer,lattice,rrcov,R.utils
methods,Biobase,gtools,flowCore(>= 1.31.17),flowViz,ncdfFlow(>= 2.11.34),flowStats(>= 3.29.1),flowClust,MASS,clue,plyr,RBGL,graph,data.table,ks,RColorBrewer,lattice,rrcov,R.utils
Suggests:
flowWorkspaceData,
knitr,
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ importFrom(graph,nodeData)
importFrom(graph,nodeDataDefaults)
importFrom(graph,subGraph)
importFrom(gtools,permutations)
importFrom(ks,drvkde)
importFrom(ks,hpi)
importFrom(methods,coerce)
importFrom(methods,show)
Expand Down
9 changes: 5 additions & 4 deletions R/gating-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ cytokine <- function(fr, channel, filterId = "", num_peaks = 1,
#' Constructs the derivative specified of the kernel density estimate of a
#' numeric vector
#'
#' The derivative is computed with \code{\link[ks:drvkde]{drvkde}}.
#' The derivative is computed with \code{\link[feature:drvkde]{drvkde}} (feature package 1.2.13)
#'
#' For guidance on selecting the bandwidth, see this CrossValidated post:
#' \url{http://bit.ly/12LkJWz}
Expand All @@ -969,17 +969,18 @@ cytokine <- function(fr, channel, filterId = "", num_peaks = 1,
#' @param adjust a numeric weight on the automatic bandwidth, analogous to the
#' \code{adjust} parameter in \code{\link{density}}
#' @param num_points the length of the derivative of the kernel density estimate
#' @param ... additional arguments passed to \code{\link[ks:drvkde]{drvkde}}
#' @param ... additional arguments passed to \code{drvkde}
#' @return list containing the derivative of the kernel density estimate
#' @importFrom ks hpi drvkde
#' @importFrom ks hpi
.deriv_density <- function(x, deriv = 1, bandwidth = NULL, adjust = 1,
num_points = 10000, ...) {


if (is.null(bandwidth)) {
bandwidth <- hpi(x, deriv.order = deriv)
}
deriv_x <- drvkde(x = x, drv = deriv, bandwidth = adjust * bandwidth,
#we use the private version of drvkde in flowStats (copied from feature package) to avoid the tcltk dependency
deriv_x <- flowStats:::drvkde(x = x, drv = deriv, bandwidth = adjust * bandwidth,
gridsize = num_points, ...)
list(x = deriv_x$x.grid[[1]], y = deriv_x$est)
}
Expand Down

0 comments on commit e8263ce

Please sign in to comment.