genInfo: Get gene related information

View source: R/genInfo.R

genInfoR Documentation

Get gene related information

Description

Get gene related information

Usage

genInfo(
  id = NULL,
  org = "hs",
  unique = FALSE,
  keepNA = TRUE,
  hgVersion = c("v38", "v19")
)

Arguments

id

Gene id (symbol, ensembl or entrez id) or uniprot id. If this argument is NULL, return all gene info.

org

Latin organism shortname from 'ensOrg_name'. Default is human.

unique

Logical, if one-to-many mapping occurs, only keep one record with fewest NA. Default is FALSE.

keepNA

If some id has no match at all, keep it or not. Default is TRUE.

hgVersion

Select human genome build version from "v38" (default) and "v19".

Value

A 'data.frame'.

Examples


# example1: input list with fake id and one-to-many mapping id
x <- genInfo(id = c(
  "MCM10", "CDC20", "S100A9", "MMP1", "BCC7",
  "FAKEID", "TP53", "HBD", "NUDT10"
))

# example2: statistics of human gene biotypes
genInfo(org = "hs") %>%
  {
    table(.$gene_biotype)
  }

# example3: use hg19 data
x <- genInfo(id = c("TP53","BCC7"), hgVersion = "v19")

# example4: search genes with case-insensitive
x <- genInfo(id = c("tp53","nc886","FAke","EZh2"), org = "hs", unique = TRUE)



genekitr documentation built on Sept. 8, 2023, 6:06 p.m.