Skip to content

Commit

Permalink
Merge pull request #222 from eroller/patch-3
Browse files Browse the repository at this point in the history
Update documentation for get_seq which uses 1-based closed intervals
  • Loading branch information
mdshw5 authored Aug 5, 2024
2 parents 1075c8e + 2ab2a6a commit c8652f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyfaidx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1134,9 +1134,9 @@ def __len__(self):
return sum(len(record) for record in self)

def get_seq(self, name, start, end, rc=False):
"""Return a sequence by record name and interval [start, end).
"""Return a sequence by record name and interval [start, end].
Coordinates are 1-based, end-exclusive.
Coordinates are 1-based, closed interval.
If rc is set, reverse complement will be returned.
"""
# Get sequence from real genome object and save result.
Expand Down Expand Up @@ -1245,9 +1245,9 @@ def __repr__(self):
str(self.gt_type))

def get_seq(self, name, start, end):
"""Return a sequence by record name and interval [start, end).
"""Return a sequence by record name and interval [start, end].
Replace positions with polymorphism with variant.
Coordinates are 0-based, end-exclusive.
Coordinates are 1-based, closed interval.
"""
seq = self.faidx.fetch(name, start, end)
if self.faidx.as_raw:
Expand Down

0 comments on commit c8652f0

Please sign in to comment.