def make_job(subject_id_list, freesurfer_dir,
base_feature, roi_stat_list,
atlas, fwhm,
out_proc_dir, job_dir, job_name):
"Creates graynet job for running on HPC"
queue = 'abaqus.q'
mem='2G'
cli_name = 'graynet'
roi_stat_list = ' '.join(roi_stat_list)
job_file = pjoin(job_dir, '{}.job'.format(job_name))
job_log = pjoin(job_dir, '{}.graynet_roistats.log'.format(job_name))
if pexists(job_file):
os.remove(job_file)
with open(job_file, 'w') as jf:
jf.write('#!/bin/bash\n')
jf.write(specify_hpc_resources(mem, queue, job_dir, job_log))
cli_call_line = make_cli_call_roistats(cli_name,realpath(subject_id_list), base_feature, realpath(freesurfer_dir), roi_stat_list, atlas, fwhm, realpath(out_proc_dir))
jf.write(cli_call_line)
st = os.stat(job_file)
os.chmod(job_file, st.st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
return job_file
评论列表
文章目录