Commit 1722636e authored by Gervaise H. Henry's avatar Gervaise H. Henry 🤠

Remove Donor Tz from analysis and add DEG between Pd-Tz and Pgb

parent 128d5c8c
......@@ -19,20 +19,22 @@ if (!dir.exists(paste0("./analysis/vis/diy"))){
dir.create(paste0("./analysis/vis/diy"))
}
Idents(sc10x) <- "samples"
sc10x <- subset(sc10x,idents=c("D17PrPzF_Via","D27PrPzF_Via","D35PrPzF_Via","BPH327PrGF_Via","BPH340PrGF_Via","BPH342PrF_Via"))
sc10x$Phenotype <- sc10x$samples
Idents(sc10x) <- "Phenotype"
sc10x <- RenameIdents(sc10x,"D17PrPzF_Via"="Normal")
sc10x <- RenameIdents(sc10x,"D17PrTzF_Via"="Normal")
sc10x <- RenameIdents(sc10x,"D27PrPzF_Via"="Normal")
sc10x <- RenameIdents(sc10x,"D27PrTzF_Via"="Normal")
sc10x <- RenameIdents(sc10x,"D35PrPzF_Via"="Normal")
sc10x <- RenameIdents(sc10x,"D35PrTzF_Via"="Normal")
sc10x <- RenameIdents(sc10x,"D17PrPzF_Via"="Normal Pz")
#sc10x <- RenameIdents(sc10x,"D17PrTzF_Via"="Normal")
sc10x <- RenameIdents(sc10x,"D27PrPzF_Via"="Normal Pz")
#sc10x <- RenameIdents(sc10x,"D27PrTzF_Via"="Normal")
sc10x <- RenameIdents(sc10x,"D35PrPzF_Via"="Normal Pz")
#sc10x <- RenameIdents(sc10x,"D35PrTzF_Via"="Normal")
sc10x <- RenameIdents(sc10x,"BPH327PrGF_Via"="BPH")
sc10x <- RenameIdents(sc10x,"BPH340PrGF_Via"="BPH")
sc10x <- RenameIdents(sc10x,"BPH342PrF_Via"="BPH")
sc10x$Phenotype <- Idents(sc10x)
sc10x$Phenotype <- factor(sc10x$Phenotype,levels=c("Normal","BPH"))
sc10x$Phenotype <- factor(sc10x$Phenotype,levels=c("Normal Pz","BPH"))
sc10x$`Cell Lineage` <- sc10x$lin
Idents(sc10x) <- "Cell Lineage"
......@@ -108,19 +110,22 @@ postscript(paste0("./analysis/vis/diy/CorrCustom_lin.eps"))
Heatmap(scale(t(cor.lin)),name="Correlation Z-Score",cluster_rows=FALSE,cluster_columns=FALSE,col=rev(heat.colors(2)),top_annotation=cor.lin.ann,row_title="HPCA Cell Types",column_title_side="bottom",column_title="Human Prostate Clusters")
dev.off()
Idents(sc10x.epi) <- "samples"
sc10x.epi <- subset(sc10x.epi,idents=c("D17PrPzF_Via","D27PrPzF_Via","D35PrPzF_Via","BPH327PrGF_Via","BPH340PrGF_Via","BPH342PrF_Via"))
sc10x.epi$Phenotype <- sc10x.epi$samples
Idents(sc10x.epi) <- "Phenotype"
sc10x.epi <- RenameIdents(sc10x.epi,"D17PrPzF_Via"="Normal")
sc10x.epi <- RenameIdents(sc10x.epi,"D17PrTzF_Via"="Normal")
sc10x.epi <- RenameIdents(sc10x.epi,"D27PrPzF_Via"="Normal")
sc10x.epi <- RenameIdents(sc10x.epi,"D27PrTzF_Via"="Normal")
sc10x.epi <- RenameIdents(sc10x.epi,"D35PrPzF_Via"="Normal")
sc10x.epi <- RenameIdents(sc10x.epi,"D35PrTzF_Via"="Normal")
sc10x.epi <- RenameIdents(sc10x.epi,"D17PrPzF_Via"="Normal Pz")
#sc10x.epi <- RenameIdents(sc10x.epi,"D17PrTzF_Via"="Normal")
sc10x.epi <- RenameIdents(sc10x.epi,"D27PrPzF_Via"="Normal Pz")
#sc10x.epi <- RenameIdents(sc10x.epi,"D27PrTzF_Via"="Normal")
sc10x.epi <- RenameIdents(sc10x.epi,"D35PrPzF_Via"="Normal Pz")
#sc10x.epi <- RenameIdents(sc10x.epi,"D35PrTzF_Via"="Normal")
sc10x.epi <- RenameIdents(sc10x.epi,"BPH327PrGF_Via"="BPH")
sc10x.epi <- RenameIdents(sc10x.epi,"BPH340PrGF_Via"="BPH")
sc10x.epi <- RenameIdents(sc10x.epi,"BPH342PrF_Via"="BPH")
sc10x.epi$Phenotype <- Idents(sc10x.epi)
sc10x.epi$Phenotype <- factor(sc10x.epi$Phenotype,levels=c("Normal","BPH"))
sc10x.epi$Phenotype <- factor(sc10x.epi$Phenotype,levels=c("Normal Pz","BPH"))
sc10x.epi$`Cell Type` <- sc10x.epi$pops
sc10x.epi$`Cell Type` <- factor(sc10x.epi$`Cell Type`,levels=c("BE","LE","Hillock","Club","NE"))
......@@ -137,19 +142,22 @@ postscript(paste0("./analysis/vis/diy/Dot_epi.pops.anchor.eps"))
DotPlot(sc10x.epi,features=rev(c("KRT5","KLK3","KRT13","SCGB3A1","CHGA")),dot.scale=10,cols=rev(heat.colors(2)))
dev.off()
Idents(sc10x.fmst) <- "samples"
sc10x.fmst <- subset(sc10x.fmst,idents=c("D17PrPzF_Via","D27PrPzF_Via","D35PrPzF_Via","BPH327PrGF_Via","BPH340PrGF_Via","BPH342PrF_Via"))
sc10x.fmst$Phenotype <- sc10x.fmst$samples
Idents(sc10x.fmst) <- "Phenotype"
sc10x.fmst <- RenameIdents(sc10x.fmst,"D17PrPzF_Via"="Normal")
sc10x.fmst <- RenameIdents(sc10x.fmst,"D17PrTzF_Via"="Normal")
sc10x.fmst <- RenameIdents(sc10x.fmst,"D27PrPzF_Via"="Normal")
sc10x.fmst <- RenameIdents(sc10x.fmst,"D27PrTzF_Via"="Normal")
sc10x.fmst <- RenameIdents(sc10x.fmst,"D35PrPzF_Via"="Normal")
sc10x.fmst <- RenameIdents(sc10x.fmst,"D35PrTzF_Via"="Normal")
sc10x.fmst <- RenameIdents(sc10x.fmst,"D17PrPzF_Via"="Normal Pz")
#sc10x.fmst <- RenameIdents(sc10x.fmst,"D17PrTzF_Via"="Normal")
sc10x.fmst <- RenameIdents(sc10x.fmst,"D27PrPzF_Via"="Normal Pz")
#sc10x.fmst <- RenameIdents(sc10x.fmst,"D27PrTzF_Via"="Normal")
sc10x.fmst <- RenameIdents(sc10x.fmst,"D35PrPzF_Via"="Normal Pz")
#sc10x.fmst <- RenameIdents(sc10x.fmst,"D35PrTzF_Via"="Normal")
sc10x.fmst <- RenameIdents(sc10x.fmst,"BPH327PrGF_Via"="BPH")
sc10x.fmst <- RenameIdents(sc10x.fmst,"BPH340PrGF_Via"="BPH")
sc10x.fmst <- RenameIdents(sc10x.fmst,"BPH342PrF_Via"="BPH")
sc10x.fmst$Phenotype <- Idents(sc10x.fmst)
sc10x.fmst$Phenotype <- factor(sc10x.fmst$Phenotype,levels=c("Normal","BPH"))
sc10x.fmst$Phenotype <- factor(sc10x.fmst$Phenotype,levels=c("Normal Pz","BPH"))
sc10x.fmst$`Cell Type` <- sc10x.fmst$pops
sc10x.fmst$`Cell Type` <- factor(sc10x.fmst$`Cell Type`,levels=c("Fib","SM"))
......@@ -205,3 +213,11 @@ dev.off()
write.table(table(sc10x$`Cell Type`,sc10x$samples),file="./analysis/vis/diy/Table_pops.Samples.csv",sep=",",quote=FALSE,row.names=TRUE,col.names=NA)
write.table(table(sc10x$`Cell Type`,sc10x$Phenotype),file="./analysis/vis/diy/Table_pops.Phenotype.csv",sep=",",quote=FALSE,row.names=TRUE,col.names=NA)
Idents(sc10x) <- "Cell Type"
for (i in c("BE","LE","Hillock","Club","NE","Fib","SM")){
data <- subset(sc10x,idents=i)
Idents(data) <- "Phenotype"
deg <- FindAllMarkers(data,assay="SCT",slot="data",logfc.threshold=0,test.use="MAST")
write.table(deg,file=paste0("./analysis/vis/diy/DEG_pheno.",i,".csv"),sep=",",quote=FALSE,row.names=TRUE,col.names=NA)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment