Description Usage Arguments Value Examples
View source: R/as_annotation_list.R
Convert a data frame with gene sets and gene names in separate columns into a list of gene sets, in which the names of the list are the gene sets and the entries are vectors of genes.
1 | as_annotation_list(annotations, set_col, gene_col)
|
annotations |
a data frame containing some annotations |
set_col |
the name of the column that contains the gene sets (e.g. Gene Ontology terms) |
gene_col |
the name of the column that contains the annotated targets (e.g. UniProt accessions) |
a named list where the names are found in keyCol and the entries are unique items from termCol
1 2 3 4 5 6 7 8 9 | # set up a gene set data frame
ann_df = data.frame(pathway = c('a', 'a', 'a', 'b', 'c'),
gene = c('gene_1', 'gene_2', 'gene_3', 'gene_1',
'gene_3'))
ann = as_annotation_list(ann_df, 'pathway', 'gene')
str(ann)
# go = read_gpa("goa_human.gpa.gz")
# ann = as_annotation_list(go, "GO ID", "DB Object ID")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.