()
| 458 | |
| 459 | |
| 460 | def parse_args() -> argparse.Namespace: |
| 461 | parser = argparse.ArgumentParser(description=__doc__) |
| 462 | parser.add_argument("--sample-sheet", type=Path, required=True) |
| 463 | parser.add_argument("--reference-fasta", type=Path, required=True) |
| 464 | parser.add_argument( |
| 465 | "--known-sites", |
| 466 | type=Path, |
| 467 | action="append", |
| 468 | default=[], |
| 469 | help="Repeat for each known-sites VCF used by BaseRecalibrator.", |
| 470 | ) |
| 471 | parser.add_argument("--target-bed", type=Path) |
| 472 | parser.add_argument( |
| 473 | "--sample-model", |
| 474 | choices=["singleton", "cohort", "duo", "trio", "family"], |
| 475 | default="singleton", |
| 476 | ) |
| 477 | parser.add_argument("--bqsr-mode", choices=["auto", "off", "force"], default="auto") |
| 478 | parser.add_argument( |
| 479 | "--emit-gvcf", |
| 480 | action="store_true", |
| 481 | help="Emit per-sample gVCFs even without joint genotyping.", |
| 482 | ) |
| 483 | parser.add_argument( |
| 484 | "--joint-call", action="store_true", help="Combine per-sample gVCFs and run GenotypeGVCFs." |
| 485 | ) |
| 486 | parser.add_argument( |
| 487 | "--genome-build", |
| 488 | help="Genome build or registry alias for resource readiness, e.g. GRCh38, mm39, or a configured local alias.", |
| 489 | ) |
| 490 | parser.add_argument( |
| 491 | "--bundle-root", |
| 492 | action="append", |
| 493 | default=[], |
| 494 | help="Resource bundle override formatted as bundle=/path. May be repeated.", |
| 495 | ) |
| 496 | parser.add_argument("--include-optional-resources", action="store_true") |
| 497 | parser.add_argument("--resource-checksums", action="store_true") |
| 498 | parser.add_argument( |
| 499 | "--require-resource-plan", |
| 500 | action="store_true", |
| 501 | help="Treat missing registered reference bundles as blocking for this local runner.", |
| 502 | ) |
| 503 | parser.add_argument( |
| 504 | "--skip-resource-plan", |
| 505 | action="store_true", |
| 506 | help="Skip registered reference bundle readiness checks.", |
| 507 | ) |
| 508 | parser.add_argument("--outdir", type=Path) |
| 509 | parser.add_argument("--run-id", default=slug_timestamp("dna-germline-variants")) |
| 510 | parser.add_argument("--execute", action="store_true") |
| 511 | return parser.parse_args() |
| 512 | |
| 513 | |
| 514 | def main() -> int: |
no test coverage detected