Skip to content

Commit

Permalink
BLK
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuoqing Fang authored and Zhuoqing Fang committed Dec 4, 2024
1 parent 3b6f9c3 commit 5388edc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions gseapy/biomart.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def _set_host(self, host: str):
# "\n<MartRegistry>\n"
if request.ok and request.text.startswith("\n<MartRegistry>\n"):
self.host = hosts[i]
self._marts =self._get_marts(request.text)
self._marts = self._get_marts(request.text)
break
self._logger.warning(
"host {} is not reachable, try {} ".format(
Expand Down Expand Up @@ -144,8 +144,8 @@ def get_xml(self):
xml += line
xml += self.footer
return xml
def _get_mart(self, text:str):

def _get_mart(self, text: str):
"""
Parse the xml text and return a dataframe of supported marts.
Expand All @@ -166,8 +166,7 @@ def _get_mart(self, text:str):
marts = marts.loc[:, ["database", "displayName", "name"]]
marts.columns = ["Version", "DisplayName", "Mart"]
# get supported marts
return marts.loc[:, ["Mart", "Version"]]

return marts.loc[:, ["Mart", "Version"]]

def get_marts(self):
"""Get available marts and their names."""
Expand Down

0 comments on commit 5388edc

Please sign in to comment.