MCPcopy
hub / github.com/openai/plugins / write_summary

Function write_summary

plugins/ngs-analysis/scripts/run_chip_cutrun_peaks_qc.py:553–589  ·  view source on GitHub ↗
(
    run_dir: Path,
    status: str,
    validation: dict[str, Any],
    resource_plan: dict[str, Any] | None = None,
)

Source from the content-addressed store, hash-verified

551
552
553def write_summary(
554 run_dir: Path,
555 status: str,
556 validation: dict[str, Any],
557 resource_plan: dict[str, Any] | None = None,
558) -> None:
559 lines = [
560 "# ChIP/CUT&RUN Peaks QC Run Summary",
561 "",
562 f"Status: `{status}`",
563 f"Assay: `{validation.get('assay')}`",
564 f"Samples parsed: `{validation.get('sample_count', 0)}`",
565 "",
566 "## Key Artifacts",
567 "",
568 "- `workflow/chip_cutrun_command_plan.json`",
569 "- `qc/chip_cutrun_qc_contract.json`",
570 "- `qc/chip_cutrun_qc_summary.tsv` and `qc/chip_cutrun_qc_summary.json`",
571 "- `qc/chip_cutrun_qc_dashboard.html`, `qc/chip_cutrun_qc_frip_peak_overview.svg`, and `qc/chip_cutrun_qc_insert_size_distribution.svg`",
572 "- `peaks/*Peak`, `peaks/consensus_peaks.bed`, and `tracks/*.bw` when executed",
573 "- `tracks/browser_tracks.tsv`, `tracks/browser_track_preview.html`, `tracks/ucsc_track_lines.txt`, and `tracks/igv_session.xml`",
574 "- `motifs/motif_enrichment_plan.json`",
575 "- `motifs/motif_summary.tsv` when motif outputs are generated",
576 "- `resources/resource_plan.json`, `resource_manifest.tsv`, `resource_env.sh`, `resource_readiness.md`, and resource setup-plan artifacts",
577 "- `visualizations/index.html`",
578 "- `run_manifest.json` and `artifact_index.json`",
579 "",
580 ]
581 if validation.get("warnings"):
582 lines.extend(["## Warnings", ""])
583 lines.extend(f"- {item}" for item in validation["warnings"])
584 lines.append("")
585 lines.extend(ngs_resource_gate.resource_summary_lines(resource_plan))
586 if validation.get("errors"):
587 lines.extend(["## Blockers", ""])
588 lines.extend(f"- {item}" for item in validation["errors"])
589 write_text(run_dir / "summary.md", "\n".join(lines) + "\n")
590
591
592def parse_args() -> argparse.Namespace:

Callers 1

mainFunction · 0.70

Calls 3

write_textFunction · 0.90
extendMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected