Skip to content

Commit f172954

Browse files
committed
doc: update docstring
1 parent e64409f commit f172954

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

fgpyo/sam/__init__.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,16 @@ def parse_sa_tag(tag: str) -> List["SupplementaryAlignment"]:
578578

579579
@classmethod
580580
def from_read(cls, read: pysam.AlignedSegment) -> List["SupplementaryAlignment"]:
581-
"""Returns a list of SupplementaryAlignments for a given pysam.AlignedSegment."""
581+
"""
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+
"""
582591
if read.has_tag("SA"):
583592
sa_tag: str = cast(str, read.get_tag("SA"))
584593
return cls.parse_sa_tag(sa_tag)

0 commit comments

Comments
 (0)