diff --git a/tbp_parser/LIMS.py b/tbp_parser/LIMS.py index 1305229..56e6739 100644 --- a/tbp_parser/LIMS.py +++ b/tbp_parser/LIMS.py @@ -318,8 +318,8 @@ def apply_lims_rules(self, gene_dictionary, DF_LIMS, max_mdl_resistance, antimic self.logger.debug("LIMS:There are no mutations for this gene ({}) associated with this drug ({})".format(gene, antimicrobial_name)) DF_LIMS[gene_code] = "No mutations detected" - if DF_LIMS[gene_code][0] == "No sequence": - self.logger.debug("LIMS:This gene has insufficient coverage; changing antimicrobial code") + if DF_LIMS[gene_code][0] == "No sequence" and max_mdl_resistance[0] != "R": + self.logger.debug("LIMS:This gene has insufficient coverage and the max resistance isn't R; changing antimicrobial code") DF_LIMS[antimicrobial_code] = "Pending Retest" if "Insufficient Coverage" in mdl_interpretations and max_mdl_resistance[0] in ["WT", "S", "Insufficient Coverage"]: