diff --git a/pypath/formats/sdf.py b/pypath/formats/sdf.py index 40fd19b15..67125d703 100644 --- a/pypath/formats/sdf.py +++ b/pypath/formats/sdf.py @@ -660,7 +660,7 @@ def index_info(self): Prints number of records indexed and name of the source file. """ - msg = f'Indexed {len(self.names['id'])} records from `{self.fname}`.' + msg = f"Indexed {len(self.names['id'])} records from `{self.fname}`." if not self.silent: diff --git a/pypath/inputs/ramp/__init__.py b/pypath/inputs/ramp/__init__.py index 711969b28..fc383bc57 100644 --- a/pypath/inputs/ramp/__init__.py +++ b/pypath/inputs/ramp/__init__.py @@ -24,3 +24,5 @@ """ from ._sqlite import * +from ._rest import * +from ._mapping import * diff --git a/pypath/inputs/ramp/_mapping.py b/pypath/inputs/ramp/_mapping.py index f57326718..58ee9910f 100644 --- a/pypath/inputs/ramp/_mapping.py +++ b/pypath/inputs/ramp/_mapping.py @@ -19,6 +19,12 @@ from __future__ import annotations +import pandas as pd + +from ._sqlite import ramp_raw + +__all__ = ['ramp_mapping'] + def ramp_mapping( id_type_a: str, diff --git a/pypath/inputs/ramp/_rest.py b/pypath/inputs/ramp/_rest.py index da0764bbc..ddaaf2de7 100644 --- a/pypath/inputs/ramp/_rest.py +++ b/pypath/inputs/ramp/_rest.py @@ -24,6 +24,9 @@ import pypath.resources.urls as urls import pypath.share.curl as curl +__all__ = ['ramp_id_types'] + + def ramp_id_types( entity_type: Literal['gene', 'compound'] | None = None, ) -> set[str]: diff --git a/pypath/inputs/ramp/_sqlite.py b/pypath/inputs/ramp/_sqlite.py index 30f1dfd3d..d99568bad 100644 --- a/pypath/inputs/ramp/_sqlite.py +++ b/pypath/inputs/ramp/_sqlite.py @@ -19,7 +19,8 @@ from __future__ import annotations -from collections.abc import Generator, Any +from collections.abc import Generator +from typing import Any import os import sqlite3 diff --git a/pypath/inputs/uniprot.py b/pypath/inputs/uniprot.py index e9e27b8f8..07eebb0f9 100644 --- a/pypath/inputs/uniprot.py +++ b/pypath/inputs/uniprot.py @@ -651,6 +651,7 @@ def __iter__(self): silent = False, large = True, compr = 'gz', + slow = True, ) result = c.result if c.result or self.fail_on_empty else [0].__iter__() _ = next(result) diff --git a/pypath/utils/mapping.py b/pypath/utils/mapping.py index be24b1eba..6c5562cfd 100644 --- a/pypath/utils/mapping.py +++ b/pypath/utils/mapping.py @@ -126,7 +126,7 @@ dict( **{ it: it - for it in ramp_input.ramp_id_types_2('compound') + for it in ramp_input.ramp_id_types('compound') }, **input_formats.RAMP_MAPPING, ),