-
Notifications
You must be signed in to change notification settings - Fork 19
2 Data imputation de noising (coverage correction)
Alireza Khodadadi-Jamayran edited this page Oct 30, 2019
·
1 revision
- Run data imputation
my.obj <- run.impute(my.obj, dims = 1:10, cell.ratio = 2, data.type = "pca")
# more examples
# my.obj <- run.impute(my.obj, cell.ratio = 2, data.type = "tsne")
# my.obj <- run.impute(my.obj, cell.ratio = 2, data.type = "umap")
# save after imputation
save(my.obj, file = "my.obj.Robj")
# some more plots from another analysis
A=heatmap.gg.plot(my.obj, gene = MyGenes, interactive = F, cluster.by = "clusters", cell.sort = TRUE)
B=heatmap.gg.plot(my.obj, gene = MyGenes, interactive = F, cluster.by = "clusters", data.type = "imputed", cell.sort = TRUE)
C=heatmap.gg.plot(my.obj, gene = MyGenes, interactive = F, cluster.by = "conditions", cell.sort = TRUE)
D=heatmap.gg.plot(my.obj, gene = MyGenes, interactive = F, cluster.by = "none", data.type = "imputed", cell.sort = TRUE)
# If cluster.by = "none", your heamap would have like a Pseudotime effect.
# It calculates the distance between the cells based on the genes in the heatmap.
library(gridExtra)
grid.arrange(A,B,C,D)
# main data
gene.plot(my.obj, gene = "MS4A1",
plot.type = "scatterplot",
interactive = F,
data.type = "main")
# imputed data
gene.plot(my.obj, gene = "MS4A1",
plot.type = "scatterplot",
interactive = F,
data.type = "imputed")
- Plotting conditions and clusters for genes
A <- gene.plot(my.obj, gene = "MS4A1",
plot.type = "scatterplot",
interactive = F,
cell.transparency = 1,
scaleValue = TRUE,
min.scale = 0,
max.scale = 2.5,
back.col = "white",
cond.shape = TRUE)
B <- gene.plot(my.obj, gene = "MS4A1",
plot.type = "scatterplot",
interactive = F,
cell.transparency = 1,
scaleValue = TRUE,
min.scale = 0,
max.scale = 2.5,
back.col = "white",
cond.shape = TRUE,
conds.to.plot = c("KO","WT"))
C <- gene.plot(my.obj, gene = "MS4A1",
plot.type = "boxplot",
interactive = F,
back.col = "white",
cond.shape = TRUE,
conds.to.plot = c("KO"))
D <- gene.plot(my.obj, gene = "MS4A1",
plot.type = "barplot",
interactive = F,
cell.transparency = 1,
back.col = "white",
cond.shape = TRUE,
conds.to.plot = c("KO","WT"))
library(gridExtra)
grid.arrange(A,B,C,D)