Skip to content

Commit

Permalink
finish addressing #228
Browse files Browse the repository at this point in the history
  • Loading branch information
daler committed Apr 9, 2024
1 parent cd01ff5 commit 175f421
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gffutils/biopython_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def from_seqfeature(s, **kwargs):

# BioPython parses 1-based GenBank positions into 0-based for use within
# Python. We need to convert back to 1-based GFF format here.
start = s.location.start.position + 1
stop = s.location.end.position
start = s.location.start + 1
stop = s.location.end
featuretype = s.type
id = s.id
attributes = dict(s.qualifiers)
Expand Down
4 changes: 2 additions & 2 deletions gffutils/test/test_biopython_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def test_roundtrip():
feature.keep_order = True
dialect = feature.dialect
s = bp.to_seqfeature(feature)
assert s.location.start.position == feature.start - 1
assert s.location.end.position == feature.stop
assert s.location.start == feature.start - 1
assert s.location.end == feature.stop
assert s.id == feature.id
f = bp.from_seqfeature(s, dialect=dialect, keep_order=True)
assert feature == f

0 comments on commit 175f421

Please sign in to comment.