Description Usage Arguments Details Value See Also Examples
View source: R/GO_terms_analysis.R
Find enriched GO terms
Create the Gene to GO Term mapping
1 2 3 4 5 6 7 8 9 | find_enriched_go_terms(
assignments,
gene_id_to_go,
ontology = "BP",
weighted = FALSE,
node_size = 10
)
create_go_term_mapping(genes, gene_col = "refseq_mrna")
|
assignments |
boolean named vector determining the gene subset to be tested for enrichment of GO terms. The names of the vector should be the gene names. Elements with TRUE will consist of the gene cluster. |
gene_id_to_go |
List giving the Gene ID to GO object required for topGO
(see |
ontology |
string, optional, default: BP. specficies which ontology to
use (passed to |
weighted |
boolean, optional, default: FALSE. Whether to use the
weighted algorithm or not in |
node_size |
integer, optional, default: 10. Consider only GO terms with
node_size number of genes, passed to |
genes |
dataframe, with two required columns. The first gives the gene
names, with column name by the argument |
gene_col |
the name of the column of the |
find_enriched_go_terms
is a wrapper for running a GO
enrichment analysis via the package topGO
. This function creates a
topGOdata-class
object, runs the function
runTest
to test for enrichment using the
statistic="fisher"
option, and then runs
GenTable
. This function then does some post-processing
of the results, returning only GO terms that satisfy:
BH adjusted p-values less than 0.05 using
p.adjust
GO terms are enriched, i.e. the number of genes from the GO term found in the subset is greater than expected
Returns results in the format of GenTable
.
create_go_term_mapping
returns a list giving the gene to GO id
in the format required by topGOdata-class
.
create_go_term_mapping
, find_enriched_pathway
, GenTable
, runTest
, topGOdata-class
, p.adjust
1 2 3 4 5 6 7 8 | data(exampleData)
head(testGenesGO) #gives the mapping of genes to GO
geneId2Go <- create_go_term_mapping(testGenesGO)
#create fake assignment of genes to group based on TRUE/FALSE values
inGroup=rep(FALSE,nrow(testData))
inGroup[1:10]=TRUE
names(inGroup) <- row.names(testData)
find_enriched_go_terms(inGroup, geneId2Go)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.