convertId: convertId

Description Usage Arguments Details Examples

View source: R/convertId.R

Description

A function to convert ID based on the biomaRt package.

Usage

1
2
3
4
convertId(x, dataset = "hsapiens_gene_ensembl",
  filters = "uniprotswissprot", attributes = c(filters,
  "entrezgene_id"), 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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="uniprotswissprot",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_id",attributes =c("entrezgene_id","uniprotswissprot"),
keepNoId=FALSE)

## End(Not run)

slzhao/KEGGprofile documentation built on Oct. 27, 2020, 4:29 a.m.