Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion reditools/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 2 additions & 3 deletions reditools/reditools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down