Ejemplo n.º 1
0
def get_parser():
    desc = "Tool to create Chunk json files."
    p = get_default_argparser(__version__, desc)

    sp = p.add_subparsers(help="Subparser Commands")

    def builder(sid_, help_, opt_func_, exe_func_):
        return U.subparser_builder(sp, sid_, help_, opt_func_, exe_func_)

    builder("fofn", "Create a generic chunk.json from a FOFN.", _add_chunk_fofn_options, _args_chunk_fofn)

    builder("fasta", "Create a chunk.json from a Fasta file", _add_chunk_fasta_options, _args_run_chunk_fasta)

    builder("fastq", "Create a chunk.json from a Fastq file", _add_chunk_fastq_options, _args_run_chunk_fastq)

    builder("alignmentset",
            "Create a chunk.json from an AlignmentSet XML file",
            _add_chunk_alignmentset_options, _args_run_chunk_alignmentset)

    builder("hdfsubreadset",
            "Create a chunk.json from an HdfSubreadSet XML file",
            _add_chunk_hdfsubreadset_options, _args_run_chunk_hdfsubreadset)

    builder("subreadset",
            "Create a chunk.json from an SubreadSet XML file",
            _add_chunk_subreadset_options, _args_run_chunk_subreadset)

    builder("csv", "Create a chunk.json CSV from a CSV file", _add_chunk_csv_options, _args_run_chunk_csv)

    return p
Ejemplo n.º 2
0
def get_main_parser():
    """
    Returns an argparse Parser with all the commandline utils as
    subparsers
    """
    desc = "General tool used by run task-manifests.json files."
    p = get_default_argparser(__version__, desc)

    sp = p.add_subparsers(help='Subparser Commands')

    def builder(sid_, help_, opt_func_, exe_func_):
        return U.subparser_builder(sp, sid_, help_, opt_func_, exe_func_)

    # Run command
    builder('run', "Convert a Pacbio Input.xml file to Movie FOFN",
            _add_run_options, _args_run_task_manifest)

    builder("to-cmds", "Extract the cmds from manifest.json",
            _add_manifest_json_option, _args_to_cmd)

    builder(
        "inspect",
        "Pretty-Print a summary of the task-manifestExtract the cmds from manifest.json",
        _add_base_options, _args_pprint_task_manifest)

    return p
Ejemplo n.º 3
0
def get_main_parser():
    p = get_default_argparser(
        __version__, "Tool For generating MOCK data for development testing.")

    sp = p.add_subparsers(help="Subparser Commands")

    def _builder(subparser_id, desc, options_func, exe_func):
        U.subparser_builder(sp, subparser_id, desc, options_func, exe_func)

    _builder('fasta', "Generate a random Fasta file",
             _add_run_random_fasta_file, _args_run_to_random_fasta_file)

    _builder('fastq', "Generate a random Fastq File",
             _add_run_random_fastq_options, _args_run_random_fastq_file)

    _builder('fofn', "Generate a random FOFN file",
             _add_run_random_fofn_options, _args_run_random_fofn)

    _builder('filter-fasta', "Filter a Fasta file by sequence length",
             _add_run_fasta_filter_options, _args_run_fasta_filter)

    _builder("dataset-report", "DataSet Report Generator",
             _add_run_dataset_report, _args_run_dataset_report)

    _builder("reference-ds-report", "Reference DataSet Report Generator",
             _add_run_reference_dataset_report,
             _args_run_reference_dataset_report)

    return p
