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
Rossari_SciTraMed_2025
Commits
363bceaf
Commit
363bceaf
authored
Feb 24, 2025
by
Stefano Beretta
Browse files
Upload Analysis Script
parent
f2fee83e
Changes
1
Show whitespace changes
Inline
Side-by-side
Clustering_Analysis/Paper_figures.R
0 → 100644
View file @
363bceaf
library
(
Seurat
)
library
(
ggplot2
)
library
(
dplyr
)
library
(
openxlsx
)
# Set Folders
wdir
<-
"./Clustering_Analysis"
# Figure 5A - Center
df
<-
read.xlsx
(
xlsxFile
=
paste
(
wdir
,
"Full_T_Myelo_metadata.xlsx"
,
sep
=
"/"
),
sheet
=
"Full"
)
df
$
AnnotationRaw
<-
as.factor
(
df
$
AnnotationRaw
)
p
<-
ggplot
(
data
=
df
,
mapping
=
aes
(
x
=
UMAPh_1
,
y
=
UMAPh_2
,
color
=
AnnotationRaw
))
+
theme_void
(
base_size
=
12
)
+
theme
(
legend.position
=
"none"
)
+
geom_point
(
size
=
.3
)
Seurat
::
LabelClusters
(
plot
=
p
,
id
=
"AnnotationRaw"
,
color
=
"black"
,
size
=
5
)
# Figure 5A - T cells
df_t
<-
read.xlsx
(
xlsxFile
=
paste
(
wdir
,
"Full_T_Myelo_metadata.xlsx"
,
sep
=
"/"
),
sheet
=
"Tcell"
)
df_t
$
Annotation
<-
as.factor
(
df_t
$
Annotation
)
p_t
<-
ggplot
(
data
=
df_t
,
mapping
=
aes
(
x
=
UMAPh_1
,
y
=
UMAPh_2
,
color
=
Annotation
))
+
theme_void
(
base_size
=
12
)
+
theme
(
legend.position
=
"none"
)
+
geom_point
(
size
=
.6
)
Seurat
::
LabelClusters
(
plot
=
p_t
,
id
=
"Annotation"
,
color
=
"black"
,
size
=
5
)
ggplot
(
data
=
df_t
,
mapping
=
aes
(
x
=
UMAPh_1
,
y
=
UMAPh_2
))
+
theme_void
(
base_size
=
12
)
+
theme
(
legend.position
=
"none"
)
+
geom_point
(
data
=
subset
(
df_t
,
is.na
(
CART_MAGIC
)),
size
=
.6
,
color
=
"grey80"
)
+
geom_point
(
data
=
subset
(
df_t
,
CART_MAGIC
==
"CART_MAGIC"
),
size
=
.6
,
color
=
"darkred"
)
# Figure 5A - Myeloid cells
df_m
<-
read.xlsx
(
xlsxFile
=
paste
(
wdir
,
"Full_T_Myelo_metadata.xlsx"
,
sep
=
"/"
),
sheet
=
"Myeloid"
)
df_m
$
Annotation
<-
as.factor
(
df_m
$
Annotation
)
p_m
<-
ggplot
(
data
=
df_m
,
mapping
=
aes
(
x
=
UMAPh_1
,
y
=
UMAPh_2
,
color
=
Annotation
))
+
theme_void
(
base_size
=
12
)
+
theme
(
legend.position
=
"none"
)
+
geom_point
(
size
=
.6
)
Seurat
::
LabelClusters
(
plot
=
p_m
,
id
=
"Annotation"
,
color
=
"black"
,
size
=
5
)
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