subset_scores: Returns a filtered list from GO_analyse results.

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/post_analysis.R

Description

Given an output variable from a GO_analyse analysis and a set of valid filters and thresholds, returns an identically formatted list keeping only the rows of the score table passing all the filters.

Usage

1
2
3
4
5
6
7
subset_scores(result, ...)

# Suggested use:
# on the output of GO_analyse()
# subset_scores(result, total=5, namespace="BP")
# or after application of pValue_GO()
# subset_scores(result, total=5, namespace="BP", p.val=0.05)

Arguments

result

The output of the GO_analyse() function.

...

Additional pairs of filter and threshold values in the format "filter=threshold". Filters must be valid names from colnames(result$GO).

Details

It is highly recommended to filter out GO terms with very few genes (e.g. less than 5 genes), as the scoring function is biased for those GO terms (see UsersGuide).

Suggested filters:

total_count, total: Filter keeping only GO terms associated with at least the given count of genes in the annotations provided.
p.val, p, P: Filter keeping only the GO terms with P-value lower or equal to the given cutoff (This filter is only applicable after the use of the pValue_GO function).
namespace, namespace_1003: Filter keeping only the GO terms of a given type. Valid values are "biological_process", "molecular_function", and "cellular_component". Abbreviations "BP", "MF", and "CC" are also accepted.

Additional filters:

data_count, data: Filter keeping only GO terms associated with at least the given count of genes, present in the ExpressionSet.
ave_rank, rank: Filter keeping only GO terms with an ave_rank value equal or lower than the given cutoff (average of the rank of all genes annotated to the GO term).
ave_score, score: Filter keeping only GO terms with an ave_score value equal or higher than the given cutoff (average of the score of all genes annotated to the GO term) Scores are the mean decrease in Gini index for the random forest, or the F-value for the ANOVA approach.

Value

A list formatted identically to the result object provided, with an added or updated filters.GO slot stating the filters and cutoffs applied, and restricted to:

Note

It is possible to further filter a filter result object. Some warnings may appear if the new filter cutoff conflict with the ones previously applied (stored in the filters.GO slot of the filtered object). Example of conflicting filter values are:

Author(s)

Kevin Rue-Albrecht

See Also

Method GO_analyse.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# load the sample output data
data(AlvMac_results.pVal)

# have an overview of the result variable
str(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")

# have an overview of the filtered result variable
str(filtered_results)

kevinrue/GOexpress documentation built on May 19, 2020, 7:23 p.m.