Ejemplo n.º 4
0
def get_parser():
    desc = "Tool to create Chunk json files."
    p = get_default_argparser(__version__, desc)

    sp = p.add_subparsers(help="Subparser Commands")

    def builder(sid_, help_, opt_func_, exe_func_):
        return U.subparser_builder(sp, sid_, help_, opt_func_, exe_func_)

    builder("fofn", "Create a generic chunk.json from a FOFN.",
            _add_chunk_fofn_options, _args_chunk_fofn)

    builder("fasta", "Create a chunk.json from a Fasta file",
            _add_chunk_fasta_options, _args_run_chunk_fasta)

    builder("fastq", "Create a chunk.json from a Fastq file",
            _add_chunk_fastq_options, _args_run_chunk_fastq)

    builder("alignmentset",
            "Create a chunk.json from an AlignmentSet XML file",
            _add_chunk_alignmentset_options, _args_run_chunk_alignmentset)

    builder("hdfsubreadset",
            "Create a chunk.json from an HdfSubreadSet XML file",
            _add_chunk_hdfsubreadset_options, _args_run_chunk_hdfsubreadset)

    builder("subreadset", "Create a chunk.json from an SubreadSet XML file",
            _add_chunk_subreadset_options, _args_run_chunk_subreadset)

    builder("csv", "Create a chunk.json CSV from a CSV file",
            _add_chunk_csv_options, _args_run_chunk_csv)

    return p
Ejemplo n.º 5
0
def get_parser():
    desc = "Tool to import datasets, convert/import fasta file and run analysis jobs"
    p = get_default_argparser(__version__, desc)

    sp = p.add_subparsers(help='commands')

    def builder(subparser_id, description, options_func, exe_func):
        subparser_builder(sp, subparser_id, description, options_func, exe_func)

    status_desc = "Get System Status, DataSet and Job Summary"
    builder('status', status_desc, add_base_and_sal_options, args_get_sal_summary)

    local_desc = " The file location must be accessible from the host where the Services are running (often on a shared file system)"
    ds_desc = "Import Local DataSet XML." + local_desc
    builder('import-dataset', ds_desc, add_sal_and_xml_dir_options, args_runner_import_datasets)

    fasta_desc = "Import Fasta (and convert to ReferenceSet)." + local_desc
    builder("import-fasta", fasta_desc, add_import_fasta_opts, args_run_import_fasta)

    run_analysis_desc = "Run Secondary Analysis Pipeline using an analysis.json"
    builder("run-analysis", run_analysis_desc, add_run_analysis_job_opts, args_run_analysis_job)

    emit_analysis_json_desc = "Emit an analysis.json Template to stdout that can be run using 'run-analysis'"
    builder("emit-analysis-template", emit_analysis_json_desc, add_common_options, args_emit_analysis_template)

    # Get Summary Job by Id
    job_summary_desc = "Get Job Summary by Job Id"
    builder('get-job', job_summary_desc, add_get_job_options, args_get_job_summary)

    ds_summary_desc = "Get DataSet Summary by DataSet Id or UUID"
    builder('get-dataset', ds_summary_desc, add_get_dataset_options, args_run_dataset_summary)

    return p
Ejemplo n.º 6
0
def get_parser():
    desc = "Run multiple testkit.cfg files in parallel"
    p = get_default_argparser(__version__, desc)
    fs = [
        TU.add_debug_option, TU.add_override_chunked_mode,
        TU.add_override_distribute_option
    ]

    f = compose(*fs)
    p = f(p)

    p.add_argument(
        'testkit_cfg_fofn',
        type=validate_testkit_cfg_fofn,
        help=
        "File of butler.cfg file name relative to the current dir (e.g., RS_Resquencing/testkit.cfg"
    )
    p.add_argument('-n',
                   '--nworkers',
                   type=int,
                   default=1,
                   help="Number of jobs to concurrently run.")

    p.set_defaults(func=_args_run_multi_testkit_cfg)
    return p
Ejemplo n.º 7
0
def get_parser():
    desc = "Run multiple testkit.cfg files in parallel"
    p = get_default_argparser(__version__, desc)
    fs = [
        add_log_debug_option, TU.add_override_chunked_mode,
        TU.add_override_distribute_option, add_ignore_test_failures_option
    ]

    f = compose(*fs)
    p = f(p)

    p.add_argument(
        'testkit_cfg_fofn',
        type=validate_testkit_cfg_fofn,
        help=
        "File of butler.cfg file name relative to the current dir (e.g., RS_Resquencing/testkit.cfg"
    )
    p.add_argument('-n',
                   '--nworkers',
                   type=int,
                   default=1,
                   help="Number of jobs to concurrently run.")
    p.add_argument("-j",
                   "--junit-xml",
                   dest="junit_out",
                   action="store",
                   default="junit_combined_results.xml",
                   help="JUnit output file for all tests")

    p.set_defaults(func=_args_run_multi_testkit_cfg)
    return p
