changeIds: Change vector of input IDs to another ID type

Description Usage Arguments Value Examples

View source: R/mapping.utilities.R

Description

This function changes a vector of input IDs to another ID type. It returns a list where each element is the input ID type is mapped to the output ID type. Please note that not every input ID might be mapped to the output type. To change the input IDs to another ID type for a data matrix, use the changeDataId function.

Usage

1
2
3
4
5
6
7
8
9
changeIds(
  input.ids = NULL,
  input.type = NULL,
  output.type = NULL,
  mol.type = NULL,
  limit.to.pathways = NULL,
  org = "hsa",
  SBGNview.data.folder = "./SBGNview.tmp.data"
)

Arguments

input.ids

A vector of character strings. Input IDs that need to be converted.

input.type

A character string. The type of input IDs. Supported ID types can be found in data(mapped.ids)

output.type

A character string. The type of output IDs. Supported ID types can be found in data(mapped.ids)

mol.type

A character string. One of 'gene' or 'cpd'.

limit.to.pathways

A vector of character strings. A vector of pathways IDs. When 'output.type' is one of 'pathwayCommons' or 'metacyc.SBGN', one input ID (e.g. gene symbol) can map to multiple nodes in different pathways (SBGN-ML files). In this case, we can limit output to the specified pathways. When 'output.type' is NOT one of 'pathwayCommons' or 'metacyc.SBGN', this argument is ignored.

org

A character string. Default: "hsa". Three letter KEGG species code.

SBGNview.data.folder

A character string. Default: "./SBGNview.tmp.data". The path to a folder that will hold downloaded ID mapping files and pathway information data files.

Value

A list. Each element is the IDs in output.type that are mapped to one input ID.

Examples

1
2
3
4
5
6
data(mapped.ids)
mapping <- changeIds(input.ids = c(10327, 6652),
                     input.type = 'ENTREZID',
                     output.type = 'pathwayCommons',
                     mol.type = 'gene',
                     org = "hsa")

SBGNview documentation built on March 3, 2021, 2 a.m.