Description Usage Arguments Details Value See Also Examples
addAnnotationsToDataSet
adds annotations from a dataframe
containing gene symbols and/or GO terms to the DESeqDataSet
object.
1 | addAnnotationsToDataSet(dds, ann)
|
dds |
A DESeqDataSet object. |
ann |
A data.frame containing gene symbols and/or delimited GO terms. |
The annotation dataframe ann
contains gene symbols and/or GO
terms associated with the genes in the DESeqDataSet object.
Each row in the dataframe represents a gene. The first column contains the
identifiers which correspond to the rownames of the
DESeqDataSet object.
The first column must contain the gene identifiers which correspond to the row names of the DESeqDataSet object. There doesn't need to be an entry for every gene identifier in the DESeqDataSet but, at least one identifier should be represented.
There then follows one or two further columns depending on whether the annotations consist of only gene symbols, only GO terms or both gene symbols and GO terms. Where there are multiple GO terms for a gene, the individual terms should be semi-colon (;) delimited e.g. GO:0004415;GO:0004415;GO:0004415;.
addAnnotationsToDataSet
returns a DESeqDataSet with
annotations stored in the object metadata. Gene symbols will be accessible
using mcols(dds)$symbol
while GO terms will be accessible using
metadata(dds)$go
where dds represents a DESeqDataSet
object.
A DESeqDataSet object with annotations.
Other annotation functions: annotateDataset
,
getGOlist
, getGeneSymbols
,
importAnnotation
1 2 3 4 5 6 7 | library(DESeq2)
dds <- makeExampleDESeqDataSet(n=3)
good_ann <- data.frame( genes=rownames(dds),
gene_names=letters[1:3],
go=c("GO:0000001", "GO:0000001;GO:0000002", ""))
good_ann[] <- lapply(good_ann, as.character)
addAnnotationsToDataSet(dds, good_ann)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.