Ejemplo n.º 8
0
def get_main_parser():
    desc = "Tool for testing current workflow configuration."
    p = get_default_argparser(pbsmrtpipe.get_version(), desc)
    _add_preset_xml_option(p)
    _add_full_option(p)

    p.set_defaults(func=_args_run_diagnostics)
    return p
Ejemplo n.º 9
0
def get_main_parser():
    desc = "Tool for testing current workflow configuration."
    p = get_default_argparser(pbsmrtpipe.get_version(), desc)
    _add_preset_xml_option(p)
    _add_full_option(p)

    p.set_defaults(func=_args_run_diagnostics)
    return p
Ejemplo n.º 10
0
def get_parser():
    p = get_default_argparser(__version__, __doc__)
    p.add_argument("fasta_in", type=validate_file, help="Input Fasta")
    p.add_argument("fasta_out", type=str, help="Output Fasta")
    p.add_argument('--read-length', type=int, default=25, help="Min Sequence length to filter")
    add_resolved_tool_contract_option(p)
    # this parser cannot emit a tool contract, but can run from a resolved
    # contract via --resolved-tool-contract /path/to/resolved-tool-contract.json
    return p
Ejemplo n.º 11
0
def get_parser():

    desc = "Gathering File Tool used within pbcoretools on chunk.json files."
    p = get_default_argparser(__version__, desc)

    sp = p.add_subparsers(help="Commands")

    def builder(sid_, help_, opt_func_, exe_func_):
        return subparser_builder(sp, sid_, help_, opt_func_, exe_func_)

    # CSV
    builder('csv', "Merge CSV files into a single file.", _gather_csv_options,
            _args_runner_gather_csv)

    # Simple text
    builder('txt', "Merge text files into a single file.", _gather_txt_options,
            _args_runner_gather_txt)

    # Fastq
    builder('fastq', "Merge Fastq files into a single file.",
            _gather_fastq_options, _args_runner_gather_fastq)

    # Fasta
    builder('fasta', "Merge Fasta files into a single file.",
            _gather_fasta_options, _args_runner_gather_fasta)

    builder('fofn', "Merge FOFNs into a single file.", _gather_fofn_options,
            _args_runner_gather_fofn)

    # Gff
    builder('gff', "Merge Fasta files into a single file.",
            _gather_gff_options, _args_runner_gather_gff)

    # SubreadSet
    builder('subreadset', "Merge SubreadSet XMLs into a single file.",
            _gather_subreadset_options, _args_runner_gather_subreadset)

    # AlignmentSet
    builder('alignmentset', "Merge AlignmentSet XMLs into a single file.",
            _gather_alignmentset_options, _args_runner_gather_alignmentset)

    # ConsensusReadSet
    builder('ccsset', "Merge ConsensusReadSet XMLs into a single file.",
            _gather_ccsset_options, _args_runner_gather_ccsset)

    # ConsensusAlignmentSet
    builder('ccs_alignmentset',
            "Merge ConsensusAlignmentSet XMLs into a single file.",
            _gather_ccs_alignmentset_options,
            _args_runner_gather_ccs_alignmentset)

    # ContigSet
    builder('contigset', "Merge ContigSet XMLs into a single file.",
            _gather_contigset_options, _args_runner_gather_contigset)

    return p
