View source: R/ontology_analysis.R
term_2_gene_count | R Documentation |
This function counts the number of genes that are associated with each term of a specified ontology within a given geneset. Furthermore it counts the it counts the number of genes in the geneset that are characterized by the ontology, that is genes that have an annotation in the ontology.
term_2_gene_count(geneset, modus = "GO", category = "BP", GO_slim = FALSE)
geneset |
geneset of interest e.g. up-regulated genes. Must be supplied as character vector of FbgnIDs. |
modus |
"GO" or "PANTHER". Defaults to "GO". |
GO_slim |
logical. If TRUE, the function only uses PANTHER GO slim terms. Defaults to FALSE. |
cagetory |
GO category. Can be set to "BP", "MF", or "CC". Defaults to "BP". |
This function could potentially be extended to use other ontologies, if a mapping between genes and terms of the desired ontology is retrievable from some database. Please use up-to-date Fbgn IDs when using this function. map ezids to goids; no NAs in input allowed; output is list of lists with evidence source information and other information make list of GO_IDs for every Entrez_ids -> list of lists unique to remove replicates from different evidence sources
term_2_gene_count
returns a list of four elements.
The first element identified by "countTable" is a dataframe containing a
column with
the ontology identifers and the number of genes in the geneset that are
annotated to it.
The second
element identified by "num_char" is an integer giving the number of
characterized genes in the geneset.
The third element identified by "num_all"
is an integer giving the number of all genes that are present in
the geneset.
The fourth element identified by "gen_annot_2_ID" is a dataframe with the
Entrez IDs that are annotated to each Ontology ID.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.