plot_enrichment_results {XINA} | R Documentation

## plot_enrichment_results

### Description

Plot GO and KEGG enrichment results

### Usage

    plot_enrichment_results(enriched_results,
      term_description = "term_description", sig_score = "pvalue",
      num_terms = 0, get_log = TRUE)

### 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.

### Value

ggplot bar graph

### Examples

    ## 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)

[Package XINA version 1.0.1 Index]