R/categoryToEntrezBuilder-methods.R

Defines functions getCompToEntrezMap

## ===========================================================================
## universeBuilder method
## ---------------------------------------------------------------------------
## Methods for HyperG test for cellular organizational units
## ---------------------------------------------------------------------------
setMethod("universeBuilder", signature(p="CoHyperGParams"),
          function(p) {
              p@universeGeneIds
          })

## ===========================================================================
## categoryToEntrezBuilder method
## ---------------------------------------------------------------------------
## Methods for HyperG test for cellular organizational units
## ---------------------------------------------------------------------------
setMethod("categoryToEntrezBuilder",
          signature(p="CoHyperGParams"),
          function(p) {
              getCompToEntrezMap(p)
          })



getCompToEntrezMap <- function(p) {
    
    category <- get(p@categoryName)
    apply( category, 2, function(x)  names(which(x>0)))
}

Try the PCpheno package in your browser

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

PCpheno documentation built on Nov. 8, 2020, 5:10 p.m.