Skip to content

Commit

Permalink
documentation for query_uniprot_org methods
Browse files Browse the repository at this point in the history
  • Loading branch information
lzy7071 committed Mar 26, 2020
1 parent 36f61fd commit e25156c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions datanator_query_python/query/query_uniprot_org.py
Expand Up @@ -29,6 +29,9 @@ def __init__(self, query, api='https://www.uniprot.org/uniprot/?', include='yes'

def get_kegg_ortholog(self):
"""Get kegg ortholog information using query message.
Return:
(:obj:`str`): kegg ortholog number
"""
rx = re.compile(".*dbget-bin.*")
result = self.soup.find_all(href=rx)
Expand All @@ -39,6 +42,9 @@ def get_kegg_ortholog(self):

def get_uniprot_id(self):
"""Get uniprot id.
Return:
(:obj:`str`): uniprot id
"""
result = self.soup.find_all(class_='basket-item namespace-uniprot')
if result != []:
Expand All @@ -48,6 +54,9 @@ def get_uniprot_id(self):

def get_protein_name(self):
"""Get protein name.
Return:
(:obj:`list` of :obj:`str`): list of protein names.
"""
result = []
tmp = self.soup.find_all(class_='protein_names')
Expand Down

0 comments on commit e25156c

Please sign in to comment.