Skip to content

Commit

Permalink
Don't set coordinates for spliced sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
mdshw5 committed Oct 26, 2017
1 parent e606c89 commit 7b4d8d7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pyfaidx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,8 +891,8 @@ def get_seq(self, name, start, end, rc=False):
return seq

def get_spliced_seq(self, name, intervals, rc=False):
"""Return a sequence by record name and list of intervals
"""Return a sequence by record name and list of intervals
Interval list is an iterable of [start, end].
Coordinates are 1-based, end-exclusive.
If rc is set, reverse complement will be returned.
Expand All @@ -908,8 +908,10 @@ def get_spliced_seq(self, name, intervals, rc=False):
else:
seq = "".join([chunk.seq for chunk in chunks])

return Sequence(name=name, seq=seq, start=start, end=end)

# Sequence coordinate validation wont work since
# len(Sequence.seq) != end - start
return Sequence(name=name, seq=seq, start=None, end=None)

def close(self):
self.__exit__()

Expand Down

0 comments on commit 7b4d8d7

Please sign in to comment.