IDMapping: ID Mapping

Description Usage Arguments Value Note Author(s) Examples

View source: R/IDMapping.R

Description

The IDMapping function can map one ID type supported by the WebGestaltR to any other ID type supported by the WebGestaltR. This function can perform the ID mapping for three types of data: a gene list, a gene list with the scores and a gmt file.

Usage

1
2
3
4
IDMapping(organism="hsapiens",dataType="list", inputGeneFile=NULL, 
inputGene=NULL, sourceIdType, targetIdType, collapseMethod="mean", 
is_outputFile=FALSE, outputFileName="",methodType="R",
hostName="http://www.webgestalt.org/")

Arguments

organism

Currently, WebGestaltR supports 12 organisms. Users can use the function listOrganism to check the available organisms.

dataType

The IDMapping function can perform the ID mapping for three types of data: list (a gene list), rnk (a ranked gene list) and gmt (a gmt file).

inputGeneFile

Three types of the files are supported for uploading the data: a txt file for a gene list, a rnk file for a gene list with scores (separated by tab), a gmt file (first column is category id, second one is external link of the category and others are the annotated genes. all columns are separated by tab).

inputGene

Two types of the R objects are supported for uploading the data: an R vector object for a gene list and an R data.frame object for a gene list with scores.

sourceIdType

The ID type of the uploaded data. The supported ID type of the WebGestaltR for the selected organism can be found by the function listIDType.

targetIdType

The target ID type for ID mapping. The supported ID type of the WebGestaltR for the selected organism can be found by the function listIDType.

collapseMethod

The method to collapse the duplicate ids for a gene list with scores before ID mapping. mean, median, min and max represent the mean, median, minimum and maximum of scores for the duplicate ids.

is_outputFile

If is_outputFile is TRUE, the mapping results will be outputted to a file.

outputFileName

The output file name. No extension in the file name and the function will add the extension based on the input data type.

methodType

For the large ID mapping table (e.g. dbSNP mapping table), Users can use R or Python function to read it. Sometimes Python code is faster than the R code. If users select to use Python code to read the mapping table, users should first install python and the module pandas in the computer.

hostName

The server URL for accessing the data. User can use listArchiveURL function to get all archive version URL.

Value

The IDMapping function will output an R data.frame obejct with three types of structure based on the three types of the input data. If the targetIdType is one of entrezgene, genesymbol and genename, the output object will contain four columns for a gene list (userid, genesymbol, genename and entrezgene), five columns for a gene list with scores (userid, genesymbol, genename, entrezgene and score) and six columns for a gmt file (geneset, link, userid, genesymbol, genename and entrezgene). If the targetIdType is other ID type, the data.frame object will add one more column targetid.

Note

Because the IDMapping function will read the mapping tables from the server, the running time for the WebGestaltR function will be also based on the internet speed. Generally, it will take around 20 seconds to perform the ID mapping.

Author(s)

Jing Wang

Examples

1
2
3
4
5
geneFile<-system.file("extdata","interestingGenes.txt",package="WebGestaltR")
#idmap <- IDMapping(organism="hsapiens",dataType="list",
#inputGeneFile=geneFile, sourceIdType="genesymbol",targetIdType="entrezgene",
#is_outputFile=FALSE,outputFileName="",methodType="R",
#hostName="http://www.webgestalt.org/")

WebGestaltR documentation built on May 30, 2017, 8:17 a.m.