Skip to content

CLI Reference

The Custom Panel command-line interface provides powerful tools for gene panel curation and management.

Overview

The CLI is built with Typer and provides several main commands:

  • run - Execute the complete gene panel pipeline
  • fetch - Fetch data from individual sources
  • config-check - Validate configuration files
  • search-panels - Search available panels in PanelApp

Main Module

custom_panel.cli

Improved command-line interface for the custom-panel tool.

This module provides the main CLI commands using Typer with better modularization and use of the new utilities.

config_check

config_check(
    config_file=typer.Option(
        None,
        "--config-file",
        "-c",
        help="Configuration file path",
    ),
)

Validate and display configuration using improved config management.

display_summary

display_summary(df, config)

Display pipeline summary statistics using improved utilities.

fetch

fetch(
    source=typer.Argument(
        ..., help="This command is deprecated."
    ),
    config_file=typer.Option(
        None,
        "--config-file",
        "-c",
        help="Configuration file path",
    ),
    output_dir=typer.Option(
        "results/fetch",
        "--output-dir",
        "-o",
        help="Output directory",
    ),
    format=typer.Option(
        "parquet",
        "--format",
        "-f",
        help="Output format (parquet, csv, excel)",
    ),
    log_level=typer.Option(
        "INFO", "--log-level", help="Log level"
    ),
)

(DEPRECATED) Fetch data from a single source. Please use the 'run' command instead.

load_config_manager

load_config_manager(config_file=None)

Load configuration from files and create a ConfigManager instance.

main

main(
    version=typer.Option(
        False,
        "--version",
        "-v",
        help="Show version and exit",
        callback=version_callback,
    ),
)

Custom Panel - Gene panel curation and aggregation tool.

run

run(
    config_file=typer.Option(
        None,
        "--config-file",
        "-c",
        help="Configuration file path",
    ),
    output_dir=typer.Option(
        None, "--output-dir", "-o", help="Output directory"
    ),
    score_threshold=typer.Option(
        None,
        "--score-threshold",
        help="Override the evidence score threshold for gene inclusion",
    ),
    log_level=typer.Option(
        "INFO",
        "--log-level",
        help="Log level (DEBUG, INFO, WARNING, ERROR)",
    ),
    dry_run=typer.Option(
        False,
        "--dry-run",
        help="Run without generating output files",
    ),
    save_intermediate=typer.Option(
        False,
        "--save-intermediate",
        help="Save intermediate files for debugging",
    ),
    intermediate_format=typer.Option(
        None,
        "--intermediate-format",
        help="Format for intermediate files (csv, excel, parquet, json)",
    ),
    log_to_file=typer.Option(
        False, "--log-to-file", help="Save logs to files"
    ),
    structured_output=typer.Option(
        True,
        "--structured-output/--flat-output",
        help="Use structured output directories",
    ),
    generate_twist_form=typer.Option(
        False,
        "--generate-twist-form",
        help="Generate Twist DNA submission form with panel data",
    ),
)

Run the complete gene panel curation pipeline.

search_panels

search_panels(
    query=typer.Argument(
        ..., help="Search term for panel names"
    ),
    config_file=typer.Option(
        None,
        "--config-file",
        "-c",
        help="Configuration file path",
    ),
    log_level=typer.Option(
        "INFO", "--log-level", help="Log level"
    ),
)

Search for available panels in PanelApp.

setup_logging

setup_logging(log_level='INFO')

Setup logging configuration.

version_callback

version_callback(value)

Version callback for CLI.