prepInput: Prepares input gene list for runFedup.

Description Usage Arguments Value Examples

View source: R/genes.R

Description

This function takes any number of test genes and a common background set of genes and properly formats them for to pass to runFedup gene argument.

Usage

1
prepInput(setName, ...)

Arguments

setName

(char) character vector naming gene vectors passed to ... (must include "background" (case sensitive)).

...

(char) n vectors with at least one background set of genes and any number of test genes.

Value

List of length n with gene vectors corresponding to those passed to ....

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Raw gene data file
genesFile <- system.file("extdata",
    "NIHMS1587165-supplement-1587165_Sup_Tab_2.txt", package = "fedup")
genes <- read.delim(genesFile, h = TRUE, as.is = TRUE)
# Prepare gene vectors
b <- unique(genes[, "gene"])
set1 <- unique(genes[which(genes$FASN_merge < -0.4), "gene"])
set2 <- unique(genes[which(genes$FASN_merge > 0.4), "gene"])
setName <- c("background", "negative", "positive")
# Generate input list with background genes and two test set of genes
geneDouble <- prepInput(setName, b, set1, set2)

rosscm/fedup documentation built on July 19, 2021, 2:21 a.m.