Last data update: 2014.03.03

R: convertId
convertIdR Documentation

convertId

Description

A function to convert ID based on the biomaRt package.

Usage

convertId(x, dataset = "hsapiens_gene_ensembl",
  filters = "uniprot_swissprot_accession", attributes = c(filters,
  "entrezgene"), genesKept = c("foldchange", "first", "random", "var", "abs"),
  keepNoId = T, keepMultipleId = F, verbose = F)

Arguments

x

the expression data matrix.

dataset

Dataset you want to use. To see the different datasets available within a biomaRt you can e.g. do: mart = useMart('ensembl'), followed by listDatasets(mart).

filters

Filters (one or more) that should be used in the query. A possible list of filters can be retrieved using the function listFilters.

attributes

Attributes you want to retrieve. A possible list of attributes can be retrieved using the function listAttributes.

genesKept

The method to select target gene in more than one targets. "var"/"foldchange"/"abs" means selecting the gene with largest variation/fold change/absolute value. "first" means selecting the first target and "random" means randomly selection.

keepNoId

Logical. Indicate keep the source IDs without target IDs or not.

keepMultipleId

Logical. Indicate keep the multiple target IDs related to one source ID or not.

verbose

Logical. Indicate report extra information on progress or not.

Details

A function to convert ID based on the biomaRt package..

Examples

temp<-cbind(rnorm(10),rnorm(10))
row.names(temp)<-c("Q04837","P0C0L4","P0C0L5","O75379","Q13068","A2MYD1","P60709","P30462","P30475","P30479")
colnames(temp)<-c("Exp1","Exp2")
convertId(temp,filters="uniprot_swissprot",keepMultipleId=TRUE)
## Not run: 
temp<-cbind(rnorm(5000),rnorm(5000),rnorm(5000),rnorm(5000),rnorm(5000),rnorm(5000))
row.names(temp)<-1000:5999
colnames(temp)<-c("Control1","Control2","Control3","Treatment1","Treatment2","Treatment3")
convertId(temp,filters="entrezgene",attributes =c("entrezgene","uniprot_swissprot"),keepNoId=FALSE)

## End(Not run)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(KEGGprofile)

KEGG.db contains mappings based on older data because the original
  resource was removed from the the public domain before the most
  recent update was produced. This package should now be considered
  deprecated and future versions of Bioconductor may not have it
  available.  Users who want more current data are encouraged to look
  at the KEGGREST or reactome.db packages

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/KEGGprofile/convertId.Rd_%03d_medium.png", width=480, height=480)
> ### Name: convertId
> ### Title: convertId
> ### Aliases: convertId
> 
> ### ** Examples
> 
> temp<-cbind(rnorm(10),rnorm(10))
> row.names(temp)<-c("Q04837","P0C0L4","P0C0L5","O75379","Q13068","A2MYD1","P60709","P30462","P30475","P30479")
> colnames(temp)<-c("Exp1","Exp2")
> convertId(temp,filters="uniprot_swissprot",keepMultipleId=TRUE)
                Exp1        Exp2
2543      -2.5429227 -1.58160399
100008586 -2.5429227 -1.58160399
3106      -2.4827436  1.32362740
60         0.1781188 -0.00223901
6742      -0.5056393 -0.32956555
720        0.9987609  1.05572303
721        0.3014162  2.29352819
100293534  0.3014162  2.29352819
8674      -0.1292174 -0.12491376
A2MYD1    -0.5236309  0.35292641
> ## Not run: 
> ##D temp<-cbind(rnorm(5000),rnorm(5000),rnorm(5000),rnorm(5000),rnorm(5000),rnorm(5000))
> ##D row.names(temp)<-1000:5999
> ##D colnames(temp)<-c("Control1","Control2","Control3","Treatment1","Treatment2","Treatment3")
> ##D convertId(temp,filters="entrezgene",attributes =c("entrezgene","uniprot_swissprot"),keepNoId=FALSE)
> ## End(Not run)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>