Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
custom
Squadrito_LiverTumor2022
Squadrito_LiverTumor2022_Spatial
Commits
d3b0608b
Commit
d3b0608b
authored
May 23, 2024
by
Stefano Beretta
Browse files
Update 0_Compute_Zones.R
parent
7c3a1dd6
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/0_Compute_Zones.R
View file @
d3b0608b
# 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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment