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) {
# Final Zones
finalScores
<-
masub1
+
masub1liv
finalScores
[
finalScores
==
(
-4
)]
<-
"Zone_A"
finalScores
[
finalScores
==
(
-3
)]
<-
"Zone_B"
finalScores
[
finalScores
==
(
-2
)]
<-
"Zone_C"
finalScores
[
finalScores
==
(
-1
)]
<-
"Zone_D"
finalScores
[
finalScores
==
0
]
<-
"Zone_E"
finalScores
[
finalScores
==
1
]
<-
"Zone_F"
finalScores
[
finalScores
==
2
]
<-
"Zone_G"
finalScores
[
finalScores
==
3
]
<-
"Zone_H"
finalScores
[
finalScores
==
"NaN"
]
<-
NA
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
<-
finalScores
finalzones
[
finalzones
==
(
-4
)]
<-
"Zone_A"
finalzones
[
finalzones
==
(
-3
)]
<-
"Zone_B"
finalzones
[
finalzones
==
(
-2
)]
<-
"Zone_C"
finalzones
[
finalzones
==
(
-1
)]
<-
"Zone_D"
finalzones
[
finalzones
==
0
]
<-
"Zone_E"
finalzones
[
finalzones
==
1
]
<-
"Zone_F"
finalzones
[
finalzones
==
2
]
<-
"Zone_G"
finalzones
[
finalzones
==
3
]
<-
"Zone_H"
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
)
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