Ejemplo n.º 12
0
def get_parser():
    desc = "Pbsmrtpipe workflow engine"
    p = get_default_argparser(pbsmrtpipe.get_version(), desc)

    sp = p.add_subparsers(help='commands')

    def builder(subparser_id, description, options_func, exe_func):
        TU.subparser_builder(sp, subparser_id, description, options_func,
                             exe_func)

    wf_desc = "Run a pipeline using a pipeline template or with explict Bindings and EntryPoints."
    builder('pipeline', wf_desc, add_pipline_parser_options,
            _args_run_pipeline)

    # Run a pipeline by id
    pipline_id_desc = "Run a registered pipline by specifiying the pipline id."
    builder('pipeline-id', pipline_id_desc, add_pipeline_id_parser_options,
            _args_run_pipeline_id)

    builder('task', "Run Task by id.", add_task_parser_options,
            _args_task_runner)

    # Show Templates
    desc = "List all pipeline templates. A pipeline 'id' can be referenced in " \
           "your my_pipeline.xml file using '<import-template id=\"pbsmrtpipe.pipelines.my_pipeline_id\" />. This " \
           "can replace the explicit listing of EntryPoints and Bindings."

    builder('show-templates', desc, add_run_show_templates_options,
            _args_run_show_templates)

    # Show Template Details
    builder('show-template-details',
            "Show details about a specific Pipeline template.",
            add_show_template_details_parser_options,
            _args_run_show_template_details)

    # Show Tasks
    show_tasks_desc = "Show completed list of Tasks by id. Use ENV {x} to define a " \
                      "custom directory of tool contracts. These TCs will override " \
                      "the installed TCs (e.g., {x}=/path/to/my-tc-dir/)".format(x=ENV_TC_DIR)
    builder('show-tasks', show_tasks_desc, lambda x: x, _args_run_show_tasks)

    # Show Task id details
    desc_task_details = "Show Details of a particular task by id (e.g., 'pbsmrtpipe.tasks.filter_report'). Use 'show-tasks' to get a completed list of registered tasks."
    builder('show-task-details', desc_task_details, add_show_task_options,
            _args_run_show_task_details)

    wfo_desc = "Display all workflow level options that can be set in <options /> for preset.xml"
    builder('show-workflow-options', wfo_desc, _add_output_preset_xml_option,
            _args_run_show_workflow_level_options)

    diag_desc = "Diagnostic tests of preset.xml and cluster configuration"
    builder('run-diagnostic', diag_desc, add_args_run_diagnstic,
            _args_run_diagnostics)

    return p
Ejemplo n.º 13
0
def get_parser():
    desc = "Transform pbreport Report to HTML file."
    p = get_default_argparser(__version__, desc)
    add_log_debug_option(p)
    U.add_output_dir_option(p)
    _add_report_option(p)
    _add_output_file_option(p)
    _add_ccs_js_extras_option(p)
    p.set_defaults(func=_args_to_render_report)
    return p
Ejemplo n.º 14
0
def get_parser():

    desc = "Gathering File Tool used within pbcoretools on chunk.json files."
    p = get_default_argparser(__version__, desc)

    sp = p.add_subparsers(help="Commands")

    def builder(sid_, help_, opt_func_, exe_func_):
        return subparser_builder(sp, sid_, help_, opt_func_, exe_func_)

    # CSV
    builder('csv', "Merge CSV files into a single file.",
            _gather_csv_options, _args_runner_gather_csv)

    # Simple text
    builder('txt', "Merge text files into a single file.",
            _gather_txt_options, _args_runner_gather_txt)

    # Fastq
    builder('fastq', "Merge Fastq files into a single file.",
            _gather_fastq_options, _args_runner_gather_fastq)

    # Fasta
    builder('fasta', "Merge Fasta files into a single file.",
            _gather_fasta_options, _args_runner_gather_fasta)

    builder('fofn', "Merge FOFNs into a single file.",
            _gather_fofn_options, _args_runner_gather_fofn)

    # Gff
    builder('gff', "Merge Fasta files into a single file.",
            _gather_gff_options, _args_runner_gather_gff)

    # SubreadSet
    builder('subreadset', "Merge SubreadSet XMLs into a single file.",
            _gather_subreadset_options, _args_runner_gather_subreadset)

    # AlignmentSet
    builder('alignmentset', "Merge AlignmentSet XMLs into a single file.",
            _gather_alignmentset_options, _args_runner_gather_alignmentset)

    # ConsensusReadSet
    builder('ccsset', "Merge ConsensusReadSet XMLs into a single file.",
            _gather_ccsset_options, _args_runner_gather_ccsset)

    # ConsensusAlignmentSet
    builder('ccs_alignmentset',
            "Merge ConsensusAlignmentSet XMLs into a single file.",
            _gather_ccs_alignmentset_options, _args_runner_gather_ccs_alignmentset)

    # ContigSet
    builder('contigset', "Merge ContigSet XMLs into a single file.",
            _gather_contigset_options, _args_runner_gather_contigset)

    return p
