MCPcopy Index your code
hub / github.com/openai/plugins / select_method

Function select_method

plugins/ngs-analysis/scripts/run_bulk_rnaseq_de.py:272–287  ·  view source on GitHub ↗
(
    requested: str, input_mode: str, packages: dict[str, bool], errors: list[str]
)

Source from the content-addressed store, hash-verified

270
271
272def select_method(
273 requested: str, input_mode: str, packages: dict[str, bool], errors: list[str]
274) -> str:
275 if requested != "auto":
276 if requested in {"DESeq2", "edgeR"} and input_mode != "raw_counts":
277 errors.append(
278 f"{requested} requires raw integer-like counts; input_mode={input_mode} is not compatible"
279 )
280 if requested != "limma_log2" and not packages.get(requested, False):
281 errors.append(f"{requested} was requested but the R package is not installed")
282 return requested
283 if input_mode == "raw_counts" and packages.get("DESeq2", False):
284 return "DESeq2"
285 if input_mode == "raw_counts" and packages.get("edgeR", False):
286 return "edgeR"
287 return "limma_log2"
288
289
290def write_workflow(run_dir: Path) -> None:

Callers 1

validate_inputsFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected