Description Usage Arguments Value Examples
Used to add gene name and logfc values to goana result prior to scrape_revigo
. Allows r2d3_forcegraph
and other graphs to display gene names and logfc values for GO terms.
1 | add_path_genes(go_res, top_table, gslist = NULL, species = "Hs", FDR = 0.05)
|
go_res |
result of call to |
top_table |
result of limma::topTable with |
gslist |
result of |
species |
Used by |
FDR |
false discovery rate cutoff for differentially expressed genes. Numeric value between 0 and 1. |
go_res
with columns SYMBOL
and logFC
containing lists of vectors with gene symbols and logFC
values for genes with adj.P.Val < FDR
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Not run:
## Example of setup assuming you have: y, design, and enids
library(limma)
fit <- lmFit(y, design)
fit <- eBayes(fit)
# add ENTREZID column to fit result (see geneid argument of ?limma::goana)
fit$genes <- data.frame(ENTREZID = enids)
# Standard GO analysis
go_res <- goana(fit, species="Hs")
# Differential expression analysis
top_table <- topTable(fit, n = Inf)
# example for upregulated ontologies
go_up <- go_res[go_res$P.Up < 10e-5 & go_res$P.Up < go_res$P.Down, ]
go_up <- add_path_genes(go_up, top_table)
# column ordering expected by scrape_revigo
go_up <- go_up[, c('P.Up', 'SYMBOL', 'logFC')]
data_dir <- tempdir()
scrape_revigo(data_dir, go_up)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.