addAnnotationsToDataSet: Add Annotations To DESeqDataSet

Description Usage Arguments Details Value See Also Examples

Description

addAnnotationsToDataSet adds annotations from a dataframe containing gene symbols and/or GO terms to the DESeqDataSet object.

Usage

1

Arguments

dds

A DESeqDataSet object.

ann

A data.frame containing gene symbols and/or delimited GO terms.

Details

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.

Value

A DESeqDataSet object with annotations.

See Also

Other annotation functions: annotateDataset, getGOlist, getGeneSymbols, importAnnotation

Examples

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)

sanger-pathogens/deago documentation built on May 28, 2019, 8:42 a.m.