Skip to content

Commit

Permalink
Merge pull request #221 from cokelaer/june_2022_cleanup
Browse files Browse the repository at this point in the history
Fix peptides.py to reflect new uniprot api
  • Loading branch information
cokelaer authored Jul 1, 2022
2 parents 84d2eb2 + 5b3160f commit 12dca31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/bioservices/apps/peptides.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class Peptides(object):
::
>>> p = Peptides()
>>> p.get_fasta_sequence("Q8IYB3")
>>> p.get_peptide_position("Q8IYB3", "VPKPEPIPEPKEPSPE")
189
Expand All @@ -25,9 +24,11 @@ def __init__(self, verbose=False):
self.sequences = {}

def get_fasta_sequence(self, uniprot_name):
seq = self.u.get_fasta_sequence(uniprot_name)
seq = self.u.get_fasta(uniprot_name)
seq = "".join(seq.split("\n")[1:])
return seq


def get_phosphosite_position(self, uniprot_name, peptide):
if uniprot_name not in self.sequences.keys():
seq = self.get_fasta_sequence(uniprot_name)
Expand Down
1 change: 0 additions & 1 deletion test/test_apps_peptides.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ def test_peptides():
p = Peptides()
pos = p.get_phosphosite_position("Q8IYB3", "VPKPEPIPEPKEPSPE")
assert pos == [740, 901]
p.get_fasta_sequence("Q8IYB3")

0 comments on commit 12dca31

Please sign in to comment.