tissue_of_interest = "Liver"
source("/restricted/projectnb/waxmanlab/kkarri/scRNAseq_data_integration/boilerplate.R")
#tiss = load_tissue_droplet(tissue_of_interest)
#library(scater)

library(dplyr)
library(Seurat)
library(cowplot)
library(DESeq2)



load("/restricted/projectnb/waxmanlab/kkarri/scRNAseq_data_integration/Robj/combined_marseq_droplet_smart_V1.0_USETHIS_workspace.RData")
PC.markers <- FindConservedMarkers(combined, ident.1 = c("Hepatocytes Pericentral-F","Hepatocytes Pericentral-M"), 
                                   ident.2 = c("Hepatocytes Periportal-M","Hepatocytes Periportal-F","Hepatocytes Periportal-M"), 
                                   grouping.var = 'tissue', verbose = FALSE, test.use="DESeq2")

write.table(PC.markers,file = "/restricted/projectnb/waxmanlab/kkarri/scRNAseq_data_integration/PC_markers.txt", sep = "\t", append = FALSE)
