Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/drosoAnnotationConvertor.R
This function converts an initial data vector named by non-entrez ids to the same vector but with entrez ids, and vice versa. Genes for which no mapping were found will be removed. This function can also take a matrix, with gene identifiers as row names.
1 2 | drosoAnnotationConvertor(geneList, initialIDs = "Entrez.gene", finalIDs =
"Entrez.gene", keepMultipleMappings = TRUE, verbose=TRUE)
|
geneList |
a named integer or numeric vector, or a matrix with rows named by gene identifiers |
initialIDs |
a single character value specifying the type of initial identifiers for input 'geneList'. The current version can take one of the following types: "Ensembl.transcript", "Ensembl.prot", "Ensembl.gene", "Entrez.gene", "RefSeq", "Symbol", "GenBank", "Flybase", "FlybaseCG", "FlybaseProt". |
finalIDs |
a single character value specifying the type of final identifiers to which users want to convert. The current version can take one of the following types: "Ensembl.transcript", "Ensembl.prot", "Ensembl.gene", "Entrez.gene", "RefSeq", "Symbol", "GenBank", "Flybase", "FlybaseCG", "FlybaseProt". |
keepMultipleMappings |
a single logical value. If TRUE, the function keeps the entries with multiple mappings (first mapping is kept). If FALSE, the entries with multiple mappings will be discarded. |
verbose |
a single logical value specifying to display detailed messages (when verbose=TRUE) or not (when verbose=FALSE) |
The entries that could not be mapped to any identifiers are removed from the resulting data vector/matrix. This function relies on the org.Dm.eg.dbpackage and therefore only maps
from any identifier to an Entrez gene id, or
from an Entrez gene ID to any identifier
the same data vector/matrix but with names/row names converted.
Camille Terfve, Xin Wang
mammalAnnotationConvertor
, celAnnotationConvertor
, annotationConvertor
1 2 3 4 5 6 7 8 9 10 11 | library(org.Dm.eg.db)
##example 1: convert a named vector
x <- runif(10)
names(x) <- names(as.list(org.Dm.egSYMBOL2EG))[1:10]
xEntrez <- drosoAnnotationConvertor(geneList=x, initialIDs="Symbol",
finalIDs="Entrez.gene")
##example 2: convert a data matrix with row names as gene ids
x <- cbind(runif(10), runif(10))
rownames(x) <- names(as.list(org.Dm.egSYMBOL2EG))[1:10]
xEntrez <- drosoAnnotationConvertor(geneList=x, initialIDs="Symbol",
finalIDs="Entrez.gene")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.