Skip to content

Commit

Permalink
feat: add SAM helpers for isize, set_mate_info, properly_paired
Browse files Browse the repository at this point in the history
  • Loading branch information
clintval committed Dec 24, 2024
1 parent 7e111ad commit 891b78f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fgpyo/sam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@
from pysam import AlignedSegment
from pysam import AlignmentFile as SamFile
from pysam import AlignmentHeader as SamHeader
from typing_extensions import Self
from typing_extensions import deprecated

import fgpyo.io
Expand Down Expand Up @@ -622,7 +623,7 @@ class PairOrientation(enum.Enum):
"""A pair orientation for tandem (forward-forward or reverse-reverse) pairs."""

@classmethod
def build(cls, r1: AlignedSegment, r2: AlignedSegment) -> Self | None:
def build(cls, r1: AlignedSegment, r2: AlignedSegment) -> Optional[Self]:
"""Returns the orientation of the read pair if both reads are mapped."""
if r1.is_unmapped or r2.is_unmapped:
return None
Expand Down

0 comments on commit 891b78f

Please sign in to comment.