Ejemplo n.º 1
0
def test_ariba_skewed_cov_filter_rsv(request):
    test_data = os.path.abspath(globals()["test_data"])
    conf_dir = pjoin(test_data,"gene_extractor/rsv")
    data_dir = pjoin(request.config.getoption('--large-test-data'),"rsv/SA2018")
    pkg_data = resources.get_pkg_data_dir("MICGENT")
    cwl_dir = pjoin(pkg_data,"cwl")
    cwl_wf = pjoin(cwl_dir,"ariba_run.cwl")
    conda_env = request.config.getoption('--conda-env-ngs-mstb')
    with helpers.mkchdir("ariba_run_skewed_cov_filter_rsv"):
        runner_conf = make_extractor_runner_conf(conda_env,runner_no_retry=True,leave_workdir=True)
        inp_reads = [ path_to_cwl_file(os.path.join(data_dir,"SMA589764_S1_L001_R{}_001.fastq.gz".format(i_read))) \
            for i_read in (1,2) ]
        wf_inp = os.path.abspath("wf_inp.yaml")
        inp = dict(
            reads_1 = inp_reads[0],
            reads_2 = inp_reads[1],
            assembly_cov = 1000000,
            assembly_cov_min = 10,
            assembler = "plugin",
            plugin_asm_options = 'python -m MICGENT.ariba_asm_plugin asm-for-skewed-coverage --extra-args "{deterministic: true}"',
            threads = 8,
            serial = True,
            debug = True,
            SampleID = "SMA589764",
            prepareref_tgz = path_to_cwl_file(pjoin(conf_dir,"ref_AB_single.trimmed.arbref.tgz"))
            )
        yaml_util.dump_yaml(inp,wf_inp)
        cmd = ("python -m MICGENT.cwl_runner --config cwl_runner.yaml "
            "run-toil --logLevel DEBUG "
            "{cwl_wf} {wf_inp}").format(**locals())
        check_call(shlex.split(cmd))
Ejemplo n.º 2
0
def test_ariba_stop_codon_sa(request):
    test_data = os.path.abspath(globals()["test_data"])
    conf_dir = pjoin(test_data,"gene_extractor/sa")
    data_dir = pjoin(request.config.getoption('--large-test-data'),"sa/sast300")
    pkg_data = resources.get_pkg_data_dir("MICGENT")
    cwl_dir = pjoin(pkg_data,"cwl")
    cwl_wf = pjoin(cwl_dir,"ariba_run.cwl")
    conda_env = request.config.getoption('--conda-env-ngs-mstb')
    with helpers.mkchdir("ariba_stop_codon_sa"):
        runner_conf = make_extractor_runner_conf(conda_env,runner_no_retry=True,leave_workdir=True) #batchSystem="Torque",
        inp_reads = [ path_to_cwl_file(os.path.join(data_dir,"SMA807030_S1_L001_R{}_001.fastq.gz".format(i_read))) \
            for i_read in (1,2) ] # SMA1927338_S1_L001_R1_001.fastq.gz
        wf_inp = os.path.abspath("wf_inp.yaml")
        inp = dict(
            reads_1 = inp_reads[0],
            reads_2 = inp_reads[1],
            threads = 8,
            serial = True,
            debug = True,
            SampleID = "SMA807030",
            prepareref_tgz = path_to_cwl_file(pjoin(conf_dir,"ref_HA.arbref.tar"))
            )
        yaml_util.dump_yaml(inp,wf_inp)
        cmd = ("python -m MICGENT.cwl_runner --config cwl_runner.yaml "
            "run-toil --logLevel DEBUG "
            "{cwl_wf} {wf_inp}").format(**locals())
        check_call(shlex.split(cmd))
Ejemplo n.º 3
0
def test_clean_reads_small_sa(request):
    test_data = os.path.abspath(globals()["test_data"])
    data_dir = pjoin(request.config.getoption('--large-test-data'),"sa/sast2")
    pkg_data = resources.get_pkg_data_dir("MICGENT")
    cwl_dir = pjoin(pkg_data,"cwl")
    cwl_wf = pjoin(cwl_dir,"clean_reads_qc.cwl")
    conda_env = request.config.getoption('--conda-env-ngs-mstb')
    with helpers.mkchdir("clean_reads_small_sa"):
        runner_conf = make_extractor_runner_conf(conda_env,runner_no_retry=True,batchSystem="singleMachine")
        inp_reads = [ path_to_cwl_file(os.path.join(data_dir,"SMA1828869_S1_L001_R{}_001.fastq.gz".format(i_read))) \
            for i_read in (1,2) ] # SMA1927338_S1_L001_R1_001.fastq.gz
        wf_inp = os.path.abspath("wf_inp.yaml")
        inp = dict(
            SampleID = "SASMA1828869",
            inp_seq1 = inp_reads[0],
            inp_seq2 = inp_reads[1],
            threads = 8
            )
        yaml_util.dump_yaml(inp,wf_inp)
        cmd = ("python -m MICGENT.cwl_runner --config cwl_runner.yaml "
            "run-toil --logLevel DEBUG "
            "{cwl_wf} {wf_inp}").format(**locals())
        check_call(shlex.split(cmd))