From 7d3020fd3065c4223f4dfd99e9041e84f262d8f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Sv=C3=A4rd?= Date: Wed, 13 Mar 2024 09:49:48 +0100 Subject: [PATCH] Add option to re-run input artifacts --- cg_lims/EPPs/move/rerun_samples.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cg_lims/EPPs/move/rerun_samples.py b/cg_lims/EPPs/move/rerun_samples.py index e5d697c5..ba1efa0e 100644 --- a/cg_lims/EPPs/move/rerun_samples.py +++ b/cg_lims/EPPs/move/rerun_samples.py @@ -64,12 +64,16 @@ def check_same_sample_in_many_rerun_pools(rerun_arts: List[Artifact]) -> None: help="The name(s) of the process type(s) before the requeue step. Fetching artifact to requeue from here." ) @options.udf(help="UDF that will tell wich artifacts to move.") +@options.input( + help="Use this flag if you want to queue the input artifacts of the current process. Default is to queue the " + "output artifacts (analytes) of the process. " +) @click.pass_context -def rerun_samples(ctx, workflow_id, stage_id, udf, process_types): +def rerun_samples(ctx, workflow_id, stage_id, udf, process_type, input: bool): """Script to requeue samples for sequencing.""" process = ctx.obj["process"] lims = ctx.obj["lims"] - artifacts = get_artifacts(process, False) + artifacts = get_artifacts(process=process, input=input) rerun_arts = filter_artifacts(artifacts, udf, True) if rerun_arts: try: