xSymbol2GeneID | R Documentation

## Function to convert gene symbols to entrez geneid

### Description

`xSymbol2GeneID` is supposed to convert gene symbols to entrez geneid.

### Usage

    xSymbol2GeneID(data, org = c("human", "mouse"),
    check.symbol.identity = F, details = F, verbose = T,
    RData.location = "http://galahad.well.ox.ac.uk/bigdata")

### Arguments

`data` | an input vector containing gene symbols
`org` | a character specifying an organism. Currently supported organisms are 'human' and 'mouse'. It can be an object 'EG'
`check.symbol.identity` | logical to indicate whether to match the input data via Synonyms for those unmatchable by official gene symbols. By default, it sets to false
`details` | logical to indicate whether to result in a data frame (in great details). By default, it sets to false
`verbose` | logical to indicate whether the messages will be displayed in the screen. By default, it sets to false for no display
`RData.location` | the characters to tell the location of built-in RData files. See `xRDataLoader` for details

### Value

a vector containing entrez geneid with 'NA' for the unmatched if (details set to false); otherwise, a data frame is returned

### Note

If a symbol mapped many times, the one assiged as the "protein-coding" type of gene is preferred.

### See Also

`xEnricherGenes`, `xSocialiserGenes`

### Examples

    ## Not run:
    # Load the library
    library(XGR)

    # a) provide the input Genes of interest (eg 100 randomly chosen human genes)
    ## load human genes
    org.Hs.eg <- xRDataLoader(RData='org.Hs.eg')
    Symbol <- as.character(sample(org.Hs.eg$gene_info$Symbol, 100))
    Symbol

    # b) convert into GeneID
    GeneID <- xSymbol2GeneID(Symbol)

    # c) convert into a data frame
    df <- xSymbol2GeneID(Symbol, details=TRUE)

    # advanced use
    df <- xSymbol2GeneID(Symbol, org=org.Hs.eg, details=TRUE)

    ## End(Not run)