prepare: Prepare a Data Frame for using GOglm.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/prepare.R

Description

This function incorporates DE test results and gene length information provided by the end-users. It generates a data frame ready to be used by other functions in the GOglm package.

Usage

1
2
  prepare(DE.data, Length.data,
    trans.p = c("n.log", "d.log"), trans.l = FALSE)

Arguments

DE.data

A data frame with valid gene identifiers as row names and one column for the untransformed DE test p-values.

Length.data

A data frame with valid gene identifiers as row names and one column for the untransformed gene lengths (in bp). Note that the gene identifiers must be in the same order as the row names of DE.data, or an error message will appear.

trans.p

How to transform DE test p-values to get significance statistics. Users can use "n.log" for -log(p), or use "d.log" for log(1-log(p)). A panel of histograms can be obtained to evaluate the ranges of the transformed quantities. See Examples below.

trans.l

A logical value indicating whether to transform gene lengths. Default is TRUE.

Details

This function takes two data frames: one is the output from a DE test, and the other contains gene length information. The end-users should confirm that these two data frames have the same gene identifiers as row names. Otherwise an error message will show up.

Value

An object of class prepGOglm with gene identifiers as row names and two columns. The first column contains (transformed) DE test p-values (significance statistics), and the second column contains (transformed) gene lengths. End-users have the choice of applying different transformations to either DE test p-values or gene lengths, or both.

Author(s)

Gu Mi mig@stat.oregonstate.edu, Yanming Di diy@stat.oregonstate.edu

References

Mi G, Di Y, Emerson S, Cumbie JS and Chang JH (2012) "Length bias correction in Gene Ontology enrichment analysis using logistic regression", PLOS ONE, 7(10): e4612.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Load the datasets into R session:
data(ProsCan_DE)
DE.data <- ProsCan_DE
data(ProsCan_Length)
Length.data <- ProsCan_Length

## Prepare a data frame to be passed to goglm():
gene_table <- prepare(DE.data, Length.data, trans.p = "d.log", trans.l = TRUE)

## Check first 10 rows of the data frame:
gene_table[1:10,1:2]

## We can call the summary() function:
summary(gene_table)

## We can also call the plot() function:
plot(gene_table)

gu-mi/GOglm documentation built on May 14, 2019, 7:42 a.m.