plot_enrichment_results: plot_enrichment_results

Description Usage Arguments Value Examples

View source: R/network_plots.R

Description

Plot GO and KEGG enrichment results

Usage

1
2
3
plot_enrichment_results(enriched_results,
  term_description = "term_description", sig_score = "pvalue",
  num_terms = 0, get_log = TRUE, fill_color = "darkgray")

Arguments

enriched_results

GO or KEGG enrichment results. See xina_enrichment and xina_enrichment

term_description

Description of terms to be drawn on Y axis. Default is "term_description" of XINA enrichment results.

sig_score

significant score to plot on X axis. Default is "pvalue".

num_terms

The number of terms to be plotted. Default is 0, which menas no limit.

get_log

If this is TRUE, 'plot_enrichment_results' will take -log10 of p-values.

fill_color

Default is 'darkgray'. You can change color of bars.

Value

ggplot bar graph

Examples

 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: 
library(STRINGdb)

# load XINA example data
data(xina_example)

# Get STRING database for protein-protein intereaction information
string_db <- STRINGdb$new( version="10", species=9606,
score_threshold=0, input_directory="" )
string_db

# XINA analysis with STRING DB
xina_result <- xina_analysis(example_clusters, string_db)

# Select proteins that showed cluster #1 in the Stimulus2 condition
subgroup <- subset(example_clusters$aligned, Stimulus2==1)
protein_list <- as.vector(subgroup$`Gene name`)

# Enrichment test and get significantly enriched functional terms
# that have adjuseted p-value less than 0.1
kegg_enriched <- xina_enrichment(string_db, protein_list,
enrichment_type = "KEGG", pval_threshold=0.1)
plot_enrichment_results(kegg_enriched$KEGG, num_terms=10)

## End(Not run)

XINA documentation built on Nov. 8, 2020, 5:32 p.m.