MCPcopy
hub / github.com/openai/plugins / build_plan

Function build_plan

plugins/ngs-analysis/scripts/run_amplicon_microbiome.py:296–332  ·  view source on GitHub ↗
(args: argparse.Namespace, samples: list[dict[str, str]])

Source from the content-addressed store, hash-verified

294
295
296def 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
335def r_package_preflight(packages: list[str]) -> dict[str, Any]:

Callers 1

mainFunction · 0.70

Calls 4

command_plan_entryFunction · 0.90
build_qiime2_planFunction · 0.85
build_nfcore_planFunction · 0.85
extendMethod · 0.80

Tested by

no test coverage detected