diff --git a/reditools/analyze.py b/reditools/analyze.py index 633e9e4..d82f0f5 100644 --- a/reditools/analyze.py +++ b/reditools/analyze.py @@ -375,7 +375,9 @@ def parse_options(): # noqa:WPS213 '--strand-correction', default=False, help='Strand correction. Once the strand has been inferred, ' + - 'only bases according to this strand will be selected.', + 'only bases according to this strand will be selected. If ' + + 'edits are detected on the reverse strand, the base complements ' + + 'will be reported.', action='store_true', ) parser.add_argument( diff --git a/reditools/reditools.py b/reditools/reditools.py index d24a941..e08482b 100644 --- a/reditools/reditools.py +++ b/reditools/reditools.py @@ -380,6 +380,8 @@ def analyze(self, alignment_manager, region=None): # noqa:WPS231,WPS213 if bases is not None and self._use_strand_correction: strand = bases.get_strand(threshold=self.strand_confidence_threshold) bases.filter_by_strand(strand) + if strand == '-': + bases.complement() if not self._rtqc.check(self, bases): continue column = self._get_column(position, bases, region) @@ -435,9 +437,6 @@ def _get_column(self, position, bases, region): region.stop, ) return None - strand = bases.get_strand(threshold=self.strand_confidence_threshold) - if strand == '-': - bases.complement() return RTResult(bases, strand, region.contig, position)