Data Summary
The data were downloaded from 10X website https://support.10xgenomics.com/single-cell-gene-expression/datasets/1.3.0/1M_neurons. The original data includes 1,306,127 cells and 27,998 genes.
.libPaths(c("/home/xiaoxiang/R/x86_64-pc-linux-gnu-library/3.5",.libPaths()))
suppressPackageStartupMessages(library(cowplot))
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(ggplot2))
suppressPackageStartupMessages(library(RColorBrewer))
suppressPackageStartupMessages(library(scales))
suppressPackageStartupMessages(library(gridExtra))
suppressPackageStartupMessages(library(grid))
fig_path="/home/xiaoxiang/Documents/DESC_paper_prepare/DESC_paper_final/formal_revised/figures_sep/"
datadirpath="/media/xiaoxiang/D/raw_data/mouse_1million"
dataset="mouse_1million_test"
filename=paste0(datadirpath,"/",dataset,"/adata_desc.h5ad")
Sys.setenv(RETICULATE_PYTHON="/usr/bin/python3")
ad=import("anndata",convert = FALSE)
adata=ad$read_h5ad(filename)
adata=change_obs(adata,exclude=c("n_genes","n_counts"))
#obj=Convert_from_anndata_to_seurat(adata,raw.X.slot="logcount.data"),this data is very large,
Supplementary Figure 16
df=getplotdata(adata,reduction.use = "tsne0.2")
df$desc_0.2=factor(as.numeric(as.character(df$desc_0.2)))
p1=getplot(df,by.group = "desc_0.2",pt.size=0.008)
##Supplementary Figure 16
ggsave(file.path(fig_path,"Figure.S16.tiff"),plot_grid(p1+theme22(22)+theme(legend.key.size = unit(1.0,"cm"))),width=8,height = 7,dpi=300,compression="lzw")
ggsave(file.path(fig_path,"Figure.S16.pdf"),plot_grid(p1+theme22(22)+theme(legend.key.size = unit(1.0,"cm"))),width=8,height = 7,dpi=300)
plot_grid(plot_grid(p1+theme22(22)+theme(legend.key.size = unit(1.0,"cm"))))