Ejemplo n.º 1
0
def test_all_separate_no_sdc(anatomical_pipeline, tmpdir):
    all_separate_no_sdc_opts = get_default_cli_args()
    all_separate_no_sdc_opts.work_dir = tmpdir
    all_separate_no_sdc_opts.ignore = []
    all_separate_no_sdc_opts.output_dir = op.join(tmpdir, "all_separate_no_sdc")
    all_separate_no_sdc_opts.combine_all_dwis = False
    all_separate_no_sdc_opts.anat_only = False
    all_separate_no_sdc_opts.prefer_dedicated_fmaps = True

    #assert link_anatomicals(tmpdir)
    with mock.patch.object(
            argparse.ArgumentParser, 'parse_args', return_value=all_separate_no_sdc_opts):

        with pytest.raises(SystemExit):
            cli_main()
Ejemplo n.º 2
0
def test_preproc_plus_controllability(bids_singlescan_data, tmpdir):
    preproc_plus_controllability = get_default_cli_args()
    preproc_plus_controllability.bids_dir = WORKING_SINGLE_DIR + "/DSCSDSI"
    preproc_plus_controllability.work_dir = tmpdir
    preproc_plus_controllability.recon_only = False
    preproc_plus_controllability.output_dir = op.join(tmpdir,
                                                      "preproc_control")
    preproc_plus_controllability.recon_spec = pkgrf(
        "qsiprep", "data/pipelines/controllability.json")

    with mock.patch.object(argparse.ArgumentParser,
                           'parse_args',
                           return_value=preproc_plus_controllability):

        with pytest.raises(SystemExit):
            cli_main()
Ejemplo n.º 3
0
def anatomical_pipeline(bids_data):
    """Download data and run the anatomical preprocessing."""
    anat_only_opts = get_default_cli_args()
    anat_only_opts.anat_only = True
    anat_only_opts.output_dir = op.join(WORKING_DIR, "anat_only_output")

    if RUN_ANAT:
        with mock.patch.object(
                argparse.ArgumentParser, 'parse_args', return_value=anat_only_opts):

            with pytest.raises(SystemExit):
                cli_main()

    else:
        status = os.system('curl -sSL {} | tar xvfJ - -C {}'.format(
            URL_PREFIX + ANAT_URL, WORKING_DIR))
        assert status == 0
        wd_files = os.listdir(WORKING_DIR)
        assert 'qsiprep_wf' in wd_files