-
Notifications
You must be signed in to change notification settings - Fork 59
/
pollen.R
31 lines (29 loc) · 1.36 KB
/
pollen.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
### DATA
d <- read.table("NBT_hiseq_linear_tpm_values.txt")
### ANNOTATIONS
cell_type1 <- colnames(d)
cell_type1[grepl("Hi_2338", cell_type1)] <- "2338"
cell_type1[grepl("Hi_2339", cell_type1)] <- "2339"
cell_type1[grepl("Hi_K562", cell_type1)] <- "K562"
cell_type1[grepl("Hi_BJ", cell_type1)] <- "BJ"
cell_type1[grepl("Hi_HL60", cell_type1)] <- "HL60"
cell_type1[grepl("Hi_iPS", cell_type1)] <- "hiPSC"
cell_type1[grepl("Hi_Kera", cell_type1)] <- "Kera"
cell_type1[grepl("Hi_GW21.2", cell_type1)] <- "GW21+3"
cell_type1[grepl("Hi_GW21", cell_type1)] <- "GW21"
cell_type1[grepl("Hi_NPC", cell_type1)] <- "NPC"
cell_type1[grepl("Hi_GW16", cell_type1)] <- "GW16"
cell_type2 <- colnames(d)
cell_type2[grepl("Hi_K562", cell_type2) | grepl("Hi_HL60", cell_type2) |
grepl("Hi_2339", cell_type2)] <- "blood"
cell_type2[grepl("Hi_BJ", cell_type2) | grepl("Hi_Kera", cell_type2) |
grepl("Hi_2338", cell_type2)] <- "dermal"
cell_type2[grepl("Hi_iPS", cell_type2)] <- "pluripotent"
cell_type2[grepl("Hi_GW21.2", cell_type2) | grepl("Hi_GW21", cell_type2) |
grepl("Hi_NPC", cell_type2) | grepl("Hi_GW16", cell_type2)] <- "neural"
ann <- data.frame(cell_type1 = cell_type1, cell_type2 = cell_type2)
rownames(ann) <- colnames(d)
### SINGLECELLEXPERIMENT
source("../utils/create_sce.R")
sceset <- create_sce_from_normcounts(d, ann)
saveRDS(sceset, "pollen.rds")