checkGeneSymbols: Title Identify outdated or Excel-mogrified gene symbols

Description Usage Arguments Value See Also Examples

View source: R/checkGeneSymbols.R

Description

This function identifies gene symbols which are outdated or may have been mogrified by Excel or other spreadsheet programs. If output is assigned to a variable, it returns a data.frame of the same number of rows as the input, with a second column indicating whether the symbols are valid and a third column with a corrected gene list.

Usage

1
2
checkGeneSymbols(x, unmapped.as.na = TRUE, map = NULL,
  species = "human")

Arguments

x

Vector of gene symbols to check for mogrified or outdated values

unmapped.as.na

If TRUE (default), unmapped symbols will appear as NA in the Suggested.Symbol column. If FALSE, the original unmapped symbol will be kept.

map

Specify if you do not want to use the default maps provided by setting species equal to "mouse" or "human". map can be any other data.frame with colnames(map) identical to c("Symbol", "Approved.Symbol"). The default maps can be updated by running the interactive example below.

species

A character vector of length 1, either "human" (default) or "mouse". If NULL, or anything other than "human" or "mouse", then the map argument must be provided.

Value

The function will return a data.frame of the same number of rows as the input, with corrections possible from map.

See Also

mouse.table for the mouse lookup table, hgnc.table for the human lookup table

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(HGNChelper)
human = c("FN1", "TP53", "UNKNOWNGENE","7-Sep", "9/7", "1-Mar", "Oct4", "4-Oct",
      "OCT4-PG4", "C19ORF71", "C19orf71")
checkGeneSymbols(human)
## mouse
mouse <- c("1-Feb", "Pzp", "A2m")
checkGeneSymbols(mouse, species="mouse")
if (interactive()){
  ##Run checkGeneSymbols with a brand-new map downloaded from HGNC:
  source(system.file("hgncLookup.R", package = "HGNChelper"))
  ## You should save this if you are going to use it multiple times,
  ## then load it from file rather than burdening HGNC's servers.
  save(hgnc.table, file="hgnc.table.rda", compress="bzip2")
  load("hgnc.table.rda")
  checkGeneSymbols(human, species=NULL, map=hgnc.table)
  checkGeneSymbols(human, species=NULL, map=mouse.table)
}

HGNChelper documentation built on May 2, 2019, 6:41 a.m.