Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
paulzierep committed Nov 2, 2023
1 parent a88e49c commit 9036fd3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions bin/extract_galaxy_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,16 +385,16 @@ def get_tool_count_per_server(tool_ids: str) -> pd.Series:
if isinstance(tool_ids, str):
fallback_series = pd.Series({key: None for key in GALAXY_SERVER_URLS})
return fallback_series

tool_id_list = [x.strip(" ") for x in tool_ids.split(",")]
data = check_tools_on_servers(tool_id_list)
result_df: pd.DataFrame = pd.DataFrame()
result_df["true_count"] = data.sum(axis=1).astype(str)
result_df["false_count"] = len(data.columns)
result_df["counts"] = result_df.apply(lambda x: "({}/{})".format(x["true_count"], x["false_count"]), axis=1)

count_row = result_df["counts"].T
return count_row
else:
tool_id_list = [x.strip(" ") for x in tool_ids.split(",")]
data = check_tools_on_servers(tool_id_list)
result_df: pd.DataFrame = pd.DataFrame()
result_df["true_count"] = data.sum(axis=1).astype(str)
result_df["false_count"] = len(data.columns)
result_df["counts"] = result_df.apply(lambda x: "({}/{})".format(x["true_count"], x["false_count"]), axis=1)

count_row = result_df["counts"].T
return count_row


def add_instances_to_table(
Expand Down

0 comments on commit 9036fd3

Please sign in to comment.