Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hypothalamus_light_7TfMRI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GIGA-CRC Human Imaging
Public
FASST
Hypothalamus_light_7TfMRI
Commits
a77d74b4
Commit
a77d74b4
authored
8 months ago
by
Vandewalle Gilles
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
22b1a583
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Statistical_scripts/Performance.R
+155
-0
155 additions, 0 deletions
Statistical_scripts/Performance.R
with
155 additions
and
0 deletions
Statistical_scripts/Performance.R
0 → 100644
+
155
−
0
View file @
a77d74b4
### Script for elife Paper Performance - 18/04/2024
### Install Packages
install.packages
(
"GGally"
)
install.packages
(
"ggplot2"
)
install.packages
(
"ggpubr"
)
install.packages
(
"readxl"
)
install.packages
(
"viridis"
)
install.packages
(
"dplyr"
)
install.packages
(
"viridis"
)
### Load packages
library
(
viridis
)
library
(
"GGally"
)
library
(
"ggplot2"
)
library
(
ggpubr
)
library
(
readxl
)
library
(
dplyr
)
library
(
RColorBrewer
)
### Figure 3 - G,H
### Emotional Task ###
Perf_Emo
<-
read.csv
(
"Hypo_5Con_Analysis_EMO.csv"
)
Perf_Neut
<-
read.csv
(
"Hypo_5Con_Analysis_Neut.csv"
)
EAS
<-
ggplot
(
Perf_Emo
,
aes
(
x
=
RT_Mel_mean
,
y
=
Betas_Emo
,
color
=
as.factor
(
Light
)))
+
geom_point
(
show.legend
=
FALSE
)
+
scale_color_manual
(
values
=
c
(
'#A9A9A9'
,
"#FF8000"
,
"#9ECAE1"
,
"#6BAED6"
,
"#4292C6"
))
+
theme_classic
(
base_size
=
14
)
+
theme
(
axis.text.x
=
element_text
(
color
=
"black"
),
axis.ticks
=
element_line
(
color
=
"black"
)
)
+
xlab
(
"Reaction times (ms)"
)
+
ylab
(
"Emotional Betas (a.u.)"
)
+
labs
(
tag
=
"G"
)
+
scale_y_continuous
(
limits
=
c
(
-4
,
4
))
+
scale_x_continuous
(
limits
=
c
(
800
,
1600
))
+
geom_smooth
(
aes
(
x
=
RT_Mel_mean
,
y
=
Betas_Emo
),
method
=
glm
,
se
=
FALSE
,
show.legend
=
FALSE
,
inherit.aes
=
FALSE
,
colour
=
"black"
)
ENS
<-
ggplot
(
Perf_Neut
,
aes
(
x
=
RT_Mel_mean
,
y
=
Betas_Emo
,
color
=
as.factor
(
Light
)))
+
geom_point
(
show.legend
=
FALSE
)
+
scale_color_manual
(
values
=
c
(
'#A9A9A9'
,
"#FF8000"
,
"#9ECAE1"
,
"#6BAED6"
,
"#4292C6"
))
+
theme_classic
(
base_size
=
14
)
+
theme
(
axis.text.x
=
element_text
(
color
=
"black"
),
axis.ticks
=
element_line
(
color
=
"black"
)
)
+
xlab
(
"Reaction times (ms)"
)
+
ylab
(
"Neutral Betas (a.u.)"
)
+
labs
(
tag
=
"H"
)
+
scale_y_continuous
(
limits
=
c
(
-4
,
4
))
+
scale_x_continuous
(
limits
=
c
(
800
,
1600
))
+
geom_smooth
(
aes
(
x
=
RT_Mel_mean
,
y
=
Betas_Emo
),
method
=
glm
,
se
=
FALSE
,
show.legend
=
FALSE
,
inherit.aes
=
FALSE
,
colour
=
"grey38"
,
linetype
=
"dashed"
)
### Figure 3 - F
RT_emo
<-
ggplot
(
Perf_Emo
,
aes
(
x
=
Light
,
y
=
RT_Mel_mean
,
fill
=
as.factor
(
Light
)))
+
geom_boxplot
(
width
=
20
,
show.legend
=
FALSE
)
+
scale_fill_manual
(
values
=
c
(
'#D9D9D9'
,
"#FDAE6B"
,
"#9ECAE1"
,
"#6BAED6"
,
"#4292C6"
))
+
theme_classic
(
base_size
=
14
)
+
theme
(
axis.text.x
=
element_text
(
color
=
"black"
),
axis.ticks
=
element_line
(
color
=
"black"
)
)
+
xlab
(
"mel EDI"
)
+
ylab
(
"Reaction times (ms)"
)
+
labs
(
tag
=
"F"
)
### Nback Performance ###
Perf_N2
<-
read.csv
(
"2back_PERF.csv"
)
Perf_N0
<-
read.csv
(
"0back_PERF.csv"
)
N2_3
<-
ggplot
(
Perf_N2
,
aes
(
x
=
Accuracy
,
y
=
Hypo3
,
color
=
as.factor
(
Mel
)))
+
geom_point
(
show.legend
=
FALSE
)
+
scale_color_manual
(
values
=
c
(
'#A9A9A9'
,
"#FF8000"
,
"#9ECAE1"
,
"#6BAED6"
,
"#4292C6"
))
+
theme_classic
(
base_size
=
14
)
+
theme
(
axis.text.x
=
element_text
(
color
=
"black"
),
axis.ticks
=
element_line
(
color
=
"black"
)
)
+
xlab
(
"Accuracy"
)
+
ylab
(
"2-back activity estimates (a.u.)"
)
+
labs
(
tag
=
"B"
)
+
scale_y_continuous
(
limits
=
c
(
-1
,
1
))
+
geom_smooth
(
aes
(
x
=
Accuracy
,
y
=
Hypo3
),
method
=
glm
,
se
=
FALSE
,
show.legend
=
FALSE
,
inherit.aes
=
FALSE
,
colour
=
"black"
)
N2_1
<-
ggplot
(
Perf_N2
,
aes
(
x
=
Accuracy
,
y
=
Hypo1
,
color
=
as.factor
(
Mel
)))
+
geom_point
(
show.legend
=
FALSE
)
+
scale_color_manual
(
values
=
c
(
'#A9A9A9'
,
"#FF8000"
,
"#9ECAE1"
,
"#6BAED6"
,
"#4292C6"
))
+
theme_classic
(
base_size
=
14
)
+
theme
(
axis.text.x
=
element_text
(
color
=
"black"
),
axis.ticks
=
element_line
(
color
=
"black"
)
)
+
xlab
(
"Accuracy"
)
+
ylab
(
"2-back Betas (a.u.)"
)
+
labs
(
tag
=
"C"
)
+
scale_y_continuous
(
limits
=
c
(
-2
,
2
))
+
geom_smooth
(
aes
(
x
=
Accuracy
,
y
=
Hypo1
),
method
=
glm
,
se
=
FALSE
,
show.legend
=
FALSE
,
inherit.aes
=
FALSE
,
colour
=
"grey38"
,
linetype
=
"dashed"
)
N2_4
<-
ggplot
(
Perf_N2
,
aes
(
x
=
Accuracy
,
y
=
Hypo4
,
color
=
as.factor
(
Mel
)))
+
geom_point
(
show.legend
=
FALSE
)
+
scale_color_manual
(
values
=
c
(
'#A9A9A9'
,
"#FF8000"
,
"#9ECAE1"
,
"#6BAED6"
,
"#4292C6"
))
+
theme_classic
(
base_size
=
14
)
+
theme
(
axis.text.x
=
element_text
(
color
=
"black"
),
axis.ticks
=
element_line
(
color
=
"black"
)
)
+
xlab
(
"Accuracy"
)
+
ylab
(
"2-back Betas (a.u.)"
)
+
labs
(
tag
=
"D"
)
+
scale_y_continuous
(
limits
=
c
(
-2
,
2
))
+
geom_smooth
(
aes
(
x
=
Accuracy
,
y
=
Hypo4
),
method
=
glm
,
se
=
FALSE
,
show.legend
=
FALSE
,
inherit.aes
=
FALSE
,
colour
=
"grey38"
,
linetype
=
"dashed"
)
N0_3
<-
ggplot
(
Perf_N0
,
aes
(
x
=
Accuracy
,
y
=
Hypo3
,
color
=
as.factor
(
Mel
)))
+
geom_point
(
show.legend
=
FALSE
)
+
scale_color_manual
(
values
=
c
(
'#A9A9A9'
,
"#FF8000"
,
"#9ECAE1"
,
"#6BAED6"
,
"#4292C6"
))
+
theme_classic
(
base_size
=
14
)
+
theme
(
axis.text.x
=
element_text
(
color
=
"black"
),
axis.ticks
=
element_line
(
color
=
"black"
)
)
+
xlab
(
"Accuracy"
)
+
ylab
(
"0-back Betas (a.u.)"
)
+
labs
(
tag
=
"E"
)
+
scale_y_continuous
(
limits
=
c
(
-2
,
2
))
+
geom_smooth
(
aes
(
x
=
Accuracy
,
y
=
Hypo3
),
method
=
glm
,
se
=
FALSE
,
show.legend
=
FALSE
,
inherit.aes
=
FALSE
,
colour
=
"grey38"
,
linetype
=
"dashed"
)
Acc_N2
<-
ggplot
(
Perf_N2
,
aes
(
x
=
Mel
,
y
=
Accuracy
,
fill
=
as.factor
(
Mel
)))
+
geom_boxplot
(
width
=
20
,
show.legend
=
FALSE
)
+
scale_fill_manual
(
values
=
c
(
'#D9D9D9'
,
"#FDAE6B"
,
"#9ECAE1"
,
"#6BAED6"
,
"#4292C6"
))
+
theme_classic
(
base_size
=
14
)
+
theme
(
axis.text.x
=
element_text
(
color
=
"black"
),
axis.ticks
=
element_line
(
color
=
"black"
)
)
+
xlab
(
"mel EDI"
)
+
ylab
(
"Accuracy"
)
+
labs
(
tag
=
"A"
)
ggarrange
(
N0_3
,
RT_emo
,
EAS
,
ENS
,
nrow
=
2
,
ncol
=
2
)
ggarrange
(
Acc_N2
,
N2_3
,
N2_1
,
N2_4
,
nrow
=
2
,
ncol
=
2
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment