Skip to content

Commit 89874ed

Browse files
committed
adding the latest logic and plots for pull from app
1 parent dab14b5 commit 89874ed

File tree

249 files changed

+806
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+806
-90
lines changed

code/core/acc_new.R

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,7 @@
22
#!/usr/bin/env Rscript
33

44
# Usage: Rscript new_gg.R --project_dir "/Shared/vosslabhpc/Projects/BOOST/InterventionStudy/3-experiment/data/act-int-test/" --deriv_dir "derivatives/GGIR-3.2.6-test/"
5-
library(tidyr)
6-
library(plyr)
75
library(optparse)
8-
if (!requireNamespace("remotes", quietly = TRUE)) {
9-
install.packages("remotes")
10-
}
11-
if (!requireNamespace("GGIR", quietly = TRUE) || packageVersion("GGIR") != "3.2.6") {
12-
remotes::install_version("GGIR", version = "3.2.6", repos = "https://cloud.r-project.org")
13-
}
14-
156
library(GGIR)
167

178
main <- function() {

code/core/gg.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,3 @@ def run_gg(self):
7474
# Optionally, continue to next project or break
7575

7676

77-
# Example usage:
78-
# matched_dict = {...}
79-
# gg = GG(matched_dict, "/path/to/internal", "/path/to/observational")
80-
# gg.run_gg()

code/data.json

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
{
2+
"int": {
3+
"UI": {
4+
"8006": {},
5+
"8037": {},
6+
"8008": {},
7+
"8036": {},
8+
"8022": {},
9+
"8014": {},
10+
"8015": {},
11+
"8024": {},
12+
"8023": {},
13+
"8005": {},
14+
"8002": {},
15+
"8035": {},
16+
"8003": {},
17+
"8004": {},
18+
"8019": {},
19+
"8026": {},
20+
"8021": {},
21+
"8011": {},
22+
"8016": {},
23+
"8020": {},
24+
"8018": {}
25+
}
26+
},
27+
"obs": {
28+
"UI": {
29+
"7105": {},
30+
"7102": {},
31+
"7134": {},
32+
"7133": {},
33+
"7049": {},
34+
"7082": {},
35+
"7076": {},
36+
"7085": {},
37+
"7078": {},
38+
"7047": {},
39+
"7040": {},
40+
"7025": {},
41+
"7022": {},
42+
"7041": {},
43+
"7084": {},
44+
"7048": {},
45+
"7083": {},
46+
"7023": {},
47+
"7024": {},
48+
"7012": {},
49+
"7015": {},
50+
"7037": {},
51+
"7030": {},
52+
"7039": {},
53+
"7006": {},
54+
"7001": {},
55+
"7052": {},
56+
"7099": {},
57+
"7090": {},
58+
"7064": {},
59+
"7063": {},
60+
"7097": {},
61+
"7031": {},
62+
"7009": {},
63+
"7096": {},
64+
"7062": {},
65+
"7091": {},
66+
"7054": {},
67+
"7110": {},
68+
"7129": {},
69+
"7116": {},
70+
"7120": {},
71+
"7106": {},
72+
"7137": {},
73+
"7107": {},
74+
"7010": {},
75+
"7017": {},
76+
"7028": {},
77+
"7021": {},
78+
"7026": {},
79+
"7019": {},
80+
"7072": {},
81+
"7086": {},
82+
"7075": {},
83+
"7088": {},
84+
"7043": {},
85+
"7027": {},
86+
"7020": {},
87+
"7016": {},
88+
"7029": {},
89+
"7042": {},
90+
"7080": {},
91+
"7087": {},
92+
"7073": {},
93+
"7056": {},
94+
"7069": {},
95+
"7094": {},
96+
"7067": {},
97+
"7058": {},
98+
"7033": {},
99+
"7034": {},
100+
"7002": {},
101+
"7092": {},
102+
"7059": {},
103+
"7061": {},
104+
"7057": {},
105+
"7068": {},
106+
"7050": {},
107+
"7004": {},
108+
"7003": {},
109+
"7035": {},
110+
"7032": {},
111+
"7122": {},
112+
"7125": {},
113+
"7113": {},
114+
"7114": {},
115+
"7115": {},
116+
"7124": {}
117+
}
118+
}
119+
}

code/docs/gg.md

Lines changed: 2 additions & 2 deletions

code/logs/GGIR_QC_errs.csv

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
Subject,Session,Calibration_Error,Hours_Considered,Cleaning_Code,Valid_Days
2+
sub-7062,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,ERROR: Fewer valid days than worn days
3+
sub-7015,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
4+
sub-7068,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
5+
sub-7086,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
6+
sub-7027,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
7+
sub-7050,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
8+
sub-7120,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
9+
sub-7006,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
10+
sub-7133,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
11+
sub-7049,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
12+
sub-7034,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
13+
sub-7043,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
14+
sub-6015,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,ERROR: Fewer valid days than worn days
15+
sub-6012,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
16+
sub-6018,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
17+
sub-7039,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
18+
sub-7134,ses-1,Pass,Pass,Pass,Pass
19+
sub-7033,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
20+
sub-6020,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
21+
sub-7106,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
22+
sub-7092,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
23+
sub-7001,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,ERROR: Fewer valid days than worn days
24+
sub-7076,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
25+
sub-7057,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
26+
sub-7020,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
27+
sub-7012,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
28+
sub-7115,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
29+
sub-7085,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
30+
sub-7016,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
31+
sub-7061,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
32+
sub-7059,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
33+
sub-7024,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,ERROR: Fewer valid days than worn days
34+
sub-7129,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
35+
sub-7072,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
36+
sub-7096,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
37+
sub-7102,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
38+
sub-7078,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
39+
sub-6016,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
40+
sub-7040,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
41+
sub-7037,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
42+
sub-7030,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
43+
sub-7047,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
44+
sub-7137,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
45+
sub-6011,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,ERROR: Fewer valid days than worn days
46+
sub-7075,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
47+
sub-7002,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
48+
sub-7105,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
49+
sub-7091,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
50+
sub-7124,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
51+
sub-7029,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
52+
sub-7023,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
53+
sub-7054,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
54+
sub-7116,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
55+
sub-7082,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
56+
sub-7088,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
57+
sub-7021,ses-1,Pass,Pass,Pass,ERROR: Fewer valid days than worn days
58+
sub-7056,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
59+
sub-7114,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
60+
sub-7080,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
61+
sub-7019,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
62+
sub-7064,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
63+
sub-6013,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
64+
sub-7032,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
65+
sub-7099,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
66+
sub-7107,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
67+
sub-7094,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
68+
sub-7042,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
69+
sub-7035,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
70+
sub-7048,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
71+
sub-7069,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
72+
sub-7087,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
73+
sub-7113,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
74+
sub-7063,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
75+
sub-7026,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
76+
sub-7022,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
77+
sub-7125,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
78+
sub-7028,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
79+
sub-7010,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,ERROR: Fewer valid days than worn days
80+
sub-7067,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
81+
sub-7083,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
82+
sub-7031,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
83+
sub-6010,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
84+
sub-7009,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
85+
sub-7090,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
86+
sub-7003,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
87+
sub-6022,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
88+
sub-7097,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
89+
sub-7073,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
90+
sub-7004,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
91+
sub-6017,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
92+
sub-7041,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
93+
sub-7017,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
94+
sub-7084,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
95+
sub-7110,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
96+
sub-7025,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
97+
sub-7052,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
98+
sub-7058,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
99+
sub-7122,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
100+
sub-8015,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
101+
sub-8006,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
102+
sub-8020,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
103+
sub-8018,ses-1,Pass,WARNING: Exceeds expected hours (possible worn-day mismatch),ERROR: Invalid cleaning code found,Pass
104+
sub-8016,ses-1,Pass,ERROR: Too few hours considered,Pass,Pass
105+
sub-8024,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,ERROR: Fewer valid days than worn days
106+
sub-8005,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
107+
sub-8037,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
108+
sub-8002,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,ERROR: Fewer valid days than worn days
109+
sub-8008,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,ERROR: Fewer valid days than worn days
110+
sub-8023,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
111+
sub-8011,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
112+
sub-8021,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,ERROR: Fewer valid days than worn days
113+
sub-8019,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
114+
sub-8035,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
115+
sub-8014,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
116+
sub-8026,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
117+
sub-8022,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass
118+
sub-8003,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,ERROR: Fewer valid days than worn days
119+
sub-8004,ses-1,Pass,ERROR: Too few hours considered,Pass,ERROR: Fewer valid days than worn days
120+
sub-8036,ses-1,Pass,ERROR: Too few hours considered,ERROR: Invalid cleaning code found,Pass

code/logs/log.txt~

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +0,0 @@
1-
# IPython log file
2-
3-
INT_DIR = '/Volumes/vosslabhpc/Projects/BOOST/InterventionStudy/3-experiment/data/act-int-test'
4-
OBS_DIR = '/Volumes/vosslabhpc/Projects/BOOST/ObservationalStudy/3-experiment/data/act-obs-test'
5-
RDSS_DIR = '/Volumes/VossLab/Repositories/Accelerometer_Data'
6-
get_ipython().run_line_magic('cd', 'code')
7-
touch log.txt
8-
get_ipython().run_line_magic('ls', '')
9-
get_ipython().run_line_magic('ls', '')
10-
from utils.save import Save
11-
get_ipython().run_line_magic('logstart', 'logs/log.txt')
12-
Save(INT_DIR, OBS_DIR, RDSS_DIR).save()
13-
get_ipython().run_line_magic('logstop', '')

code/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ def run_pipe(self):
2222
daysago=self.daysago
2323
).save()
2424

25-
with open('code/res/data.json', 'w') as file:
25+
with open('res/data.json', 'w') as file:
2626
file.write('{\n}')
2727
file.write(',\n'.join(f' "{key}": "{value}"' for key, value in matched.items()))
2828

29-
# GG(matched=matched, intdir=INT_DIR, obsdir=OBS_DIR).run_gg()
29+
GG(matched=matched, intdir=INT_DIR, obsdir=OBS_DIR).run_gg()
3030
return None
3131

3232
def _create_syms(self):
131 KB
16.8 KB
50.3 KB

0 commit comments

Comments
 (0)