From 7413777d7f1c511bf440aa3b3b920afa4b863f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Sv=C3=A4rd?= Date: Fri, 19 Jan 2024 10:57:53 +0100 Subject: [PATCH] add measurement and input artifact flags to calculate-amount-ng epp --- cg_lims/EPPs/udf/calculate/calculate_amount_ng.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cg_lims/EPPs/udf/calculate/calculate_amount_ng.py b/cg_lims/EPPs/udf/calculate/calculate_amount_ng.py index d2a025c1..7543a157 100644 --- a/cg_lims/EPPs/udf/calculate/calculate_amount_ng.py +++ b/cg_lims/EPPs/udf/calculate/calculate_amount_ng.py @@ -2,7 +2,6 @@ import sys import click - from cg_lims import options from cg_lims.exceptions import LimsError, MissingUDFsError from cg_lims.get.artifacts import get_artifacts @@ -15,6 +14,8 @@ @options.amount_udf_option() @options.volume_udf_option() @options.subtract_volume_option() +@options.measurement() +@options.input() @click.pass_context def calculate_amount_ng( ctx: click.Context, @@ -22,6 +23,8 @@ def calculate_amount_ng( volume_udf: str, concentration_udf: str, subtract_volume: str, + measurement: bool = False, + input: bool = False, ): """Calculates and auto-fills the quantities of DNA in sample from concentration and volume measurements. The volume is subtracted by either 0 or 3 in the calculations. This is @@ -33,7 +36,7 @@ def calculate_amount_ng( lims = ctx.obj["lims"] try: - artifacts = get_artifacts(process=process, measurement=True) + artifacts = get_artifacts(process=process, measurement=measurement, input=input) missing_udfs_count = 0 artifacts_with_missing_udf = [] for artifact in artifacts: