()
| 832 | |
| 833 | |
| 834 | def parse_args() -> argparse.Namespace: |
| 835 | parser = argparse.ArgumentParser(description=__doc__) |
| 836 | parser.add_argument("--sample-sheet", type=Path, required=True) |
| 837 | parser.add_argument("--reference-fasta", type=Path, required=True) |
| 838 | parser.add_argument("--target-bed", type=Path) |
| 839 | parser.add_argument("--hotspot-vcf", type=Path) |
| 840 | parser.add_argument("--umi-mode", default="single", choices=["single", "duplex", "unknown"]) |
| 841 | parser.add_argument("--umi-tag", default="RX") |
| 842 | parser.add_argument( |
| 843 | "--grouping-strategy", |
| 844 | default="adjacency", |
| 845 | choices=["identity", "edit", "adjacency", "paired"], |
| 846 | ) |
| 847 | parser.add_argument("--umi-edits", type=int, default=1) |
| 848 | parser.add_argument("--min-reads-per-molecule", type=int, default=2) |
| 849 | parser.add_argument("--min-af", type=float, default=0.005) |
| 850 | parser.add_argument( |
| 851 | "--genome-build", |
| 852 | help="Genome build or registry alias for resource readiness, e.g. GRCh38, mm39, or a configured local alias.", |
| 853 | ) |
| 854 | parser.add_argument( |
| 855 | "--bundle-root", |
| 856 | action="append", |
| 857 | default=[], |
| 858 | help="Resource bundle override formatted as bundle=/path. May be repeated.", |
| 859 | ) |
| 860 | parser.add_argument("--include-optional-resources", action="store_true") |
| 861 | parser.add_argument("--resource-checksums", action="store_true") |
| 862 | parser.add_argument( |
| 863 | "--require-resource-plan", |
| 864 | action="store_true", |
| 865 | help="Treat missing registered reference bundles as blocking for this direct runner.", |
| 866 | ) |
| 867 | parser.add_argument( |
| 868 | "--skip-resource-plan", |
| 869 | action="store_true", |
| 870 | help="Skip registered reference bundle readiness checks.", |
| 871 | ) |
| 872 | parser.add_argument("--outdir", type=Path) |
| 873 | parser.add_argument("--run-id", default=slug_timestamp("dna-umi-panel-variants")) |
| 874 | parser.add_argument("--execute", action="store_true") |
| 875 | return parser.parse_args() |
| 876 | |
| 877 | |
| 878 | def serializable_args(args: argparse.Namespace) -> dict[str, Any]: |
no test coverage detected