{AH} return None in get_forward_sequence if sequence not defined, fixes
@@ -1835,7 +1835,11 @@ cdef class AlignedSegment:
Reads mapping to the reverse strand will be reverse
complemented.
+
+ Returns None if the record has no query sequence.
"""
+ if self.query_sequence is None:
+ return None
s = force_str(self.query_sequence)
if self.is_reverse:
s = s.translate(maketrans("ACGTacgtNnXx", "TGCAtgcaNnXx"))[::-1]
