Skip to content

Commit 6c5e7b9

Browse files
committed
Fix some merging issues
1 parent 43267d0 commit 6c5e7b9

File tree

3 files changed

+13
-25
lines changed

3 files changed

+13
-25
lines changed

Diff for: 2_rsyncAndFixJSON.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,8 @@ def fixer(img_path):
224224

225225
active_subject_cmd = subprocess.check_output(f"rsync -az {complementary_cluster_login} {scratch_path}/ukbb/scripts/data/active_subjects_{complementary_cluster_name}.json", shell=True, text=True)
226226
print(active_subject_cmd)
227-
<<<<<<< Updated upstream
228-
229-
=======
230227

231-
>>>>>>> Stashed changes
228+
232229
active_subject_cmd = subprocess.check_output(f"rsync -az {outside_cluster_login} {scratch_path}/ukbb/scripts/data/active_subjects_{outside_cluster_name}.json", shell=True, text=True)
233230
print(active_subject_cmd)
234231

Diff for: 4.2_runSingleSubject.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,13 @@
103103
else:
104104
print(f"unknow state {state} for subject {subject}")
105105
continue
106-
<<<<<<< Updated upstream
107106

108-
=======
109-
110-
>>>>>>> Stashed changes
107+
111108
if not os.path.exists(os.path.join(scratch_path,"ukbb","ukbb_bids",subject,"func",f"{subject}_task-rest_bold.nii.gz")):
112109
slurm_jobs[subject] = 2
113110
print(f"Subject {subject} nifti not found.")
114111
continue
115-
<<<<<<< Updated upstream
116112

117-
=======
118-
119-
>>>>>>> Stashed changes
120113
slurm_cmd = f"sbatch {scratch_path}/ukbb/.slurm/fmriprep_{subject}.sh"
121114
try:
122115
sbatch_output = subprocess.check_output(slurm_cmd, shell=True, text=True)

Diff for: stats.py

+11-13
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,6 @@ def get_job_state(job_id):
133133
states_dic[0] = "COMPLETED"
134134
states_dic[1] = "FAILED"
135135
states_dic[2] = "FAILED"
136-
<<<<<<< Updated upstream
137-
=======
138-
139-
>>>>>>> Stashed changes
140136

141137
#### Beginning of connectome ####
142138
connectomes_status = {}
@@ -223,7 +219,6 @@ def get_job_state(job_id):
223219
json.dump(subjects_state, json_file, indent=4)
224220

225221

226-
<<<<<<< Updated upstream
227222
update_active_subjects(scratch_path, cluster_name)
228223

229224
active_subject_cmd = subprocess.check_output(f"rsync -az {complementary_cluster_login} {scratch_path}/ukbb/scripts/data/active_subjects_{complementary_cluster_name}.json", shell=True, text=True)
@@ -232,14 +227,17 @@ def get_job_state(job_id):
232227

233228
active_subject_cmd = subprocess.check_output(f"rsync -az {outside_cluster_login} {scratch_path}/ukbb/scripts/data/active_subjects_{outside_cluster_name}.json", shell=True, text=True)
234229
print("Updating active subjects (outside):",active_subject_cmd)
235-
=======
236230
#update_active_subjects(scratch_path, cluster_name)
237-
>>>>>>> Stashed changes
238-
239-
240-
active_subject_cmd = subprocess.check_output(f"rsync -az {complementary_cluster_login} {scratch_path}/ukbb/scripts/data/active_subjects_{complementary_cluster_name}.json", shell=True, text=True)
241-
print("Updating active subjects (complementary):",active_subject_cmd)
242231

243-
active_subject_cmd = subprocess.check_output(f"rsync -az {outside_cluster_login} {scratch_path}/ukbb/scripts/data/active_subjects_{outside_cluster_name}.json", shell=True, text=True)
244-
print("Updating active subjects (outside):",active_subject_cmd)
232+
try:
233+
active_subject_cmd = subprocess.check_output(f"rsync -az {complementary_cluster_login} {scratch_path}/ukbb/scripts/data/active_subjects_{complementary_cluster_name}.json", shell=True, text=True)
234+
print("Updating active subjects (complementary):",active_subject_cmd)
235+
except Exception as e:
236+
print(e)
237+
238+
try:
239+
active_subject_cmd = subprocess.check_output(f"rsync -az {outside_cluster_login} {scratch_path}/ukbb/scripts/data/active_subjects_{outside_cluster_name}.json", shell=True, text=True)
240+
print("Updating active subjects (outside):",active_subject_cmd)
241+
except Exception as e:
242+
print(e)
245243

0 commit comments

Comments
 (0)