-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex01.R
49 lines (36 loc) · 1.16 KB
/
ex01.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# dagdata
library(dagdata)
data(maPooling)
setwd("C:/Users/Yered/Dropbox/CdeC")
library(Biobase)
# RData
load("maPooling.RData")
e <- maPooling
head(rownames(e))
# Plataforma
annotation(e)
# Paquetes para anotacion
library(rae230a.db)
library(AnnotationDbi)
# Keys: campos que se pueden como palabras claves
keytypes(rae230a.db)
# Por ejemplos, podemos usar los nombres de las sondas para acceder a los otros campos de la anotacion
head(keys(rae230a.db, keytype="PROBEID"))
# En nuestas muestras
head(rownames(e))
# Nombres de los Genes
# Ensembl (European Bioinformatics Institute \& Wellcome Trust Sanger Institute )
# Entrez ( National Center for Biotechnology Information)
# Symbol ( Human Genome Organisation)
res <- select(rae230a.db, keys=rownames(e),
columns=c("ENTREZID","ENSEMBL","SYMBOL"),
keytype="PROBEID")
head(res)
# Vamos a agregar esta informacion a nuestras muestras
idx <- match(rownames(e), res$PROBEID)
head(rownames(e))
head(res$PROBEID,7)
fData(e) <- res[idx,]
head(fData(e),10)
# Vamos a asegurarnos que los nombres corresponden
all.equal(fData(e)$PROBEID, rownames(e))