source("../R/celltype_assign.R")
atlas_markers = Build.Ref.Markers(path = "..//data/jay_cell_markers.txt",sep = '\t',splitter = c("[[:punct:]]","[[:space:]]")) head(atlas_markers)
seurat.out.neg = readRDS('../ShinyDiff_multi/input/WTKICD45NEG_out.rds') seurat.out.neg$conserved.markers
# filter only the positive fold change conserve markers with a max_pval threshold of 0.05 exp.markers.neg = seurat.out.neg$conserved.markers %>% filter(wni_avg_logFC > 0 & max_pval <= 0.05) # rename the first row as gene for the pipeline to run colnames(exp.markers.neg)[1] = "gene" # Insert a column "avg_logFC" as the average of fold change of a marker across 4 different conditions, note that this avg_LogFC field name is necessary for running the pipeline exp.markers.neg = exp.markers.neg %>% mutate(avg_logFC = (wni_avg_logFC+wti_avg_logFC+kii_avg_logFC+kini_avg_logFC)/4) head(exp.markers.neg) # creat a experiemental marker set exp.markers.neg = Build.Exp.Markers(exp.markers.neg) head(exp.markers.neg)
celltype.atlas.neg = Assign.Cell.Type(ref.markers = atlas_markers,exp.markers = exp.markers.neg) head(celltype.atlas.neg)
# save assignment list to a desire directory write.csv(celltype.atlas.neg,file = "../../MAP3K3/output/190815/CD45NEG_atlas.csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.