def test_quast_complete_run_through():
    app = app_helper.setup_app_state('quast', 'execute')
    image_helper.execute_image(app)
    file_helper.assert_is_file(
        fs.get_task_file_path(app, 'outputs/assembly_metrics/684281f282'))
    file_helper.assert_is_file(
        fs.get_task_file_path(app, 'outputs/container_log/86bbc499b0'))
def test_gaet_complete_run_through():
    app = app_helper.setup_app_state('gaet', 'execute')
    image_helper.execute_image(app)
    file_helper.assert_is_file(
        fs.get_task_file_path(app, 'outputs/assembly_metrics/d70c163200'))
    file_helper.assert_is_file(
        fs.get_task_file_path(app, 'outputs/container_log/1661337965'))
Exemplo n.º 3
0
def test_fetch_short_read_assembler_input_files():
    db_helper.reset_database()
    app = app_helper.setup_app_state('sra', 'task')
    fetch.create_input_files(app)
    file_helper.assert_is_file(
        app["path"] +
        "/inputs/short_read_fastq/24b5b01b08482053d7d13acd514e359fb0b726f1e8ae36aa194b6ddc07335298.fq.gz"
    )
Exemplo n.º 4
0
def test_fetch_reference_assembler_input_files():
    db_helper.reset_database()
    app = app_helper.setup_app_state('quast', 'task')
    fetch.create_input_files(app)
    file_helper.assert_is_file(
        app["path"] +
        "/inputs/reference_fasta/6bac51cc35ee2d11782e7e31ea1bfd7247de2bfcdec205798a27c820b2810414.fa.gz"
    )
    file_helper.assert_is_file(
        app["path"] +
        "/inputs/contig_fasta/57601ff10b7faf7fcf53a7268e3615db58088db34eb8e8bf31cb475c24381451.fa"
    )
def test_failing_image_with_no_outputs():
    image = {
        "name": "bioboxes/crash-test-biobox",
        "sha256":
        "eaf1ab35314712db9d3fff0d265613629fe628ed9b058a9a4fe94424184f8c41",
        "task": "exit-1",
        "type": "short_read_assembler"
    }
    app = app_helper.setup_app_state('sra', 'inputs')
    app["task"]["image"] = image
    app_helper.rewrite_app_task(app)
    image_helper.execute_image(app)
    file_helper.assert_is_file(
        fs.get_task_file_path(
            app, 'outputs/container_runtime_metrics/metrics.json.gz'))
Exemplo n.º 6
0
def test_fetch_reference_assembler_input_files_with_short_contigs():
    db_helper.reset_database()
    app = app_helper.setup_app_state('quast_short_contigs', 'task')
    fetch.create_input_files(app)

    # If the short contig are filtered as part of the download process, the input
    # file should have the same SHA256 as the contig.fa without the short contigs.
    file_helper.assert_is_file(
        app["path"] +
        "/inputs/contig_fasta/de3d9f6d31285985139aedd9e3f4b4ad04dadb4274c3c0ce28261a8e8e542a0f.fa"
    )
    file_helper.assert_is_not_file(
        app["path"] +
        "/inputs/contig_fasta/1ff29bcb6940b7d629d2d070fd67b23604e3459c9fd0167cdb6d1dcb26966c87.fa"
    )
    file_helper.assert_is_not_file(
        app["path"] +
        "/inputs/contig_fasta/1ff29bcb6940b7d629d2d070fd67b23604e3459c9fd0167cdb6d1dcb26966c87.fa.fai"
    )
def test_complete_run_through():
    app = app_helper.setup_app_state('sra', 'inputs')
    image_helper.execute_image(app)

    file_helper.assert_is_file(fs.get_task_file_path(app, 'outputs/contig_fasta/01eb7cec61'))
    file_helper.assert_is_file(fs.get_task_file_path(app, 'outputs/container_runtime_metrics/metrics.json.gz'))
    file_helper.assert_is_file(fs.get_task_file_path(app, 'outputs/container_log/1099992390'))
Exemplo n.º 8
0
def test_fetch_file():
    src = "s3://nucleotides-testing/short-read-assembler/6bac51cc35ee2d11782e7e31ea1bfd7247de2bfcdec205798a27c820b2810414"
    dst = os.path.join(tempfile.mkdtemp(), 'dummy_file')
    s3.fetch_file(src, dst)
    file_helper.assert_is_file(dst)
def test_copy_output_files():
    app = app_helper.setup_app_state('sra', 'intermediates')
    run.copy_output_files(app)
    file_helper.assert_is_file(fs.get_task_file_path(app, 'outputs/container_log/e0e8af3790'))
    file_helper.assert_is_file(fs.get_task_file_path(app, 'outputs/contig_fasta/de3d9f6d31'))
Exemplo n.º 10
0
def test_get_task_metadata_with_no_metadata_json():
    app = app_helper.setup_app_state('sra')
    metadata = util.get_task_metadata("1", app)
    nose.assert_in("id", metadata)
    file_helper.assert_is_file(app["path"] + "/metadata.json")