R/RcppExports.R

Defines functions set.count.xml cpp_togleErrorFlag cpp_setLogLevel cpp_getLogLevel cpp_setSample cpp_combineGatingSet cpp_CloneGatingSet cpp_loadGatingSet cpp_saveGatingSet cpp_NewGatingSet_rootOnly cpp_NewGatingSet cpp_getSamples cpp_parseWorkspace cpp_setNodeFlag cpp_setNodeName moveNode cpp_removeNode cpp_setGate cpp_boolGating cpp_addGate cpp_getHiddenFlag cpp_getNegateFlag cpp_getGateFlag cpp_setIndices cpp_getIndices cpp_getGate cpp_gating cpp_computeGates cpp_getTransformations cpp_getCompensation cpp_getPopStats cpp_getChildren cpp_getParent cpp_getNodeID cpp_getNodes cpp_plotGh updateChannels addTrans getSplineCoefs getPopCounts cpp_getSingleCellExpression cpp_getSingleCellExpressionByGate getDescendants

Documented in getDescendants moveNode set.count.xml updateChannels

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' grab all the descendant nodes for a given node
#'
#' This is a faster version of flowIncubator:::getDescendants
#'
#' @param gsPtr external pointer that points to the C data structure of GatingSet
#' @param sampleName sample name
#' @param node node name
.getDescendants <- function(gsPtr, sampleName, node) {
    .Call(`_flowWorkspace_getDescendants`, gsPtr, sampleName, node)
}

.cpp_getSingleCellExpressionByGate <- function(gs, sampleName, markers_pops, data, markers, threshold) {
    .Call(`_flowWorkspace_getSingleCellExpressionByGate`, gs, sampleName, markers_pops, data, markers, threshold)
}

.cpp_getSingleCellExpression <- function(gs, sampleName, pops, data, markers, threshold) {
    .Call(`_flowWorkspace_getSingleCellExpression`, gs, sampleName, pops, data, markers, threshold)
}

#' grab vectors of pop counts and the parent counts along with their paths and FCS filenames
#'
#' This speeds up the process of getPopStats by putting the loop in c++ and avoiding copying while constructing vectors
#'
#' @param gsPtr external pointer that points to the C data structure of GatingSet
#' @param sampleNames sample names vector
#' @param subpopulation population vector that specify the subset of pops to query
#' @param flowJo logical flag to specify whether flowCore or flowJo counts to return
#' @param isFullPath logical flag to specify whether return the full path or partial path of populations
.getPopCounts <- function(gsPtr, sampleNames, subpopulation, flowJo, isFullPath) {
    .Call(`_flowWorkspace_getPopCounts`, gsPtr, sampleNames, subpopulation, flowJo, isFullPath)
}

#' construct the biexpTrans c++ object on the fly
#'
#' It returns the spline coefficients vectors to R.
#'
#' It is used to extract the spline coefficient vectors from the calibration table
#' which is computed by biexpTrans class and then return to R for constructing flowJo transformation function within R.
#' Mainly used for openCyto autoGating process where no xml workspace is needed to create flowJo transformation.
.getSplineCoefs <- function(channelRange = 4096L, maxValue = 262144, pos = 4.5, neg = 0, widthBasis = -10, inverse = FALSE) {
    .Call(`_flowWorkspace_getSplineCoefs`, channelRange, maxValue, pos, neg, widthBasis, inverse)
}

#' store the transformation functions created from R into GatingSet
#'
#' @param gsPtr external pointer that points to the C data structure of GatingSet
#' @param transformList a transformList that constains a list of transformation functions.
#'         Each of these functions carries the attributes to be used to convert to c++ transformation
.addTrans <- function(gsPtr, transformList) {
    invisible(.Call(`_flowWorkspace_addTrans`, gsPtr, transformList))
}

#' Update the channel information of a GatingSet (c++ part)
#' 
#' It updates the channels stored in gates,compensations and transformations
#' based on given mapping between the old and new channel names.
#' 
#' @param gs a GatingSet
#' @param sampleNames the sample names specifies samples to be operated on
#' @param map \code{data.frame} contains the mapping from old to new channel names
#'                             Note: Make sure to remove the '<' or '>' characters from 'old` name because the API tries 
#'                                   to only look at the raw channel name so that the gates with both prefixed and non-prefixed names could be updated. 
#'                                   
#' @examples 
#' \dontrun{
#'  updateChannels(gs, map = data.frame(old = c("Qdot 655-A")  ##this will update both "Qdot 655-A" and "<Qdot 655-A>"
#'                                          , new = c("<QDot 655-A>")
#'                                          )
#'                        , nodes = "14-")  
#'}
.updateChannels <- function(gs, map) {
    invisible(.Call(`_flowWorkspace_updateChannels`, gs, map))
}

.cpp_plotGh <- function(gs, sampleName, output) {
    invisible(.Call(`_flowWorkspace_plotGh`, gs, sampleName, output))
}

.cpp_getNodes <- function(gs, sampleName, order, fullPath, showHidden) {
    .Call(`_flowWorkspace_getNodes`, gs, sampleName, order, fullPath, showHidden)
}

.cpp_getNodeID <- function(gs, sampleName, gatePath) {
    .Call(`_flowWorkspace_getNodeID`, gs, sampleName, gatePath)
}

.cpp_getParent <- function(gs, sampleName, gatePath) {
    .Call(`_flowWorkspace_getParent`, gs, sampleName, gatePath)
}

.cpp_getChildren <- function(gs, sampleName, gatePath, showHidden) {
    .Call(`_flowWorkspace_getChildren`, gs, sampleName, gatePath, showHidden)
}

.cpp_getPopStats <- function(gs, sampleName, gatePath) {
    .Call(`_flowWorkspace_getPopStats`, gs, sampleName, gatePath)
}

.cpp_getCompensation <- function(gs, sampleName) {
    .Call(`_flowWorkspace_getCompensation`, gs, sampleName)
}

.cpp_getTransformations <- function(gs, sampleName, inverse) {
    .Call(`_flowWorkspace_getTransformations`, gs, sampleName, inverse)
}

.cpp_computeGates <- function(gs, sampleName, gainsVec, extend_val, extend_to) {
    invisible(.Call(`_flowWorkspace_computeGates`, gs, sampleName, gainsVec, extend_val, extend_to))
}

.cpp_gating <- function(gs, orig, sampleName, gainsVec, nodeInd, recompute, extend_val, ignore_case, computeTerminalBool, timestep) {
    invisible(.Call(`_flowWorkspace_gating`, gs, orig, sampleName, gainsVec, nodeInd, recompute, extend_val, ignore_case, computeTerminalBool, timestep))
}

.cpp_getGate <- function(gs, sampleName, gatePath) {
    .Call(`_flowWorkspace_getGate`, gs, sampleName, gatePath)
}

.cpp_getIndices <- function(gs, sampleName, gatePath) {
    .Call(`_flowWorkspace_getIndices`, gs, sampleName, gatePath)
}

.cpp_setIndices <- function(gs, sampleName, u, ind) {
    invisible(.Call(`_flowWorkspace_setIndices`, gs, sampleName, u, ind))
}

.cpp_getGateFlag <- function(gs, sampleName, gatePath) {
    .Call(`_flowWorkspace_getGateFlag`, gs, sampleName, gatePath)
}

.cpp_getNegateFlag <- function(gs, sampleName, gatePath) {
    .Call(`_flowWorkspace_getNegateFlag`, gs, sampleName, gatePath)
}

.cpp_getHiddenFlag <- function(gs, sampleName, gatePath) {
    .Call(`_flowWorkspace_getHiddenFlag`, gs, sampleName, gatePath)
}

.cpp_addGate <- function(gs, sampleName, filter, gatePath, popName) {
    .Call(`_flowWorkspace_addGate`, gs, sampleName, filter, gatePath, popName)
}