Ejemplo n.º 15
0
def get_parser():
    p = get_default_argparser(__version__, __doc__)
    p.add_argument("fasta_in", type=validate_file, help="Input Fasta")
    p.add_argument("fasta_out", type=str, help="Output Fasta")
    p.add_argument('--read-length',
                   type=int,
                   default=25,
                   help="Min Sequence length to filter")
    add_resolved_tool_contract_option(p)
    # this parser cannot emit a tool contract, but can run from a resolved
    # contract via --resolved-tool-contract /path/to/resolved-tool-contract.json
    return p
Ejemplo n.º 16
0
    def _f(registry):
        p = get_default_argparser(version, description)
        sp = p.add_subparsers(help='Commands')

        args_summary_runner = __args_summary_runner(registry)
        args_rtc_runner = __args_rtc_runner(registry)
        args_tc_emit = __args_emit_tc_runner(registry)
        args_tcs_emit = __args_emit_all_tcs_runner(registry)

        _subparser_builder(sp, Constants.RTC_DRIVER, "Run Resolved Tool contract", _add_run_rtc_options, args_rtc_runner)
        _subparser_builder(sp, 'emit-tool-contracts', "Emit all Tool contracts to output-dir", _add_emit_all_tcs_options, args_tcs_emit)
        _subparser_builder(sp, 'emit-tool-contract', "Emit a single tool contract by id", _add_emit_tc_options, args_tc_emit)
        _subparser_builder(sp, 'summary', "Summary of Tool Contracts", lambda x: x, args_summary_runner)
        return p
Ejemplo n.º 17
0
def get_parser():
    desc = "Testkit Tool to run pbsmrtpipe jobs."
    p = get_default_argparser(__version__, desc)

    funcs = [
        TU.add_override_chunked_mode, TU.add_override_distribute_option,
        _add_config_file_option, add_tests_only_option, add_log_level_option,
        add_log_file_option, add_log_debug_option,
        add_ignore_test_failures_option, add_output_xml_option
    ]

    f = compose(*funcs)
    p = f(p)

    return p
