Skip to content

Commit

Permalink
Fix peptides.py to reflect new uniprot api
Browse files Browse the repository at this point in the history
  • Loading branch information
cokelaer committed Jul 1, 2022
1 parent 8236c2a commit 5b3160f
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 5b3160f

Please sign in to comment.