How to use the refgenie.asset_build_packages.asset_build_packages function in refgenie

To help you get started, we’ve selected a few refgenie examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github databio / refgenie / refgenie / build_all_genome.py View on Github external
"""
    return ["--" + x + " " for x in req_input]


subdir_path = _make_sub_dir(args.path, args.genome)
dcc = divvy.ComputingConfiguration()
dcc.activate_package("slurm")
cmd_template = "refgenie build -g {g} -a {a} {req_input_str}"
genome = args.genome
to_remove = ["genome", "path"]

data = vars(args)
for i in to_remove:
    data.pop(i)

for asset in asset_build_packages:
    sub_script = os.path.join(subdir_path, asset + ".sub")
    req_input = asset_build_packages[asset]["required_inputs"]
    if req_input:
        print("{} asset requires additional input in the command ({}), so '{}'"
            " requires manual edit".format(asset, req_input, sub_script))
        req_str = " ".join(_req_input_to_args(req_input))
    else:
        req_str = ""
    data["CODE"] = cmd_template.format(g=genome, a=asset, req_input_str=req_str)
    data["LOGFILE"] = asset + ".log"
    data["JOBNAME"] = asset + "Build"
    dcc.write_script(sub_script, data)
github databio / refgenie / refgenie / build_all_genome.py View on Github external
subdir_path = _make_sub_dir(args.path, args.genome)
dcc = divvy.ComputingConfiguration()
dcc.activate_package("slurm")
cmd_template = "refgenie build -g {g} -a {a} {req_input_str}"
genome = args.genome
to_remove = ["genome", "path"]

data = vars(args)
for i in to_remove:
    data.pop(i)

for asset in asset_build_packages:
    sub_script = os.path.join(subdir_path, asset + ".sub")
    req_input = asset_build_packages[asset]["required_inputs"]
    if req_input:
        print("{} asset requires additional input in the command ({}), so '{}'"
            " requires manual edit".format(asset, req_input, sub_script))
        req_str = " ".join(_req_input_to_args(req_input))
    else:
        req_str = ""
    data["CODE"] = cmd_template.format(g=genome, a=asset, req_input_str=req_str)
    data["LOGFILE"] = asset + ".log"
    data["JOBNAME"] = asset + "Build"
    dcc.write_script(sub_script, data)

refgenie

Refgenie creates a standardized folder structure for reference genome files and indexes. You can download pre-built genomes or build your own for any fasta file

BSD-2-Clause
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Similar packages