R/data.R

Defines functions getCoefficients getTargetGenes getAnnotations getHousekeepingGenes

# TODO: Update the data to name the genes using the identifiers Jing suggested

getCoefficients <- function() {
   filepath <- system.file("extdata", 'coefficients.rda', package=.PACKAGE_NAME)
   varName <- load(filepath)

   get(varName)
}

getTargetGenes <- function() {
   geneCoefficients <- getCoefficients()
   geneNames <- rownames(geneCoefficients)[-1]

   geneNames
}

getAnnotations <- function() {
   filepath <- system.file("extdata", 'annotations.csv', package=.PACKAGE_NAME)

   read.csv(filepath, stringsAsFactors=F)
}

getHousekeepingGenes <- function() {
   hkg <- getAnnotations()

   hkg[hkg$Gene.Selection == 'HK4/6', ]
}
Su-informatics-lab/FNASubtype documentation built on Oct. 31, 2019, 12:05 a.m.