Learn R Programming

GOexpress (version 1.6.1)

overlap_GO: Shared genes between a list of GO terms.

Description

Given a list of two to five GO terms, overlap_GO() will produce a Venn diagram showing the counts of overlapping genes associated with those GO terms.

Usage

overlap_GO(go_ids, result, filename=NULL, mar=rep(0.1, 4), ...)

Arguments

go_ids
A character vector of GO term identifiers to compare. For instance, head(result$scores$go_id, n=5) to compare the first 5 top- ranked GO terms in theresult variable.
result
The output of GO_analyse() or a subset of it obtained from subset_scores().
filename
The output filename where the Venn diagram will be saved. Default is NULL, displaying the Venn diagram on screen.
mar
The margins around the Venn diagram. Some Venn diagrams place the GO term labels outside the visible frame.
...
Further parameters forwarded to the venn.diagram() function.

Value

Returns the output of the venn.diagram() function.

Warning

An error is returned if the list of GO term identifiers contains less than 2 elements or more than 5, as the underlying venn.diagram() method does not support values outside that range.

See Also

Method venn.diagram.

Examples

Run this code
# load the sample output data with p.values computed
data(AlvMac_results.pVal)

# filter for Biological Processes associated with 5+ genes and <=0.05 P-value
filtered_results <- subset_scores(
    result=AlvMac_results.pVal, total_count=5, p.val=0.05,
    namespace="BP")

# Venn diagram of overlapping genes between top 5 GO terms
overlap_GO(
    go_ids=head(filtered_results$GO$go_id, n=5),
    result=filtered_results, filename="VennDiagram.tiff")

Run the code above in your browser using DataLab