We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e64409f commit f172954Copy full SHA for f172954
fgpyo/sam/__init__.py
@@ -578,7 +578,16 @@ def parse_sa_tag(tag: str) -> List["SupplementaryAlignment"]:
578
579
@classmethod
580
def from_read(cls, read: pysam.AlignedSegment) -> List["SupplementaryAlignment"]:
581
- """Returns a list of SupplementaryAlignments for a given pysam.AlignedSegment."""
+ """
582
+ Construct a list of SupplementaryAlignments from the SA tag in a pysam.AlignedSegment.
583
+
584
+ Args:
585
+ read: An alignment. The presence of the "SA" tag is not required.
586
587
+ Returns:
588
+ A list of all SupplementaryAlignments present in the SA tag.
589
+ If the SA tag is not present, or it is empty, an empty list will be returned.
590
591
if read.has_tag("SA"):
592
sa_tag: str = cast(str, read.get_tag("SA"))
593
return cls.parse_sa_tag(sa_tag)
0 commit comments