Open pmanko opened 6 years ago
subject_group
name as a CLI argument (https://stackoverflow.com/questions/825748/how-to-pass-command-line-arguments-to-a-rake-task)A great starting place would be to get a complete grasp on the input and output file formats. Let's do this in this issue chain.
The file formats (example file with either column names or heading information) that we need are:
Note: all of these files can be found in the IPM/Projects/Database Project/Data Sources/Actigraphy
folder
Example Columns: -``` "SUBJECT_CODE","FILE_PATH","START_TIME","END_TIME","EPOCH_LENGTH","CONDITION","NOTES" "1425MX72","/X/People/Research Staff/Beckett_Scott/Actigraphy/FD Actigraphy_11.30.2012/1425MX72/LUC712.txt",1997-02-05 10:55:00,1997-02-12 21:58:00,1,"S1","NO LIGHT DATA Pre and Post admit times established from study protocol .RPJ file" "1425MX72","/X/People/Research Staff/Beckett_Scott/Actigraphy/FD Actigraphy_11.30.2012/1425MX72/LUC03167.txt",1997-03-03 11:29:00,1997-03-16 11:20:00,1,"S2","NO LIGHT DATA Pre and Post admit times established from study protocol .RPJ file" "1425MX72","/X/People/Research Staff/Beckett_Scott/Actigraphy/FD Actigraphy_11.30.2012/1425MX72/LUC04037.txt",1997-03-21 15:23:00,1997-04-03 15:20:00,1,"S3","NO LIGHT DATA Pre and Post admit times established from study protocol .RPJ file" "1425MX72","/X/People/Research Staff/Beckett_Scott/Actigraphy/FD Actigraphy_11.30.2012/1425MX72/LUC04097.txt",1997-04-03 16:13:00,1997-04-10 13:07:00,1,"L1","NO LIGHT DATA Pre and Post admit times established from study protocol .RPJ file" "1425MX72","/X/People/Research Staff/Beckett_Scott/Actigraphy/FD Actigraphy_11.30.2012/1425MX72/LUC04237.txt",1997-04-10 13:22:00,1997-04-20 22:24:00,1,"L2","NO LIGHT DATA Pre and Post admit times established from study protocol .RPJ file"
# Actigraphy files used as input
For example:
`smb://cifs2/dscd_t$/IPM`
24B7GXT3_L1 07-Aug-2007 15:22 4 34 P6307330451000 F 187 , 73.5 94 , 74.5 115 , 22.2 711 , 10.2 1609 , 11.6 280 , 2.7 271 , 1.2 104 , 0.6 833 , 16.6 689 , 27.9
# Merged Output Files:
subject_code,labtime_decimal,labtime_year,labtime_hour,labtime_min,labtime_sec,activity_count,light_level,epoch_length
1425MX72,1911.3833333333334,1997,1911,23,0,242.0,"",60
1425MX72,1911.4,1997,1911,24,0,114.0,"",60
1425MX72,1911.4166666666667,1997,1911,25,0,224.0,"",60
1425MX72,1911.4333333333334,1997,1911,26,0,260.0,"",60
1425MX72,1911.45,1997,1911,27,0,180.0,"",60
1425MX72,1911.4666666666667,1997,1911,28,0,54.0,"",60
1425MX72,1911.4833333333333,1997,1911,29,0,60.0,"",60
1425MX72,1911.5,1997,1911,30,0,152.0,"",60
1425MX72,1911.5166666666667,1997,1911,31,0,154.0,"",60
1425MX72,1911.5333333333333,1997,1911,32,0,192.0,"",60
1425MX72,1911.55,1997,1911,33,0,200.0,"",60
1425MX72,1911.5666666666666,1997,1911,34,0,216.0,"",60
1425MX72,1911.5833333333333,1997,1911,35,0,216.0,"",60
1425MX72,1911.6,1997,1911,36,0,164.0,"",60
Relevant commit: https://github.com/bwhsleepamu/access/commit/2120fcc96a4718db2848779752d5e8ba7df83661