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
7c3a1dd6
Commit
7c3a1dd6
authored
May 23, 2024
by
Stefano Beretta
Browse files
Update VisualZoneR_analysis.R
parent
15241bb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/VisualZoneR_analysis.R
View file @
7c3a1dd6
...
@@ -72,16 +72,17 @@ for (sample in samples) {
...
@@ -72,16 +72,17 @@ for (sample in samples) {
# Final Zones
# Final Zones
finalScores
<-
masub1
+
masub1liv
finalScores
<-
masub1
+
masub1liv
finalScores
[
finalScores
==
(
-4
)]
<-
"Zone_A"
finalzones
<-
finalScores
finalScores
[
finalScores
==
(
-3
)]
<-
"Zone_B"
finalzones
[
finalzones
==
(
-4
)]
<-
"Zone_A"
finalScores
[
finalScores
==
(
-2
)]
<-
"Zone_C"
finalzones
[
finalzones
==
(
-3
)]
<-
"Zone_B"
finalScores
[
finalScores
==
(
-1
)]
<-
"Zone_D"
finalzones
[
finalzones
==
(
-2
)]
<-
"Zone_C"
finalScores
[
finalScores
==
0
]
<-
"Zone_E"
finalzones
[
finalzones
==
(
-1
)]
<-
"Zone_D"
finalScores
[
finalScores
==
1
]
<-
"Zone_F"
finalzones
[
finalzones
==
0
]
<-
"Zone_E"
finalScores
[
finalScores
==
2
]
<-
"Zone_G"
finalzones
[
finalzones
==
1
]
<-
"Zone_F"
finalScores
[
finalScores
==
3
]
<-
"Zone_H"
finalzones
[
finalzones
==
2
]
<-
"Zone_G"
finalScores
[
finalScores
==
"NaN"
]
<-
NA
finalzones
[
finalzones
==
3
]
<-
"Zone_H"
FinalTable
<-
data.frame
(
SeuratID
=
as.vector
(
as.matrix
(
namesTokeep
)),
datasub1
=
as.vector
(
as.matrix
(
finalScores
)),
drow
=
rep
(
1
:
nrow
(
masub1
),
ncol
(
masub1
)),
dcol
=
rep
(
1
:
ncol
(
masub1
),
nrow
(
masub1
))[
order
(
rep
(
1
:
ncol
(
masub1
),
nrow
(
masub1
)))])
finalzones
[
finalzones
==
"NaN"
]
<-
NA
FinalTable
<-
data.frame
(
SeuratID
=
as.vector
(
as.matrix
(
namesTokeep
)),
datasub1
=
as.vector
(
as.matrix
(
finalzones
)),
drow
=
rep
(
1
:
nrow
(
masub1
),
ncol
(
masub1
)),
dcol
=
rep
(
1
:
ncol
(
masub1
),
nrow
(
masub1
))[
order
(
rep
(
1
:
ncol
(
masub1
),
nrow
(
masub1
)))])
FinalTable
<-
na.omit
(
FinalTable
)
FinalTable
<-
na.omit
(
FinalTable
)
SeuratPos
<-
names
(
crc.integrated
@
active.ident
)
SeuratPos
<-
names
(
crc.integrated
@
active.ident
)
...
...
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