()
| 879 | |
| 880 | |
| 881 | def parse_args() -> argparse.Namespace: |
| 882 | parser = argparse.ArgumentParser(description=__doc__) |
| 883 | parser.add_argument("--sample-sheet", type=Path, required=True) |
| 884 | parser.add_argument("--reference-fasta", type=Path, required=True) |
| 885 | parser.add_argument("--region") |
| 886 | parser.add_argument( |
| 887 | "--annotation-vcf", |
| 888 | type=Path, |
| 889 | help="Optional bgzip/tabix-indexed VCF used to annotate called variants.", |
| 890 | ) |
| 891 | parser.add_argument( |
| 892 | "--annotation-columns", |
| 893 | help="Optional bcftools annotate -c column list. Defaults to ID plus available AF/AC/AN tags from the resource VCF.", |
| 894 | ) |
| 895 | parser.add_argument( |
| 896 | "--filter-min-qual", |
| 897 | type=float, |
| 898 | help="Optional QUAL threshold for soft-filtering emitted variants.", |
| 899 | ) |
| 900 | parser.add_argument( |
| 901 | "--filter-min-site-dp", |
| 902 | type=int, |
| 903 | help="Optional INFO/DP threshold for soft-filtering emitted variants.", |
| 904 | ) |
| 905 | parser.add_argument( |
| 906 | "--callable-min-depth", |
| 907 | type=int, |
| 908 | default=DEFAULT_CALLABLE_MIN_DEPTH, |
| 909 | help="Minimum depth used to mark a locus callable in region-level depth summaries.", |
| 910 | ) |
| 911 | parser.add_argument( |
| 912 | "--genome-build", |
| 913 | help="Genome build or registry alias for resource readiness, e.g. GRCh38, mm39, or a configured local alias.", |
| 914 | ) |
| 915 | parser.add_argument( |
| 916 | "--bundle-root", |
| 917 | action="append", |
| 918 | default=[], |
| 919 | help="Resource bundle override formatted as bundle=/path. May be repeated.", |
| 920 | ) |
| 921 | parser.add_argument("--include-optional-resources", action="store_true") |
| 922 | parser.add_argument("--resource-checksums", action="store_true") |
| 923 | parser.add_argument( |
| 924 | "--require-resource-plan", |
| 925 | action="store_true", |
| 926 | help="Treat missing registered reference bundles as blocking for this local runner.", |
| 927 | ) |
| 928 | parser.add_argument( |
| 929 | "--skip-resource-plan", |
| 930 | action="store_true", |
| 931 | help="Skip registered reference bundle readiness checks.", |
| 932 | ) |
| 933 | parser.add_argument("--outdir", type=Path) |
| 934 | parser.add_argument("--run-id", default=slug_timestamp("dna-variant-calling")) |
| 935 | parser.add_argument("--execute", action="store_true") |
| 936 | return parser.parse_args() |
| 937 | |
| 938 |
no test coverage detected