annotFeaturesWithBiomaRt: Annotation of features using 'biomaRt'

Description Usage Arguments Value Author(s) Examples

View source: R/functions.R

Description

This function annotates a set of features using biomaRt

Usage

1
2
  annotFeaturesWithBiomaRt(features, featureId, geneId,
    mart = useMart(biomart = "ensembl", dataset = "hsapiens_gene_ensembl"))

Arguments

features

Feature IDs to be annotated

featureId

The type of the feature IDs, in the biomaRt way (type listFilters(mart) to choose one)

geneId

The type of the gene IDs, in the biomaRt way (type listAttributes(mart) to choose one)

mart

The mart object (database and dataset) used for annotation, see function useMart of package biomaRt

Value

A vector of gene IDs indexed by the feature IDs.

Author(s)

Anne Biton

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
if (interactive()) {
# define the database to be queried by biomaRt
mart <- useMart(biomart="ensembl", dataset="hsapiens_gene_ensembl")

# annotate a set of HG-U133a probe sets IDs into Gene Symbols
annotFeaturesWithBiomaRt(features = c("1007_s_at", "1053_at", "117_at", "121_at", "1255_g_at"),
featureId="affy_hg_u133a", geneId="hgnc_symbol", mart=mart)

# annotate a set of Ensembl Gene IDs into Gene Symbols
annotFeaturesWithBiomaRt(features = c("ENSG00000101412", "ENSG00000112242",
                                      "ENSG00000148773", "ENSG00000131747", "ENSG00000170312",
                                      "ENSG00000117399"), featureId="ensembl_gene_id", geneId="hgnc_symbol", mart=mart)
}

Bioconductor-mirror/MineICA documentation built on May 29, 2017, 8:30 a.m.