.cpp_boolGating <- function(gs, sampleName, filter, nodeID) {
    invisible(.Call(`_flowWorkspace_boolGating`, gs, sampleName, filter, nodeID))
}

.cpp_setGate <- function(gs, sampleName, gatePath, filter) {
    invisible(.Call(`_flowWorkspace_setGate`, gs, sampleName, gatePath, filter))
}

.cpp_removeNode <- function(gs, sampleName, gatePath) {
    invisible(.Call(`_flowWorkspace_removeNode`, gs, sampleName, gatePath))
}

#' move a node within the gating tree
#'
#' This is light-weight since it only update the edge in graph and requires user to
#' invoke recompute to update gating
#'
#' @param gsPtr external pointer that points to the C data structure of GatingSet
#' @param sampleName sample name
#' @param node node name
.moveNode <- function(gsPtr, sampleName, node, parent) {
    invisible(.Call(`_flowWorkspace_moveNode`, gsPtr, sampleName, node, parent))
}

.cpp_setNodeName <- function(gs, sampleName, gatePath, newNodeName) {
    invisible(.Call(`_flowWorkspace_setNodeName`, gs, sampleName, gatePath, newNodeName))
}

.cpp_setNodeFlag <- function(gs, sampleName, gatePath, hidden) {
    invisible(.Call(`_flowWorkspace_setNodeFlag`, gs, sampleName, gatePath, hidden))
}

.cpp_parseWorkspace <- function(fileName, sampleIDs, sampleNames, isParseGate, sampNloc, xmlParserOption, wsType) {
    .Call(`_flowWorkspace_parseWorkspace`, fileName, sampleIDs, sampleNames, isParseGate, sampNloc, xmlParserOption, wsType)
}

.cpp_getSamples <- function(gsPtr) {
    .Call(`_flowWorkspace_getSamples`, gsPtr)
}

.cpp_NewGatingSet <- function(gsPtr, sampleName, newSampleNames) {
    .Call(`_flowWorkspace_NewGatingSet`, gsPtr, sampleName, newSampleNames)
}

.cpp_NewGatingSet_rootOnly <- function(sampleNames) {
    .Call(`_flowWorkspace_NewGatingSet_rootOnly`, sampleNames)
}

.cpp_saveGatingSet <- function(gs, fileName) {
    invisible(.Call(`_flowWorkspace_saveGatingSet`, gs, fileName))
}

.cpp_loadGatingSet <- function(fileName) {
    .Call(`_flowWorkspace_loadGatingSet`, fileName)
}

.cpp_CloneGatingSet <- function(gs, samples) {
    .Call(`_flowWorkspace_CloneGatingSet`, gs, samples)
}

.cpp_combineGatingSet <- function(gsList, sampleList) {
    .Call(`_flowWorkspace_combineGatingSet`, gsList, sampleList)
}

.cpp_setSample <- function(gs, oldName, newName) {
    invisible(.Call(`_flowWorkspace_setSample`, gs, oldName, newName))
}

.cpp_getLogLevel <- function() {
    .Call(`_flowWorkspace_getLogLevel`)
}

.cpp_setLogLevel <- function(loglevel) {
    invisible(.Call(`_flowWorkspace_setLogLevel`, loglevel))
}

.cpp_togleErrorFlag <- function() {
    invisible(.Call(`_flowWorkspace_toggleErrorFlag`))
}

#' set the event counts for a given node
#'
#'
#' @param gsPtr external pointer that points to the C data structure of GatingSet
#' @param sampleName sample name
#' @param node node name
#' @param count the event count to be stored
.set.count.xml <- function(gsPtr, sampleName, node, count) {
    invisible(.Call(`_flowWorkspace_setCounts`, gsPtr, sampleName, node, count))
}

Try the flowWorkspace package in your browser

Any scripts or data that you put into this service are public.

flowWorkspace documentation built on May 5, 2018, 2:02 a.m.