Ejemplo n.º 18
0
def get_parser():
    desc = "Pbsmrtpipe workflow engine"
    p = get_default_argparser(pbsmrtpipe.get_version(), desc)

    sp = p.add_subparsers(help='commands')

    def builder(subparser_id, description, options_func, exe_func):
        subparser_builder(sp, subparser_id, description, options_func, exe_func)

    wf_desc = "Run a pipeline using a pipeline template or with explict Bindings and EntryPoints."
    builder('pipeline', wf_desc, add_pipline_parser_options, _args_run_pipeline)

    # Run a pipeline by id
    pipline_id_desc = "Run a registered pipeline by specifying the pipeline id."
    builder('pipeline-id', pipline_id_desc, add_pipeline_id_parser_options, _args_run_pipeline_id)

    builder('task', "Run Task (i.e., ToolContract) by id", add_task_parser_options, _args_task_runner)

    # Show Templates
    desc = "List all pipeline templates. A pipeline 'id' can be referenced in " \
           "your my_pipeline.xml file using '<import-template id=\"pbsmrtpipe.pipelines.my_pipeline_id\" />. This " \
           "can replace the explicit listing of EntryPoints and Bindings."

    builder('show-templates', desc, add_run_show_templates_options, _args_run_show_templates)

    # Show Template Details
    builder('show-template-details', "Show details about a specific Pipeline template.", add_show_template_details_parser_options, _args_run_show_template_details)

    # Show Tasks
    show_tasks_desc = "Show completed list of Tasks by id. Use ENV {x} to define a " \
                      "custom directory of tool contracts. These TCs will override " \
                      "the installed TCs (e.g., {x}=/path/to/my-tc-dir/)".format(x=ENV_TC_DIR)
    builder('show-tasks', show_tasks_desc, lambda x: x, _args_run_show_tasks)

    # Show Task id details
    desc_task_details = "Show Details of a particular task by id (e.g., 'pbsmrtpipe.tasks.filter_report'). Use 'show-tasks' to get a completed list of registered tasks."
    builder('show-task-details', desc_task_details, add_show_task_options, _args_run_show_task_details)

    wfo_desc = "Display all workflow level options that can be set in <options /> for preset.xml"
    builder('show-workflow-options', wfo_desc, _add_output_preset_xml_option, _args_run_show_workflow_level_options)

    diag_desc = "Diagnostic tests of preset.xml and cluster configuration"
    builder('run-diagnostic', diag_desc, add_args_run_diagnstic, _args_run_diagnostics)

    desc_chunk_op_show = "Show a list of loaded chunk operators for Scatter/Gather Tasks. Extend resource loading by exporting ENV var {i}. Example export {i}=/path/to/chunk-operators-xml-dir".format(i=ENV_CHK_OPT_DIR)
    builder('show-chunk-operators', desc_chunk_op_show, lambda x: x, _args_show_chunk_operator_summary)

    return p
Ejemplo n.º 19
0
def get_parser():
    desc = "Run multiple testkit.cfg files in parallel"
    p = get_default_argparser(__version__, desc)
    fs = [TU.add_debug_option,
          TU.add_override_chunked_mode,
          TU.add_override_distribute_option]

    f = compose(*fs)
    p = f(p)

    p.add_argument('testkit_cfg_fofn', type=validate_testkit_cfg_fofn,
                   help="File of butler.cfg file name relative to the current dir (e.g., RS_Resquencing/testkit.cfg")
    p.add_argument('-n', '--nworkers', type=int, default=1, help="Number of jobs to concurrently run.")

    p.set_defaults(func=_args_run_multi_testkit_cfg)
    return p
Ejemplo n.º 20
0
def get_parser():
    desc = "Testkit Tool to run pbsmrtpipe jobs."
    p = get_default_argparser(__version__, desc)

    funcs = [TU.add_override_chunked_mode,
             TU.add_override_distribute_option,
             _add_config_file_option,
             add_tests_only_option,
             add_log_level_option,
             add_log_file_options,
             TU.add_debug_option]

    f = compose(*funcs)
    p = f(p)

    return p
Ejemplo n.º 21
0
def get_parser():
    desc = "Tool to import datasets, convert/import fasta file and run analysis jobs"
    p = get_default_argparser(__version__, desc)

    sp = p.add_subparsers(help="commands")

    def builder(subparser_id, description, options_func, exe_func):
        subparser_builder(sp, subparser_id, description, options_func, exe_func)

    ds_desc = "Import DataSet XML "
    builder("import-dataset", ds_desc, add_sal_and_xml_dir_options, args_runner_import_datasets)

    rs_desc = "Import RS Metadata XML"
    builder("import-rs-movie", rs_desc, add_sal_and_xml_dir_options, args_runner_import_rs_movies)

    fasta_desc = "Import Fasta (and convert to ReferenceSet)"
    builder("import-fasta", fasta_desc, add_import_fasta_opts, args_run_import_fasta)

    return p
