Skip to content

Commit

Permalink
all tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
manulera committed Feb 5, 2024
1 parent 8932fd2 commit c9b003d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/pydna/dseqrecord.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ def __getitem__(self, sl):
# sl_start == sl_stop and the second condition is not met
answer.features = [f for f in answer.features if (
_location_boundaries(f.location)[1] <= answer.seq.length and
_location_boundaries(f.location)[0] <= _location_boundaries(f.location)[1])]
_location_boundaries(f.location)[0] < _location_boundaries(f.location)[1])]
elif self.circular and sl_start == sl_stop:
cut = ((sl_start, 0), None)
return self.apply_cut(cut, cut)
Expand Down
9 changes: 5 additions & 4 deletions tests/test_module_dseqrecord.py
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,7 @@ def test_figure():
)
assert b25.extract_feature(0).seq == feat

@pytest.mark.xfail(reason="issue #78")

def test_jan_glx():
# Thanks to https://github.com/jan-glx
from Bio.Restriction import NdeI, BamHI
Expand All @@ -1652,10 +1652,11 @@ def test_jan_glx():
puc19_ = (bb + insert).looped().synced(puc19)
assert puc19_.seguid() == "cdseguid-zhw8Yrxfo3FO5DDccx4PamBVPCQ"

# print(puc19_.extract_feature(2), "\n")
# print(puc19.extract_feature(6))

# Some features are lost because they spanned the cutting sites in puc19.
assert puc19_.extract_feature(0).seq == puc19.extract_feature(2).seq
assert puc19_.extract_feature(1).seq == puc19.extract_feature(4).seq
assert puc19_.extract_feature(2).seq == puc19.extract_feature(6).seq
assert puc19_.extract_feature(3).seq == puc19.extract_feature(7).seq


def test_synced():
Expand Down

0 comments on commit c9b003d

Please sign in to comment.