print( "Please refer to the output directory for a template of the file " "and, after customizing to your analysis, add the flag" "\n\n" " --group_file {0}" "\n\n" "to your `docker run` command" "\n".format(output_group)) sys.exit(1) else: import CPAC.pipeline.cpac_group_runner as cgr print("Starting group level analysis of data in {0} using {1}".format( args.bids_dir, args.group_file)) cgr.run(args.group_file) sys.exit(0) elif args.analysis_level in ["test_config", "participant"]: # check to make sure that the input directory exists if not args.data_config_file and \ not args.bids_dir.lower().startswith("s3://") and \ not os.path.exists(args.bids_dir): print("Error! Could not find {0}".format(args.bids_dir)) sys.exit(1) # check to make sure that the output directory exists if not args.output_dir.lower().startswith("s3://") and \
print() else: print( "Please refer to the output directory for a template of the file " "and, after customizing to your analysis, add the flag\n\n" " --group_file %s" "\n\nto your `docker run` command\n" % output_group ) sys.exit(1) else: import CPAC.pipeline.cpac_group_runner as cgr print("Starting group level analysis of data in {0} using {1}".format(args.bids_dir, args.group_file)) cgr.run(args.group_file) sys.exit(0) # otherwise we move on to conforming the data configuration if not args.data_config_file: from bids_utils import collect_bids_files_configs, bids_gen_cpac_sublist (file_paths, config) = collect_bids_files_configs(args.bids_dir, args.aws_input_creds) if args.participant_label: pt_file_paths = [] for pt in args.participant_label: