Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions R/gating-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,6 @@ gt_gating.gatingTemplate <- function(x, y, ...) {
gt_node_pop <- gt_get_nodes(gt, node)
parent <- gt_get_parent(gt, node)

if(!is.null(stop.at)){
nodeName <- alias(gt_node_pop)
nodePath <- file.path(parent, nodeName)
matchInd <- grep(stop.pat, nodePath)
if(length(matchInd) == 1)
{
message("stop at: ",stop.at)
break
}

}
# extract gate method from one edge(since multiple edge to the same node is
# redudant)
this_gate <- gt_get_gate(gt, parent, node)
Expand Down Expand Up @@ -164,6 +153,17 @@ gt_gating.gatingTemplate <- function(x, y, ...) {
nodeData(env_fct$fct, node, "fList")[[1]] <- filterObj
}

# terminate gating after stop.at
if(!is.null(stop.at)){
nodeName <- alias(gt_node_pop)
nodePath <- file.path(parent, nodeName)
matchInd <- grep(stop.pat, nodePath)
if(length(matchInd) == 1)
{
message("stop at: ",stop.at)
break
}
}

}
message("finished.")
Expand Down