-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path2c-run_scimpute.R
70 lines (49 loc) · 2.31 KB
/
2c-run_scimpute.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Mo Huang, mohuang@wharton.upenn.edu
# Run scImpute on datasets
# Install version 0.0.2
devtools::install_github("Vivianstats/scImpute",
ref = "287535eca99044bcaa9930caf3e92a7ffa348726")
library(scImpute)
infile <- "csv"
outfile <- "csv"
out_dir <- "SAVER-data"
drop_thre <- 0.5
ncores <- 16
# Melanoma Drop-seq
count_path <- ("SAVER-data/melanoma_dropseq.csv")
fish <- read.table("SAVER-data/fishSubset.txt", header = TRUE, row.names = 1)
gene.names <- rownames(dat)
genes <- which(gene.names %in% colnames(fish))
scimpute(count_path = count_path, infile = infile, outfile = outfile,
out_dir = out_dir, drop_thre = drop_thre, ncores = ncores)
out <- as.matrix(read.csv("SAVER-data/scimpute_count.csv", row.names = 1,
check.names = FALSE))
saveRDS(out[genes, ], "SAVER-data/melanoma_dropseq_scimpute.rds")
# Baron
count_path <- ("SAVER-data/baron_human_samp.csv")
scimpute(count_path = count_path, infile = infile, outfile = outfile,
out_dir = out_dir, drop_thre = drop_thre, ncores = ncores)
out <- as.matrix(read.csv("SAVER-data/scimpute_count.csv", row.names = 1,
check.names = FALSE))
saveRDS(out, "SAVER-data/baron_human_samp_scimpute.rds")
# Chen
count_path <- ("SAVER-data/chen_samp.csv")
scimpute(count_path = count_path, infile = infile, outfile = outfile,
out_dir = out_dir, drop_thre = drop_thre, ncores = ncores)
out <- as.matrix(read.csv("SAVER-data/scimpute_count.csv", row.names = 1,
check.names = FALSE))
saveRDS(out, "SAVER-data/chen_samp_scimpute.rds")
# La Manno
count_path <- ("SAVER-data/manno_human_samp.csv")
scimpute(count_path = count_path, infile = infile, outfile = outfile,
out_dir = out_dir, drop_thre = drop_thre, ncores = ncores)
out <- as.matrix(read.csv("SAVER-data/scimpute_count.csv", row.names = 1,
check.names = FALSE))
saveRDS(out, "SAVER-data/manno_human_samp_scimpute.rds")
# Zeisel
count_path <- ("SAVER-data/zeisel_samp.csv")
scimpute(count_path = count_path, infile = infile, outfile = outfile,
out_dir = out_dir, drop_thre = drop_thre, ncores = ncores)
out <- as.matrix(read.csv("SAVER-data/scimpute_count.csv", row.names = 1,
check.names = FALSE))
saveRDS(out, "SAVER-data/zeisel_samp_scimpute.rds")