(args: argparse.Namespace, samples: list[dict[str, str]])
| 294 | |
| 295 | |
| 296 | def build_plan(args: argparse.Namespace, samples: list[dict[str, str]]) -> list[dict[str, Any]]: |
| 297 | if args.backend == "qiime2": |
| 298 | return build_qiime2_plan(args, samples) |
| 299 | if args.backend == "nf-core/ampliseq": |
| 300 | return build_nfcore_plan(args) |
| 301 | cmd: list[str | Path] = [ |
| 302 | "Rscript", |
| 303 | DADA2_BACKEND_SCRIPT, |
| 304 | "--sample-sheet", |
| 305 | args.sample_sheet.expanduser().resolve(), |
| 306 | "--outdir", |
| 307 | ".", |
| 308 | "--primer-forward", |
| 309 | args.primer_forward, |
| 310 | "--primer-reverse", |
| 311 | args.primer_reverse, |
| 312 | "--threads", |
| 313 | str(args.threads), |
| 314 | ] |
| 315 | if args.trunc_len_f is not None: |
| 316 | cmd.extend(["--trunc-len-f", str(args.trunc_len_f)]) |
| 317 | if args.trunc_len_r is not None: |
| 318 | cmd.extend(["--trunc-len-r", str(args.trunc_len_r)]) |
| 319 | if args.taxonomy_classifier: |
| 320 | cmd.extend(["--taxonomy-classifier", args.taxonomy_classifier.expanduser().resolve()]) |
| 321 | return [ |
| 322 | command_plan_entry( |
| 323 | "DADA2 R backend", |
| 324 | cmd, |
| 325 | outputs=[ |
| 326 | "tables/asv_table.tsv", |
| 327 | "tables/taxonomy.tsv", |
| 328 | "tables/read_retention.tsv", |
| 329 | "tables/representative_sequences.fasta", |
| 330 | ], |
| 331 | ) |
| 332 | ] |
| 333 | |
| 334 | |
| 335 | def r_package_preflight(packages: list[str]) -> dict[str, Any]: |
no test coverage detected