From 2ab2a6a44ea504ad597ce54d1a2189311e18a650 Mon Sep 17 00:00:00 2001 From: Eric Roller Date: Tue, 30 Jul 2024 20:04:18 -0700 Subject: [PATCH] Update documentation for get_seq which uses 1-based closed intervals --- pyfaidx/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyfaidx/__init__.py b/pyfaidx/__init__.py index b71e637..c77e01f 100644 --- a/pyfaidx/__init__.py +++ b/pyfaidx/__init__.py @@ -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. @@ -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: