getGeneSymbols: Extract Gene Symbols

Description Usage Arguments Details Value See Also Examples

Description

getGeneSymbols extracts a vector of gene symbols from a dataframe.

Usage

1
getGeneSymbols(dds, ann, col)

Arguments

dds

A DESeqDataSet object.

ann

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

col

An integer representing the index of the column containing gene symbols.

Details

getGeneSymbols requires an annotation dataframe ann and an integer value col which represents the index of the column containing the gene symbols. For example, if the gene symbols were in column 2: getGeneSymbols(ann,2).

At least one of the gene identifiers in the row names of the DESeqDataSet object must be present in the first column of the annotation dataframe ann.

Gene symbols are extracted from the dataframe and any missing identifiers are given a gene symbol of "unknown". There is a final check to ensure that the gene symbol vector is the same length as the row names vector from the DESeqDataSet object.

getGeneSymbols returns a vector of gene symbols associated with the gene identifiers of the DESeqDataSet object.

Value

A vector of gene symbols corresponding to the rownames of the DESeqDataSet object.

See Also

Other annotation functions: addAnnotationsToDataSet, annotateDataset, getGOlist, 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)
getGeneSymbols(dds, good_ann, 2)

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