loadMappingTable: Generate ID mapping table from input and output ID types

View source: R/download.utilities.R

loadMappingTableR Documentation

Generate ID mapping table from input and output ID types

Description

This function generates the ID mapping table between input and output ID types. If provided a vector of input IDs (limit.to.ids argument), the function will output mapping table only containing the input IDs. Otherwise, the function will output all IDs of input and output types (restricted to a species if working on gene types and specified the 'species' parameter). This function will check if a mapping table exists in local folder ('SBGNview.data.folder' argument), SBGNview.data package, and SBGNhub. If no mapping table is found in these locations, a mapping table is generated using Pathview and saved to path specified by 'SBGNview.data.folder' argument.

Usage

loadMappingTable(
  input.type = NULL,
  output.type = NULL,
  species = NULL,
  mol.type = NULL,
  limit.to.ids = NULL,
  SBGNview.data.folder = "./SBGNview.tmp.data"
)

Arguments

input.type

A character string. Gene or compound ID type

output.type

A character string. Gene or compound ID type

species

A character string. Three letter KEGG species code.

mol.type

A character string. Either 'gene' or 'cpd'.

limit.to.ids

Vector. Molecule IDs of 'input.type'.

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 containing the mapping table.

Examples

 data(mapped.ids)
 entrez.to.pathwayCommons <- loadMappingTable(input.type = 'ENTREZID',
                                              output.type = 'pathwayCommons',
                                              species = 'hsa',
                                              mol.type = 'gene')
                             

datapplab/SBGNview documentation built on June 20, 2022, 9:55 p.m.