Skip to content

Commit

Permalink
Merge branch 'master' of github.com:saezlab/pypath
Browse files Browse the repository at this point in the history
  • Loading branch information
for-hyde committed Nov 22, 2024
2 parents 455d0c7 + d4e1002 commit cb85bea
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pypath/formats/sdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 2 additions & 0 deletions pypath/inputs/ramp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@
"""

from ._sqlite import *
from ._rest import *
from ._mapping import *
6 changes: 6 additions & 0 deletions pypath/inputs/ramp/_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions pypath/inputs/ramp/_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
3 changes: 2 additions & 1 deletion pypath/inputs/ramp/_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions pypath/inputs/uniprot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pypath/utils/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
Expand Down

0 comments on commit cb85bea

Please sign in to comment.