Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
deeenes committed Sep 19, 2023
1 parent a92a392 commit 98de551
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions omnipath/_core/utils/_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@

def static_tables() -> pd.DataFrame:
"""
A list of static tables available from OmniPath
List the static tables available from OmniPath
Returns
-------
A data frame with metadata about the static tables.
"""

refile = re.compile(
r'<a href="[^"]+">([^<]+)</a>'
r"\s+(\d{2}-\w+-\d{4}) (\d{2}:\d{2})"
Expand Down Expand Up @@ -103,15 +102,14 @@ def static_table(
-------
A data frame with the requested resource.
"""

msg = (
f"Accessing `{resource}` as a static table. This is not the "
"recommended way to access OmniPath data; it is only a backup "
"plan for situations when our server or your computer is "
"experiencing issues."
)
logging.warning(msg)
warnings.warn(msg)
warnings.warn(msg) # noqa: B028

organism = str(organism)
query_l = query.lower()
Expand Down Expand Up @@ -166,13 +164,13 @@ def static_table(
}
omnipath_req._wide = wide
omnipath_req._datasets = {InteractionDataset(d) for d in datasets}
logging.debug(f"Static table: converting dtypes.")
logging.debug("Static table: converting dtypes.")
result = omnipath_req._convert_dtypes(result)
logging.debug(f"Static table: post-pocessing.")
logging.debug("Static table: post-pocessing.")
result = omnipath_req._post_process(result)

if resource_l == "dorothea":
logging.debug(f"Static table: filtering for DoRothEA confidence levels.")
logging.debug("Static table: filtering for DoRothEA confidence levels.")
dorothea_levels = set(dorothea_levels)
result = result[result.dorothea_level.isin(dorothea_levels)]

Expand Down

0 comments on commit 98de551

Please sign in to comment.