-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathExample_Single_Patient_Script.R
More file actions
30 lines (24 loc) · 1003 Bytes
/
Example_Single_Patient_Script.R
File metadata and controls
30 lines (24 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Example single patient script
library(LQT)
########### Set up config structure ###########
pat_id = "Subject1"
lesion_path = "/Users/JaneGoodall/Study/Images/Subject1/lesion_mask.nii.gz"
parcel_path = system.file("extdata","Schaefer_Yeo_Plus_Subcort",
"100Parcels7Networks.nii.gz",package="LQT")
out_path = "/Users/JaneGoodall/Study/Results"
cfg = create_cfg_object(pat_ids=pat_id,
lesion_paths=lesion_path,
parcel_path=parcel_path,
out_path=out_path)
########### Create Damage and Disconnection Measures ###########
# Get parcel damage for patient
get_parcel_damage(cfg)
# Get tract SDC for patient
get_tract_discon(cfg)
# Get parcel SDC and SSPL measures for patient
get_parcel_cons(cfg)
########### Build and View Summary Plots ###########
plot_lqt_subject(cfg, "parcel.damage")
plot_lqt_subject(cfg, "tract.discon")
plot_lqt_subject(cfg, "parcel.discon")
plot_lqt_subject(cfg, "parcel.sspl")