add_genesymbol: Adds gene symbols to a table

View source: R/convert_protein_ids.R

add_genesymbolR Documentation

Adds gene symbols to a table

Description

Gather gene symbols from biomart and add them to a data frame.

Usage

add_genesymbol(
  data_table,
  gene_ID_table,
  column_name = "Protein",
  ID1 = "uniprotswissprot",
  ID2 = "hgnc_symbol",
  id.separator = "/",
  copy_nonconverted = TRUE
)

Arguments

data_table

A data frame or file name.

gene_ID_table

A table to match gene identifiers against

column_name

The column name where the original protein identifiers are present.

ID1

The type of the original protein identifiers (e.g. "uniprotswissprot", "ensembl_peptide_id").

ID2

The type of the converted protein identifiers (e.g. "hgnc_symbol", "mgi_symbol", "external_gene_name").

id.separator

Separator between protein identifiers of shared peptides.

copy_nonconverted

Option defining if the identifiers that cannot be converted should be copied.

Value

Returns the data frame with an added column of the converted protein identifiers.

Note

Protein identifiers from shared peptides should be separated by a forward slash. The host of archived ensembl databases can be introduced as well (e.g. "dec2017.archive.ensembl.org")

Author(s)

Peter Blattmann

Examples

{
  gene_ID_table <- data.frame(uniprotswissprot = c("Q01581", "P49327", "P60709"), 
                              hgnc_symbol = c("HMGCS1", "FASN", "ACTB"))
  data_table <- data.frame(Protein = c("Q01581", "P49327", "2/P63261/P60709"), 
                           Abundance = c(100, 3390, 43423))
  add_genesymbol(data_table, gene_ID_table)
  }

peterblattmann/SWATH2stats documentation built on July 2, 2023, 9:42 p.m.