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
|
## (1) 表达矩阵
# BiocManager::install("GSVAdata")
library(GSVAdata)
data(commonPickrellHuang)
### array矩阵
array_mt = exprs(huangArrayRMAnoBatchCommon_eset)
dim(array_mt)
# [1] 11508 36
array_mt[1:4,1:4]
# NA19099 NA18523 NA19144 NA19137
# 8567 8.370526 8.544890 8.270395 8.585984
# 23139 7.536228 7.232781 7.469420 7.801986
# 7580 6.325102 6.405961 6.510249 6.285510
# 55619 9.134495 9.049938 9.704679 9.285202
### count矩阵
count_mt = exprs(pickrellCountsArgonneCQNcommon_eset)
dim(count_mt)
# [1] 11508 36
count_mt[1:4,1:4]
# NA19099 NA18523 NA19144 NA19137
# 8567 326 209 318 343
# 23139 255 169 245 361
# 7580 72 69 124 76
# 55619 487 590 678 540
## (2) 基因集
library(tidyverse)
library(msigdbr)
hm_H = msigdbr(species = "Homo sapiens",
category = "H",
subcategory = NULL) %>% as.data.frame() %>%
dplyr::select(gs_cat, gs_subcat, gs_name, entrez_gene)
hm_H.list = split(hm_H$entrez_gene, hm_H$gs_name)
str(head(hm_H.list))
# List of 6
# $ HALLMARK_ADIPOGENESIS : int [1:210] 19 11194 10449 33 34 35 47 50 51 112 ...
# $ HALLMARK_ALLOGRAFT_REJECTION: int [1:335] 16 6059 10006 43 92 207 322 567 567 586 ...
# $ HALLMARK_ANDROGEN_RESPONSE : int [1:102] 10257 11057 2181 87 9510 11047 9590 207 220 56172 ...
# $ HALLMARK_ANGIOGENESIS : int [1:36] 350 351 894 1281 1290 6372 2260 11167 3685 182 ...
# $ HALLMARK_APICAL_JUNCTION : int [1:231] 58 60 70 71 72 87 88 89 81 81 ...
# $ HALLMARK_APICAL_SURFACE : int [1:46] 102 79602 79602 84632 9465 351 50617 5205 2683 672 ...
|