Closed alexheubeck closed 4 years ago
Hey @alexheubeck , taking a look at this now. Can you give me the full traceback on top of final error?
I don't have your data so it's hard to infer what might be going wrong because of how general your error is. But this seems to work with flowWorkspace
test data in my hands:
library(flowWorkspace)
library(openCyto)
library(flowDensity)
.flowDensity <- function(fr, pp_res, channels = NA, ...){
if(length(channels)==2)
flowDensity:::.flowDensity.2d(fr, channels = channels, ...)
else
flowDensity:::.flowDensity.1d(fr, channel = channels, ...)
}
register_plugins(fun = .flowDensity, methodName = "flowDensity", dep = "flowDensity", "gating")
gs <- load_gs(system.file("extdata", "gs_manual", package = "flowWorkspaceData"))
gs_add_gating_method(gs,
alias = "flowDensity_pop",
pop = "+",
parent = "not debris",
dims = "CD4,CD8",
gating_method = "flowDensity",
gating_args = "position=c(FALSE,TRUE)")
I used gs_add_gating_method
as a shortcut there, but I can also confirm that it works when pulled from a template csv. Attached as a txt
because apparently GitHub doesn't like csv
attachments:
library(flowWorkspace)
library(openCyto)
library(flowDensity)
.flowDensity <- function(fr, pp_res, channels = NA, ...){
if(length(channels)==2)
flowDensity:::.flowDensity.2d(fr, channels = channels, ...)
else
flowDensity:::.flowDensity.1d(fr, channel = channels, ...)
}
register_plugins(fun = .flowDensity, methodName = "flowDensity", dep = "flowDensity", "gating")
gs <- load_gs(system.file("extdata", "gs_manual", package = "flowWorkspaceData"))
gt <- gatingTemplate("template.csv")
gt_gating(gt, gs)
Oh shoot, I didn't have this line set correctly:
register_plugins(fun = .flowDensity, methodName = "flowDensity", dep = "flowDensity", "gating")
It's working now, thanks for your help!
Good to hear. I'm going to go ahead close this then but let me know if anything else comes up.
Hey @mikejiang and @jacobpwagner,
I'm attempting to use flowDensity to gate a highly variable Treg population, but I'm getting an
add_pop
error. I adapted your comments from Issue #104, here's what I tried so far.flowDensity Wrapper:
Gating Template Line:
When I try gating with this gating template, this is the error I get back:
Please let me know if you have any ideas, thanks!