Description Usage Arguments Value Examples
Takes a data frame or tibble that maps genes to annotations, and creates either a list of genes or a list of annotation terms that can be ussed with annFUN.gene2GO or annFUN.GO2genes.
1 | annots_to_geneGO(annots, direction = "geneID2GO")
|
annots |
A tibble or data frame that has columns 'gene_id' and 'annots'. Column 'annots' must be a comma-separated charachter string with all the terms that annotate a given 'gene_id'. |
direction |
Either "geneID2GO" or "GO2geneID". Direction of the list that is produced. |
A named list. If 'direction = "geneID2GO"', then the list has one element per 'gene_id' (named after that gene), and each element of the list is a character vector with all the terms that annotate that gene. If 'direction = "GO2geneID"', the the list has one element per annotation term in 'annots' (named after that term), and each element of the list is a character vector with all the genes annotated with that term.
1 2 3 4 | d <- tibble::tibble(gene_id = c('gene1', 'gene2', 'gene3'),
terms = c(NA, 'term1,term2', 'term2, term3'))
annots_to_geneGO(d, direction = "geneID2GO")
annots_to_geneGO(d, direction = "GO2geneID")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.