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
03af2149
Commit
03af2149
authored
Feb 26, 2025
by
Stefano Beretta
Browse files
Update MAGIC_imputation.R
parent
36b00f00
Changes
1
Hide whitespace changes
Inline
Side-by-side
WPRE_mapping/MAGIC_imputation.R
View file @
03af2149
...
...
@@ -43,3 +43,13 @@ full_obj <- AddMetaData(object = full_obj, metadata = md)
# Add WPRE counts to Seurat meta-data
wpre_expr
<-
data.frame
(
"TGeneCAR_WPRE_count"
=
full_obj
@
assays
$
RNA
@
counts
[
"TGeneCAR-WPRE"
,])
full_obj
<-
AddMetaData
(
object
=
full_obj
,
metadata
=
wpre_expr
)
# Select CART
df
<-
FetchData
(
object
=
full_obj
,
c
(
"UMAPh_1"
,
"UMAPh_2"
,
colnames
(
full_obj
@
meta.data
)))
sel_thr
<-
0.05
df
<-
mutate
(
df_final
,
CART_MAGIC
=
ifelse
(
df
$
Annotation
%in%
c
(
"MemoryT"
,
"ActivatedT"
,
"EffectorCd8"
,
"CtlsT"
,
"IfnT"
,
"GammaDelta"
,
"StemLikeT"
)
&
df
$
TGeneCAR_WPRE_MAGIC
>=
sel_thr
,
"CART_MAGIC"
,
"NA"
))
df_cart
<-
df
[,
"CART_MAGIC"
,
drop
=
F
]
full_obj
@
misc
$
analysis_params
[[
"CART_MAGIC_thr"
]]
<-
sel_thr
full_obj
@
meta.data
$
CART_MAGIC
<-
NULL
full_obj
<-
AddMetaData
(
object
=
full_obj
,
metadata
=
df_final_cart
)
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