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.
IDMapping(organism="hsapiens",dataType="list", inputGeneFile=NULL,
inputGene=NULL, sourceIdType, targetIdType, collapseMethod="mean",
is_outputFile=FALSE, outputFileName="",methodType="R",
hostName="http://www.webgestalt.org/")Currently, WebGestaltR supports 12 organisms.
Users can use the function listOrganism to check the available organisms.
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).
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).
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.
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.
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.
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.
If is_outputFile is TRUE, the mapping results will be outputted to a file.
The output file name. No extension in the file name and the function will add the extension based on the input data type.
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.
The server URL for accessing the data. User can use listArchiveURL function
to get all archive version URL.
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.
# NOT RUN {
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/")
# }
Run the code above in your browser using DataLab