Ejemplo n.º 22
0
def get_main_parser():
    p = get_default_argparser(__version__, "Tool For generating MOCK data for development testing.")

    sp = p.add_subparsers(help="Subparser Commands")

    def _builder(subparser_id, desc, options_func, exe_func):
        U.subparser_builder(sp, subparser_id, desc, options_func, exe_func)

    _builder('fasta', "Generate a random Fasta file", _add_run_random_fasta_file, _args_run_to_random_fasta_file)

    _builder('fastq', "Generate a random Fastq File", _add_run_random_fastq_options, _args_run_random_fastq_file)

    _builder('fofn', "Generate a random FOFN file", _add_run_random_fofn_options, _args_run_random_fofn)

    _builder('filter-fasta', "Filter a Fasta file by sequence length", _add_run_fasta_filter_options, _args_run_fasta_filter)

    _builder("dataset-report", "DataSet Report Generator", _add_run_dataset_report, _args_run_dataset_report)

    _builder("reference-ds-report", "Reference DataSet Report Generator", _add_run_reference_dataset_report, _args_run_reference_dataset_report)

    return p
Ejemplo n.º 23
0
    def _f(registry):
        p = get_default_argparser(version, description)
        sp = p.add_subparsers(help='Commands')

        args_summary_runner = __args_summary_runner(registry)
        args_rtc_runner = __args_rtc_runner(registry)
        args_tc_emit = __args_emit_tc_runner(registry)
        args_tcs_emit = __args_emit_all_tcs_runner(registry)

        _subparser_builder(sp, Constants.RTC_DRIVER,
                           "Run Resolved Tool contract", _add_run_rtc_options,
                           args_rtc_runner)
        _subparser_builder(sp, 'emit-tool-contracts',
                           "Emit all Tool contracts to output-dir",
                           _add_emit_all_tcs_options, args_tcs_emit)
        _subparser_builder(sp, 'emit-tool-contract',
                           "Emit a single tool contract by id",
                           _add_emit_tc_options, args_tc_emit)
        _subparser_builder(sp, 'summary', "Summary of Tool Contracts",
                           lambda x: x, args_summary_runner)
        return p
Ejemplo n.º 24
0
def get_main_parser():
    """
    Returns an argparse Parser with all the commandline utils as
    subparsers
    """
    desc = "General tool used by run task-manifests.json files."
    p = get_default_argparser(__version__, desc)

    sp = p.add_subparsers(help='Subparser Commands')

    def builder(sid_, help_, opt_func_, exe_func_):
        return U.subparser_builder(sp, sid_, help_, opt_func_, exe_func_)

    # Run command
    builder('run', "Convert a Pacbio Input.xml file to Movie FOFN", _add_run_options, _args_run_task_manifest)

    builder("to-cmds", "Extract the cmds from manifest.json", _add_manifest_json_option, _args_to_cmd)

    builder("inspect", "Pretty-Print a summary of the task-manifestExtract the cmds from manifest.json",
            _add_base_options, _args_pprint_task_manifest)

    return p
Ejemplo n.º 25
0
def _example_parser():
    p = get_default_argparser("1.0.0", "Example Mock Parser")
    p = CU.add_debug_option(p)
    p.add_argument('example_file', type=str, help="No testing of existence")
    return p
Ejemplo n.º 26
0
def get_parser():
    p = get_default_argparser("0.1.0", "Interactive tool for resolving Tool Contracts")
    p.add_argument("tc_path", type=str, help='Path to Tool Contract')
    p.set_defaults(func=_run_main)
    return p
Ejemplo n.º 27
0
def get_parser():
    desc = "Custom PipelineTemplate Registry to write pipeline templates to output directory"
    p = get_default_argparser("0.1.0", desc)
    p.add_argument('output_dir', help="Path to output directory")
    return p
Ejemplo n.º 28
0
def get_parser():
    desc = "Custom PipelineTemplate Registry to write pipeline templates to output directory"
    p = get_default_argparser("0.1.0", desc)
    p.add_argument('output_dir', help="Path to output directory")
    return p
Ejemplo n.º 29
0
def _example_parser():
    p = get_default_argparser("1.0.0", "Example Mock Parser")
    p = CU.add_log_debug_option(p)
    p.add_argument('example_file', type=str, help="No testing of existence")
    return p