| 373 | |
| 374 | |
| 375 | def parse_args() -> argparse.Namespace: |
| 376 | parser = argparse.ArgumentParser(description=__doc__) |
| 377 | parser.add_argument("--pipeline", choices=sorted(NFCORE_PIPELINES), required=True) |
| 378 | parser.add_argument("--sample-sheet", type=Path, required=True) |
| 379 | parser.add_argument("--params-file", type=Path) |
| 380 | parser.add_argument( |
| 381 | "--profile", help="Nextflow profile, e.g. docker, singularity, conda, or a site profile." |
| 382 | ) |
| 383 | parser.add_argument("--revision", help="Pinned nf-core revision/tag/commit.") |
| 384 | parser.add_argument("--genome") |
| 385 | parser.add_argument( |
| 386 | "--genome-build", |
| 387 | help="Genome build/alias for the reference resource plan. Defaults to --genome when omitted.", |
| 388 | ) |
| 389 | parser.add_argument("--fasta", type=Path) |
| 390 | parser.add_argument("--gtf", type=Path) |
| 391 | parser.add_argument( |
| 392 | "--extra-param", |
| 393 | action="append", |
| 394 | default=[], |
| 395 | help="Additional generated params as key=value. May be repeated.", |
| 396 | ) |
| 397 | parser.add_argument( |
| 398 | "--nextflow-arg", |
| 399 | action="append", |
| 400 | default=[], |
| 401 | help="Raw extra Nextflow argument appended to the command. May be repeated.", |
| 402 | ) |
| 403 | parser.add_argument( |
| 404 | "--bundle-root", |
| 405 | action="append", |
| 406 | default=[], |
| 407 | help="Resource bundle override formatted as bundle=/path. May be repeated.", |
| 408 | ) |
| 409 | parser.add_argument( |
| 410 | "--include-optional-resources", |
| 411 | action="store_true", |
| 412 | help="Include optional resource bundles such as Bracken/HUMAnN in readiness checks.", |
| 413 | ) |
| 414 | parser.add_argument( |
| 415 | "--resource-checksums", |
| 416 | action="store_true", |
| 417 | help="Compute checksums for resource files below the reference-manager checksum threshold.", |
| 418 | ) |
| 419 | parser.add_argument( |
| 420 | "--skip-resource-plan", |
| 421 | action="store_true", |
| 422 | help="Generate the nf-core run envelope without gating on reference/database bundle readiness.", |
| 423 | ) |
| 424 | parser.add_argument("--outdir", type=Path) |
| 425 | parser.add_argument("--run-id", default=None) |
| 426 | parser.add_argument("--execute", action="store_true") |
| 427 | return parser.parse_args() |
| 428 | |
| 429 | |
| 430 | def serializable_args(args: argparse.Namespace) -> dict[str, Any]: |