Skip to content

Commit

Permalink
Update fgpyo/sam/__init__.py
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Stone <[email protected]>
  • Loading branch information
yfarjoun and msto authored Sep 19, 2024
1 parent ed247db commit e610f1e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions fgpyo/sam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,15 +549,16 @@ def length_on_target(self) -> int:

def get_alignment_offsets(self, reverse: bool = False) -> Tuple[int, int]:
"""
Get the starting and ending offset for the alignment based on the CIGAR string.
Get the starting and ending offsets for the alignment based on the CIGAR string.
Args:
reverse: Whether to count from the end of the read sequence.
Default is False, which counts from the beginning of the read sequence.
Args:
reverse: If True, count from the end of the read sequence.
Otherwise (default behavior), count from the beginning of the read sequence.
Returns: Tuple[int, int] The start and end of the _aligned part_ of the read.
0-based, open-ended offsets (to the read sequence.)
If 'reverse' is True, the offsets count from the end of the read sequence.
Returns:
A tuple (start, end), defining the start and end offsets of the _aligned part_ of the read.
These offsets are 0-based and open-ended, with respect to the beginning of the read sequence.
(If 'reverse' is True, the offsets are with respect to the end of the read sequence.)
# TODO: FIGURE OUT WHY the following three lines causes mkdocs to fail
# If the Cigar contains no alignment operators that consume sequence bases, or
Expand Down

0 comments on commit e610f1e

Please sign in to comment.