Incorporate DB query for usernames into snakemake workflow.

labels
junos 2021-12-01 18:14:27 +01:00
parent 37b3460b76
commit f0d29d0d1a
3 changed files with 21 additions and 8 deletions

View File

@ -7,16 +7,16 @@ PIDS: [nokia_0000003]
# See https://www.rapids.science/latest/setup/configuration/#automatic-creation-of-participant-files # See https://www.rapids.science/latest/setup/configuration/#automatic-creation-of-participant-files
CREATE_PARTICIPANT_FILES: CREATE_PARTICIPANT_FILES:
USERNAMES_CSV: "data/external/example_usernames.csv" USERNAMES_CSV: "data/external/main_study_usernames.csv"
CSV_FILE_PATH: "data/external/example_participants.csv" # see docs for required format CSV_FILE_PATH: "data/external/main_study_participants.csv" # see docs for required format
PHONE_SECTION: PHONE_SECTION:
ADD: True ADD: True
IGNORED_DEVICE_IDS: [] IGNORED_DEVICE_IDS: []
FITBIT_SECTION: FITBIT_SECTION:
ADD: True ADD: False
IGNORED_DEVICE_IDS: [] IGNORED_DEVICE_IDS: []
EMPATICA_SECTION: EMPATICA_SECTION:
ADD: True ADD: False
IGNORED_DEVICE_IDS: [] IGNORED_DEVICE_IDS: []
# See https://www.rapids.science/latest/setup/configuration/#time-segments # See https://www.rapids.science/latest/setup/configuration/#time-segments

View File

@ -1,4 +1,4 @@
name: rapids202108 name: rapids
channels: channels:
- conda-forge - conda-forge
- defaults - defaults
@ -13,8 +13,8 @@ dependencies:
- blas=1.0 - blas=1.0
- brotlipy=0.7.0 - brotlipy=0.7.0
- bzip2=1.0.8 - bzip2=1.0.8
- ca-certificates=2021.7.5 - ca-certificates
- certifi=2021.5.30 - certifi
- cffi=1.14.4 - cffi=1.14.4
- chardet=3.0.4 - chardet=3.0.4
- click=7.1.2 - click=7.1.2
@ -56,20 +56,23 @@ dependencies:
- numpy=1.19.2 - numpy=1.19.2
- numpy-base=1.19.2 - numpy-base=1.19.2
- openblas=0.3.4 - openblas=0.3.4
- openssl=1.1.1k - openssl
- pandas=1.1.5 - pandas=1.1.5
- pbr=5.5.1 - pbr=5.5.1
- pip=20.3.3 - pip=20.3.3
- plotly=4.14.1 - plotly=4.14.1
- poyo=0.5.0 - poyo=0.5.0
- psutil=5.7.2 - psutil=5.7.2
- psycopg2
- py-xgboost=0.90 - py-xgboost=0.90
- pycparser=2.20 - pycparser=2.20
- pyerfa=1.7.1.1 - pyerfa=1.7.1.1
- pyopenssl=20.0.1 - pyopenssl=20.0.1
- pyprojroot
- pysocks=1.7.1 - pysocks=1.7.1
- python=3.7.9 - python=3.7.9
- python-dateutil=2.8.1 - python-dateutil=2.8.1
- python-dotenv
- python_abi=3.7 - python_abi=3.7
- pytz=2020.4 - pytz=2020.4
- pyyaml=5.3.1 - pyyaml=5.3.1
@ -82,6 +85,7 @@ dependencies:
- six=1.15.0 - six=1.15.0
- smmap=3.0.4 - smmap=3.0.4
- smmap2=3.0.1 - smmap2=3.0.1
- sqlalchemy
- sqlite=3.33.0 - sqlite=3.33.0
- threadpoolctl=2.1.0 - threadpoolctl=2.1.0
- tk=8.6.10 - tk=8.6.10

View File

@ -4,6 +4,15 @@ rule create_example_participant_files:
shell: shell:
"echo 'PHONE:\n DEVICE_IDS: [a748ee1a-1d0b-4ae9-9074-279a2b6ba524]\n PLATFORMS: [android]\n LABEL: test-01\n START_DATE: 2020-04-23 00:00:00\n END_DATE: 2020-05-04 23:59:59\nFITBIT:\n DEVICE_IDS: [a748ee1a-1d0b-4ae9-9074-279a2b6ba524]\n LABEL: test-01\n START_DATE: 2020-04-23 00:00:00\n END_DATE: 2020-05-04 23:59:59\n' >> ./data/external/participant_files/example01.yaml && echo 'PHONE:\n DEVICE_IDS: [13dbc8a3-dae3-4834-823a-4bc96a7d459d]\n PLATFORMS: [ios]\n LABEL: test-02\n START_DATE: 2020-04-23 00:00:00\n END_DATE: 2020-05-04 23:59:59\nFITBIT:\n DEVICE_IDS: [13dbc8a3-dae3-4834-823a-4bc96a7d459d]\n LABEL: test-02\n START_DATE: 2020-04-23 00:00:00\n END_DATE: 2020-05-04 23:59:59\n' >> ./data/external/participant_files/example02.yaml" "echo 'PHONE:\n DEVICE_IDS: [a748ee1a-1d0b-4ae9-9074-279a2b6ba524]\n PLATFORMS: [android]\n LABEL: test-01\n START_DATE: 2020-04-23 00:00:00\n END_DATE: 2020-05-04 23:59:59\nFITBIT:\n DEVICE_IDS: [a748ee1a-1d0b-4ae9-9074-279a2b6ba524]\n LABEL: test-01\n START_DATE: 2020-04-23 00:00:00\n END_DATE: 2020-05-04 23:59:59\n' >> ./data/external/participant_files/example01.yaml && echo 'PHONE:\n DEVICE_IDS: [13dbc8a3-dae3-4834-823a-4bc96a7d459d]\n PLATFORMS: [ios]\n LABEL: test-02\n START_DATE: 2020-04-23 00:00:00\n END_DATE: 2020-05-04 23:59:59\nFITBIT:\n DEVICE_IDS: [13dbc8a3-dae3-4834-823a-4bc96a7d459d]\n LABEL: test-02\n START_DATE: 2020-04-23 00:00:00\n END_DATE: 2020-05-04 23:59:59\n' >> ./data/external/participant_files/example02.yaml"
rule query_device_empatica_ids:
params:
baseline_folder = "/mnt/e/STRAWbaseline/"
output:
usernames_file = config["CREATE_PARTICIPANT_FILES"]["USERNAMES_CSV"],
timezone_file = "data/external/timezone.csv"
script:
"../../participants/prepare_usernames_file.py"
rule prepare_participants_csv: rule prepare_participants_csv:
input: input:
username_list = config["CREATE_PARTICIPANT_FILES"]["USERNAMES_CSV"] username_list = config["CREATE_PARTICIPANT_FILES"]["USERNAMES_CSV"]