コード例 #1
0
ファイル: test_workflows.py プロジェクト: nicholst/NiMARE
def test_conperm_workflow_cli_smoke(testdata_ibma, tmp_path_factory):
    tmpdir = tmp_path_factory.mktemp("test_conperm_workflow_cli_smoke")
    dset = testdata_ibma
    files = dset.get_images(imtype="beta")
    mask_image = op.join(get_test_data_path(), "test_pain_dataset",
                         "mask.nii.gz")
    prefix = "test"

    cli._main([
        "conperm",
        "--output_dir",
        str(tmpdir),
        "--mask",
        mask_image,
        "--prefix",
        prefix,
        "--n_iters",
        "5",
    ] + files)
    assert op.isfile(op.join(tmpdir, "{}_logp.nii.gz".format(prefix)))
コード例 #2
0
ファイル: test_workflows.py プロジェクト: NBCLab/NiMARE
def test_ale_workflow_cli_smoke(tmp_path_factory):
    """Run smoke test for Sleuth ALE workflow."""
    tmpdir = tmp_path_factory.mktemp("test_ale_workflow_cli_smoke")
    sleuth_file = op.join(get_test_data_path(), "test_sleuth_file.txt")
    prefix = "test"

    cli._main(
        [
            "ale",
            "--output_dir",
            str(tmpdir),
            "--prefix",
            prefix,
            "--n_iters",
            "10",
            "--n_cores",
            "1",
            sleuth_file,
        ]
    )
    assert op.isfile(op.join(tmpdir, f"{prefix}_input_coordinates.txt"))
コード例 #3
0
ファイル: test_workflows.py プロジェクト: nicholst/NiMARE
def test_scale_workflow_cli_smoke(tmp_path_factory):
    tmpdir = tmp_path_factory.mktemp("test_scale_workflow_cli_smoke")
    sleuth_file = op.join(get_test_data_path(), "test_sleuth_file.txt")
    prefix = "test"
    baseline = op.join(get_test_data_path(), "test_baseline.txt")

    cli._main([
        "scale",
        "--baseline",
        baseline,
        "--output_dir",
        str(tmpdir),
        "--prefix",
        prefix,
        "--n_iters",
        "5",
        "--n_cores",
        "1",
        sleuth_file,
    ])
    assert op.isfile(op.join(tmpdir,
                             "{}_input_coordinates.txt".format(prefix)))
コード例 #4
0
ファイル: test_workflows.py プロジェクト: NBCLab/NiMARE
def test_conperm_workflow_cli_smoke(testdata_ibma, tmp_path_factory):
    """Run smoke test of the contrast permutation workflow as a CLI."""
    tmpdir = tmp_path_factory.mktemp("test_conperm_workflow_cli_smoke")
    dset = testdata_ibma
    files = dset.get_images(imtype="beta")
    mask_image = op.join(get_test_data_path(), "test_pain_dataset", "mask.nii.gz")
    prefix = "test"

    cli._main(
        [
            "conperm",
            "--output_dir",
            str(tmpdir),
            "--mask",
            mask_image,
            "--prefix",
            prefix,
            "--n_iters",
            "5",
        ]
        + files
    )
    assert op.isfile(op.join(tmpdir, f"{prefix}_logp.nii.gz"))
コード例 #5
0
ファイル: test_workflows.py プロジェクト: nicholst/NiMARE
def test_ale_workflow_cli_smoke_2(tmp_path_factory):
    """
    Smoke test for Sleuth ALE workflow with subtraction analysis
    """
    tmpdir = tmp_path_factory.mktemp("test_ale_workflow_cli_smoke_2")
    sleuth_file = op.join(get_test_data_path(), "test_sleuth_file.txt")
    prefix = "test"
    cli._main([
        "ale",
        "--output_dir",
        str(tmpdir),
        "--prefix",
        prefix,
        "--n_iters",
        "10",
        "--n_cores",
        "1",
        "--file2",
        sleuth_file,
        sleuth_file,
    ])
    assert op.isfile(
        op.join(tmpdir, "{}_group2_input_coordinates.txt".format(prefix)))
コード例 #6
0
ファイル: test_workflows.py プロジェクト: NBCLab/NiMARE
def test_scale_workflow_cli_smoke(tmp_path_factory):
    """Run smoke test of the SCALE workflow as a CLI."""
    tmpdir = tmp_path_factory.mktemp("test_scale_workflow_cli_smoke")
    sleuth_file = op.join(get_test_data_path(), "test_sleuth_file.txt")
    prefix = "test"
    baseline = op.join(get_test_data_path(), "test_baseline.txt")

    cli._main(
        [
            "scale",
            "--baseline",
            baseline,
            "--output_dir",
            str(tmpdir),
            "--prefix",
            prefix,
            "--n_iters",
            "5",
            "--n_cores",
            "1",
            sleuth_file,
        ]
    )
    assert op.isfile(op.join(tmpdir, f"{prefix}_input_coordinates.txt"))