diff --git a/sugar/core/seq.py b/sugar/core/seq.py index dabcae9..ee6cd57 100644 --- a/sugar/core/seq.py +++ b/sugar/core/seq.py @@ -604,9 +604,9 @@ def matchall(self, *args, **kw): kw['matchall'] = True return self.match(*args, **kw) - def orfs(self, *args, **kw): + def find_orfs(self, *args, **kw): """ - Find ORFS in the sequence, see `.find_orfs()` + Find ORFS in the sequence, see `~.cane.find_orfs()` """ from sugar.core.cane import find_orfs return find_orfs(self, *args, **kw) @@ -890,12 +890,12 @@ def matchall(self, *args, **kw): kw['matchall'] = True return self.match(*args, **kw) - def orfs(self, *args, **kw): + def find_orfs(self, *args, **kw): """ - Find ORFS in sequences, see `.find_orfs()` + Find ORFS in sequences, see `~.cane.find_orfs()` """ return reduce(lambda orfs1, orfs2: orfs1 + orfs2, - [seq.orfs(*args, **kw) for seq in self]) + [seq.find_orfs(*args, **kw) for seq in self]) def tofmtstr(self, fmt, **kw): out = io.StringIO() diff --git a/sugar/tests/test_core_seq.py b/sugar/tests/test_core_seq.py index b560204..24d092d 100644 --- a/sugar/tests/test_core_seq.py +++ b/sugar/tests/test_core_seq.py @@ -195,14 +195,14 @@ def test_match(): def test_orf(): seqs=read() - orfs = seqs[0].orfs() + orfs = seqs[0].find_orfs() assert len(orfs) > 0 longest_orf = orfs.sort()[-1] assert seqs[0][longest_orf] == seqs[0]['cds'] - orfs2 = seqs[0].orfs(rf='both') + orfs2 = seqs[0].find_orfs(rf='both') assert len(orfs2) > len(orfs) - orfs = seqs.orfs() + orfs = seqs.find_orfs() for id_ in seqs.ids: assert seqs.d[id_][orfs.d[id_].sort()[-1]] == seqs.d[id_]['cds']