From 405d3c49d03fe275241917e78fca538782bf5785 Mon Sep 17 00:00:00 2001 From: Matt Cieslak Date: Fri, 8 Apr 2022 10:44:32 -0400 Subject: [PATCH] add zip file and session columns --- scripts/generic/fs_euler_logs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/generic/fs_euler_logs.py b/scripts/generic/fs_euler_logs.py index dada98d..adfdb57 100755 --- a/scripts/generic/fs_euler_logs.py +++ b/scripts/generic/fs_euler_logs.py @@ -7,6 +7,9 @@ def process_zip(zip_path): freesurfer_zip = Path(zip_path) subid = freesurfer_zip.stem.split("_")[0] + sesid = "" + if "ses-" in freesurfer_zip.stem: + sesid = freesurfer_zip.stem.split("_")[1] if not freesurfer_zip.exists(): raise ValueError("Must provide a zip file") @@ -29,7 +32,7 @@ def read_qc(target_str): rh_euler, lh_euler = read_qc("lheno") rh_holes, lh_holes = read_qc("lhholes") - return {"rbc_id": subid, + return {"rbc_id": subid, "archive": zip_path, "session": sesid, "lh_euler": lh_euler, "rh_euler": rh_euler, "lh_holes": lh_holes, "rh_holes": rh_holes}