getSym: Convert to gene symbols

View source: R/getSym.R

getSymR Documentation

Convert to gene symbols

Description

This function makes use of gprofiler2's 'gconvert' function to convert gene ids in the rownames of the results object or the normalized counts object to a gene symbol for easy labeling in plots.

Usage

getSym(
  object,
  obType = c("res", "counts", "vector"),
  species = "hsapiens",
  target = "HGNC",
  addCol = FALSE
)

Arguments

object

a data.frame object (results or normalized counts) with the rownames as the gene IDs to convert or a character vector of gene IDs to convert

obType

Character vector (one of 'res', 'counts', or 'vector') indicating whether object is a results object, normalized counts object, or character vector of gene IDs, respectively.

species

Character vector indicating the species (e.g. "hsapiens" (default), "mmusculus").

target

Character vector indicating which format of the gene IDs to return (e.g. "HGNC", ENSG", "REFSEQ_MRNA","ENTREZGENE", see https://biit.cs.ut.ee/gprofiler/convert for all options).

addCol

Boolean indicating if an additional column named "SYMBOL" should be added, leaving the rownames as the original format. If FALSE (default), rownames of object will be replaced with gene symbols - duplicate gene symbols will be handled by keeping the symbol with the highest gene expression values.

Details

This will be integrated into the volcanoPlot(), MA_Plot(), and zheat() functions in the future.

Value

A data.frame object in the format indicated by obType with gene symbols as the rownames (if addCol=FALSE) or gene symbols added as their own column named "SYMBOL".


kevincjnixon/BinfTools documentation built on July 10, 2024, 11:46 a.m.