Commit d3b0608b authored by Stefano Beretta's avatar Stefano Beretta
Browse files

Update 0_Compute_Zones.R

parent 7c3a1dd6
# Note: The Matrix package version should be 1.6-4 or lower.
library(Seurat)
library(ggplot2)
library(patchwork)
......@@ -21,7 +22,7 @@ dir.create(path = out_dir, showWarnings = F)
analysis_params <- list(
min.feature = 500, # min nFeature_RNA
max.pc.mito = 20, # max percent.mt
mito.prefix = "^mt-", # mito prefix
mito.prefix = "^mt-" # mito prefix
)
# Load Samples
......@@ -90,7 +91,9 @@ DefaultAssay(crc.integrated) <- "integrated"
plot1 <- FeatureScatter(crc.integrated, feature1 = 'nCount_SCT', feature2 = "nCount_Spatial", group.by = "orig.ident")
plot2 <- FeatureScatter(crc.integrated, feature1 = "nFeature_SCT", feature2 = "nCount_Spatial", group.by = "orig.ident")
plot3 <- FeatureScatter(crc.integrated, feature1 = "percent_mito", feature2 = "nFeature_Spatial", group.by = "orig.ident")
CombinePlots(plots = list(plot1, plot2,plot3))
png(filename = paste(out_dir, "IntegratedObj_QC.png", sep = "/"), width = 1200, height = 1000, res = 100)
print(plot1 + plot2 + plot3)
dev.off()
# Scale data
crc.integrated <- ScaleData(crc.integrated, verbose = FALSE)
crc.integrated <- RunPCA(crc.integrated, npcs = 70, verbose = FALSE)
......
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