Skip to content

Commit

Permalink
Merge pull request #81 from Nozdi/52-immuno-task
Browse files Browse the repository at this point in the history
[#52] Added function to check immuno sequnece in input sequnecy
  • Loading branch information
Michał Rostecki committed Sep 24, 2014
2 parents 6bea781 + e905ae5 commit a1f12bc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/shmir/data/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ class Immuno(Base):
receptor = Column(Unicode(15))
link = Column(Unicode(100), nullable=False)

@classmethod
def check_is_in_sequence(cls, input_sequence):
immunos = db_session.query(cls).all()
results = []
for immuno in immunos:
if immuno.sequence in input_sequence:
results.append({'id': immuno.id, 'sequence': immuno.sequence})
return results


class InputData(Base):
"""
Expand Down

0 comments on commit a1f12bc

Please sign in to comment.