Skip to content

Commit

Permalink
chore: tiny logical improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
clintval committed Jan 10, 2025
1 parent 88d6452 commit da497e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fgpyo/sam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1467,10 +1467,10 @@ def many_pysam_from_rec(cls, rec: AlignedSegment) -> Iterator[AlignedSegment]:
for hit in cls.many_from_rec(rec):
# TODO: When the original record has hard clips we must set the bases and quals to "*".
# It would be smarter to pad/clip the sequence to be compatible with new cigar...
if "H" in rec.cigarstring:
if "H" in rec.cigarstring or rec.query_sequence == NO_QUERY_BASES:
query_sequence = NO_QUERY_BASES
query_qualities = None
elif rec.query_sequence != NO_QUERY_BASES and rec.is_forward and not hit.is_forward:
elif rec.is_forward and not hit.is_forward:
query_sequence = reverse_complement(rec.query_sequence)
query_qualities = rec.query_qualities[::-1]
else:
Expand Down

0 comments on commit da497e7

Please sign in to comment.