diff --git a/prymer/offtarget/offtarget_detector.py b/prymer/offtarget/offtarget_detector.py index 7f4d1d2..9c37f14 100644 --- a/prymer/offtarget/offtarget_detector.py +++ b/prymer/offtarget/offtarget_detector.py @@ -362,6 +362,8 @@ def _build_off_target_result( or right_bwa_result.hit_count > self._max_primer_hits ): result = OffTargetResult(primer_pair=primer_pair, passes=False) + if self._cache_results: + self._primer_pair_cache[primer_pair] = replace(result, cached=True) return result # Get the set of reference names with hits