biomartWrapper: Conversion Between Gene IDs And Names

Description Usage Arguments Details Value See Also

Description

Uses biomart to convert from gene names to IDs and back.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
bm.id2name(
  filter.ids = NULL,
  config = biomartConfigs$hsapiens, 
  ds = bm.init.genes(config), 
  use.buffer = FALSE
)
bm.name2id(
  filter.names = NULL,
  config = biomartConfigs$hsapiens, 
  ds = bm.init.genes(config), 
  use.buffer = FALSE
)

Arguments

filter.ids

Either a vector containing IDs, or a data frame with an appropriate colum. The type of IDs should match the biomart config field gene$filter$id.

filter.names

Either a vector containing gene names, or a data frame with an appropriate colum. The type of namess should match the biomart config field gene$filter$name.

config

A list containing values that are needed for biomaRt connection and data retrieval. See biomartConfigs.

ds

Optionally, a biomart connection object for re-use scenarios to prevent connection overhead.

use.buffer

Uses the buffer variable genes for annotation when it exists and contains valid data in biomart format. See postgwasBuffer for more information on buffer variables. Does not write that variable.

Details

The filter data should not contain NAs.

# all names are unique # only uses but does not set the buffer variable when use.buffer = TRUE # use.buffer causes a merge with buffer data on all common columns

Value

Returns a data frame with an additional column that is named as the biomart config field for Ids (gene$attr$id) or names (gene$attr$name), respectively.

See Also

biomartConfigs


merns/postgwas documentation built on May 22, 2019, 6:53 p.m.