99from io import StringIO
1010import src .match
1111import argparse
12+ import sys
1213
1314OBSDIR = '/Volumes/vosslabhpc/Projects/BOOST/InterventionStudy/3-Experiment/data/bids'
1415INTDIR = '/Volumes/vosslabhpc/Projects/BOOST/ObersvationalStudy/3-Experiment/data'
@@ -26,26 +27,28 @@ def init_servers():
2627 #this should connect the linux machine to the RDSS and LSS
2728
2829 try :
29- os .system ("" sudo mount - t cifs " //itf-rs-store24.hpc.uiowa.edu/vosslabhpc" / home / vosslab - svc / tmp / vosslabhpc - o uid = vosslab - svc ,username = vosslab - svc ,vers = 3.0 )
30+ os .system ("sudo mount -t cifs //itf-rs-store24.hpc.uiowa.edu/vosslabhpc /home/vosslab-svc/tmp/vosslabhpc -o uid=vosslab-svc,username=vosslab-svc,vers=3.0" )
3031 except Exception as e :
3132 print (f'An error occured trying to connect to LSS: { e } ' )
3233
3334 try :
34- os .system ("" sudo mount - t cifs // rdss .iowa .uiowa .edu / rdss_mwvoss / VossLab / mnt / nfs / rdss / rdss_vosslab - o user = vosslab - svc ,uid = 2418317 ,gid = 900001021 )
35- except Excpetion as e :
35+ os .system ("sudo mount -t cifs //rdss.iowa.uiowa.edu/rdss_mwvoss/VossLab /mnt/nfs/rdss/rdss_vosslab -o user=vosslab-svc,uid=2418317,gid=900001021" )
36+ except Exception as e :
3637 print (f'An error occured trying to connect to RDSS: { e } ' )
3738
3839 return None
3940
4041def check_files ():
4142 from src .match import get_files , compare
4243
43- rdss_files = get_files (placeholder_RDSS_dir )
44+ rdss_files = get_files (#placeholder_RDSS_dir
45+ )
4446
45- if len (rdss_files ) == 0 ;
47+ if len (rdss_files ) == 0 :
4648 print ("error: RDSS files were not grabbed - find out why" )
4749
48- need = compare (files , placeholder_text_file )
50+ need = compare (rdss_files , placeholder_text_file )
51+
4952
5053 if len (need ) == 0 :
5154 print ("no files need GGIR at the moment. quitting..." )
@@ -69,7 +72,7 @@ def create_comparable_dataframe(need):
6972 errors .append (f"Row { index } has an invalid lab id: { row [0 ]} " )
7073
7174 #check if second column is valid filepath
72- if not os .path .isfile (row [1 ])
75+ if not os .path .isfile (row [1 ]):
7376 errors .append (f"Row { index } has an invalid filepath: { row [1 ]} " )
7477
7578 if errors :
@@ -84,13 +87,13 @@ def create_comparable_dataframe(need):
8487
8588def get_redcap_list_and_compare (token , files , list ):
8689
87- from src .match import get_list , compare_ids , add_to_sub_list , evaluate_run
90+ from src .match import get_list , compare_ids , add_sub_to_sublist , evaluate_run
8891 sub_lab_id = get_list (token )
8992
9093 matched_df = compare_ids (files , list )
9194
92- add_to_sub_list (matched_df )
93-
95+ add_sub_to_sublist (matched_df )
96+
9497 matched_df = evaluate_run (matched_df )
9598
9699 return matched_df
0 commit comments