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

Function write_visuals

plugins/ngs-analysis/scripts/run_dna_germline_variants.py:413–457  ·  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

411
412
413def write_visuals(
414 run_dir: Path,
415 status: str,
416 validation: dict[str, Any],
417 resource_plan: dict[str, Any] | None = None,
418) -> dict[str, str]:
419 entries = [
420 artifact_entry(
421 artifact_id="sample_table",
422 title="Resolved Sample Table",
423 path="validation/samples.normalized.tsv",
424 kind="table",
425 status="created",
426 description="Resolved sample table with absolute alignment paths used by the germline runner.",
427 ),
428 ]
429 review_outputs = add_vcf_review_notebook_entry(
430 run_dir,
431 entries,
432 title="Germline DNA VCF Review",
433 table_items=[("Resolved Sample Table", "validation/samples.normalized.tsv")],
434 object_items=[("Run Summary", "summary.md"), ("Artifact Index", "artifact_index.json")],
435 )
436 entries.extend(ngs_resource_gate.resource_visual_entries(resource_plan))
437 index = write_visualization_index(
438 run_dir,
439 title="Germline DNA Review Bundle",
440 description="Review surface for the GATK germline lane, including generic VCF/gVCF notebook previews when variant artifacts are present.",
441 entries=entries,
442 notes=[
443 *validation.get("warnings", []),
444 *ngs_resource_gate.resource_messages(resource_plan),
445 ],
446 analysis_intent="real_analysis" if status != "blocked" else "blocked_preflight",
447 provenance_summary={
448 "status": status,
449 "sample_count": validation.get("sample_count", 0),
450 "resource_plan_ok": validation.get("resource_plan_ok"),
451 },
452 )
453 return {
454 "visualization_index": str(index.relative_to(run_dir)),
455 "visualization_manifest": "visualizations/visualization_manifest.json",
456 **review_outputs,
457 }
458
459
460def parse_args() -> argparse.Namespace:

Callers 1

mainFunction · 0.70

Calls 5

artifact_entryFunction · 0.90
extendMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected