Skip to content

added code to specify the session from command line #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions processing/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

"""


import argparse
import os
import json
import glob
Expand All @@ -19,6 +19,12 @@
from ibc_public.utils_data import get_subject_session
from script_resample_normalized_data import resample_func_and_anat

parser = argparse.ArgumentParser(description='Parameters for the logfiles')
parser.add_argument('-s', '--session', metavar='SessionLabel', type=str,
help="Session label, should be compliand with the "
"ini files names.")
args = parser.parse_args()


def clean_anatomical_images(main_dir):
""" Removed NaNs from SPM12-supplied images """
Expand Down Expand Up @@ -211,7 +217,7 @@ def run_subject_preproc(jobfile, subject, session=None):
cache_dir = '/neurospin/tmp/ibc'
prepare_derivatives(main_dir)
do_topup = True
protocol = 'lpp1'
protocol = args.session
subject_session = sorted(get_subject_session([protocol]))
if do_topup:
acq = None
Expand Down