Passed
Push — main ( cdf0f7...3de8e8 )
by Douglas
01:40
created

mandos.entries.entries.Entry._get_searcher()   A

Complexity

Conditions 1

Size

Total Lines 8
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nop 4
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
"""
0 ignored issues
show
coding-style introduced by
Too many lines in module (1054/1000)
Loading history...
2
Run searches and write files.
3
"""
4
5
from __future__ import annotations
6
7
import abc
8
from pathlib import Path
9
from typing import TypeVar, Generic, Union, Mapping, Set, Sequence, Type, Optional
10
11
import typer
0 ignored issues
show
introduced by
Unable to import 'typer'
Loading history...
12
13
from mandos.entries import EntryMeta
14
from mandos.entries.args import EntryArgs
15
from mandos.model import ReflectionUtils, InjectionError
16
from mandos.model.chembl_api import ChemblApi
17
from mandos.model.chembl_support import DataValidityComment
18
from mandos.model.chembl_support.chembl_targets import TargetType
19
from mandos.model.pubchem_support.pubchem_models import (
20
    ClinicalTrialsGovUtils,
21
    CoOccurrenceType,
22
    DrugbankTargetType,
23
)
24
from mandos.model.searches import Search
25
from mandos.model.settings import MANDOS_SETTINGS
26
from mandos.model.taxonomy import Taxonomy
27
from mandos.model.taxonomy_caches import TaxonomyFactories
28
from mandos.entries.api_singletons import Apis
29
from mandos.search.pubchem.acute_effects_search import AcuteEffectSearch, Ld50Search
30
from mandos.search.pubchem.bioactivity_search import BioactivitySearch
31
from mandos.search.pubchem.computed_property_search import (
32
    ComputedPropertySearch,
33
)
34
from mandos.search.pubchem.dgidb_search import DgiSearch
35
from mandos.search.pubchem.ctd_gene_search import CtdGeneSearch
36
from mandos.entries.searcher import Searcher
37
from mandos.search.pubchem.drugbank_ddi_search import DrugbankDdiSearch
38
from mandos.search.pubchem.drugbank_interaction_search import (
39
    DrugbankTargetSearch,
40
    DrugbankGeneralFunctionSearch,
41
)
42
43
from mandos import logger, MandosMetadata, MandosLogging
0 ignored issues
show
Unused Code introduced by
Unused MandosMetadata imported from mandos
Loading history...
Unused Code introduced by
Unused MandosLogging imported from mandos
Loading history...
44
from mandos.search.chembl.binding_search import BindingSearch
45
from mandos.search.chembl.atc_search import AtcSearch
46
from mandos.search.chembl.go_search import GoType, GoSearch
47
from mandos.search.chembl.indication_search import IndicationSearch
48
from mandos.search.chembl.mechanism_search import MechanismSearch
49
from mandos.search.pubchem.cooccurrence_search import (
50
    GeneCoOccurrenceSearch,
51
    ChemicalCoOccurrenceSearch,
52
    CoOccurrenceSearch,
53
    DiseaseCoOccurrenceSearch,
54
)
55
from mandos.search.pubchem.disease_search import DiseaseSearch
56
57
S = TypeVar("S", bound=Search, covariant=True)
0 ignored issues
show
Coding Style Naming introduced by
Class name "S" doesn't conform to PascalCase naming style ('[^\\W\\da-z][^\\W_]+$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
58
U = TypeVar("U", covariant=True, bound=CoOccurrenceSearch)
0 ignored issues
show
Coding Style Naming introduced by
Class name "U" doesn't conform to PascalCase naming style ('[^\\W\\da-z][^\\W_]+$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
59
60
61
class Utils:
0 ignored issues
show
Documentation introduced by
Empty class docstring
Loading history...
62
    """"""
63
64
    @staticmethod
65
    def split(st: str) -> Set[str]:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
Coding Style Naming introduced by
Argument name "st" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
66
        return {s.strip() for s in st.split(",")}
67
68
    @staticmethod
69
    def get_taxa(taxa: str) -> Sequence[Taxonomy]:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
70
        return [
71
            TaxonomyFactories.from_uniprot(MANDOS_SETTINGS.taxonomy_cache_path).load(int(taxon))
72
            for taxon in taxa.split(",")
73
        ]
74
75
    @staticmethod
76
    def get_trial_statuses(st: str) -> Set[str]:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
Coding Style Naming introduced by
Argument name "st" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
77
        return ClinicalTrialsGovUtils.resolve_statuses(st)
78
79
    @staticmethod
80
    def get_target_types(st: str) -> Set[str]:
0 ignored issues
show
Coding Style Naming introduced by
Argument name "st" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
introduced by
Missing function or method docstring
Loading history...
81
        return {s.name for s in TargetType.resolve(st)}
82
83
    @staticmethod
84
    def get_flags(st: str) -> Set[str]:
0 ignored issues
show
Coding Style Naming introduced by
Argument name "st" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
introduced by
Missing function or method docstring
Loading history...
85
        return {s.name for s in DataValidityComment.resolve(st)}
86
87
88
class Entry(Generic[S], metaclass=abc.ABCMeta):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
89
    @classmethod
90
    def cmd(cls) -> str:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
91
        key = cls._get_default_key()
92
        if isinstance(key, typer.models.OptionInfo):
93
            key = key.default
94
        if key is None or not isinstance(key, str):
95
            raise AssertionError(f"Key for {cls.__name__} is {key}")
96
        return key
97
98
    @classmethod
99
    def run(cls, path: Path, **params) -> None:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
100
        raise NotImplementedError()
101
102
    @classmethod
103
    def get_search_type(cls) -> Type[S]:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
104
        # noinspection PyTypeChecker
105
        return ReflectionUtils.get_generic_arg(cls, Search)
106
107
    # noinspection PyUnusedLocal
108
    @classmethod
109
    def test(cls, path: Path, **params) -> None:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
Unused Code introduced by
The argument path seems to be unused.
Loading history...
110
        params = dict(params)
111
        params["test"] = True
112
        cls.run(**params)
113
114
    @classmethod
115
    def _run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
116
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
117
        built: S,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
118
        path: Path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
119
        to: Optional[Path],
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
120
        check: bool,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
121
        log: Optional[Path],
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
122
        quiet: bool,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
123
        verbose: bool,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
124
        no_setup: bool,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
125
    ):
126
        if not no_setup:
127
            level = EntryMeta.set_logging(verbose, quiet, log)
128
            logger.notice(f"Ready. Set log level to {level}")
129
        searcher = cls._get_searcher(built, path, to)
130
        logger.notice(f"Searching {built.key} [{built.search_class}] on {path}")
131
        out = searcher.output_paths[built.key]
132
        if not check:
133
            searcher.search()
134
        logger.notice(f"Done! Wrote to {out}")
135
        return searcher
136
137
    @classmethod
138
    def _get_searcher(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
139
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
140
        built: S,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
141
        path: Path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
142
        to: Optional[Path],
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
143
    ):
144
        return Searcher([built], [to], path)
145
146
    @classmethod
147
    def default_param_values(cls) -> Mapping[str, Union[str, float, int]]:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
148
        return {
149
            param: value
150
            for param, value in ReflectionUtils.default_arg_values(cls.run).items()
151
            if param not in {"key", "path"}
152
        }
153
154
    @classmethod
155
    def _get_default_key(cls) -> str:
156
        vals = ReflectionUtils.default_arg_values(cls.run)
157
        try:
158
            return vals["key"]
159
        except KeyError:
160
            logger.error(f"key not in {vals.keys()} for {cls.__name__}")
161
            raise
162
163
164
class EntryChemblBinding(Entry[BindingSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
165
    @classmethod
166
    def run(
0 ignored issues
show
Comprehensibility introduced by
This function exceeds the maximum number of variables (17/15).
Loading history...
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (16/5)
Loading history...
167
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
168
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
169
        key: str = EntryArgs.key("chembl:binding"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
170
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
171
        taxa: Optional[str] = EntryArgs.taxa,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
172
        traversal=EntryArgs.traversal_strategy,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
173
        target_types=EntryArgs.target_types,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
174
        confidence=EntryArgs.min_confidence,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
175
        relations=EntryArgs.relations,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
176
        min_pchembl=EntryArgs.min_pchembl,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
177
        banned_flags=EntryArgs.banned_flags,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
178
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
179
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
180
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
181
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
182
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
183
    ) -> Searcher:
184
        """
185
        Binding data from ChEMBL.
186
        These are 'activity' annotations of the type 'B' that have a pCHEMBL value.
187
        There is extended documentation on this search; see:
188
189
        https://mandos-chem.readthedocs.io/en/latest/binding.html
190
191
        OBJECT: ChEMBL preferred target name
192
193
        PREDICATE: "binds to"
194
195
        OTHER COLUMNS:
196
197
        - taxon_id: From UniProt
198
199
        - taxon_name: From Uniprot (scientific name)
200
201
        - pchembl: Negative base-10 log of activity value (see docs on ChEMBL)
202
203
        - standard_relation: One of '<', '<=', '=', '>=', '>', '~'. Consider using <, <=, and = to indicate hits.
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (113/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
204
205
        - std_type: e.g. EC50, Kd
206
        """
207
        built = BindingSearch(
208
            key=key,
209
            api=Apis.Chembl,
210
            taxa=Utils.get_taxa(taxa),
211
            traversal_strategy=traversal,
212
            allowed_target_types=Utils.get_target_types(target_types),
213
            min_confidence_score=confidence,
214
            allowed_relations=Utils.split(relations),
215
            min_pchembl=min_pchembl,
216
            banned_flags=Utils.get_flags(banned_flags),
217
        )
218
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
219
220
221
class EntryChemblMechanism(Entry[MechanismSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
222
    @classmethod
223
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (13/5)
Loading history...
224
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
225
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
226
        key: str = EntryArgs.key("chembl:mechanism"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
227
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
228
        taxa: Optional[str] = EntryArgs.taxa,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
229
        traversal: str = EntryArgs.traversal_strategy,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
230
        target_types: str = EntryArgs.target_types,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
231
        min_confidence: Optional[int] = EntryArgs.min_confidence,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
232
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
233
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
234
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
235
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
236
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
237
    ) -> Searcher:
238
        """
239
        Mechanism of action (MoA) data from ChEMBL.
240
241
        OBJECT: ChEMBL preferred target name
242
243
        PREDICATE: Target action; e.g. "agonist of" or "positive allosteric modulator of"
244
245
        OTHER COLUMNS:
246
247
        - direct_interaction: true or false
248
249
        - description: From ChEMBL
250
251
        - exact_target_id: the specifically annotated target, before traversal
252
        """
253
        built = MechanismSearch(
254
            key=key,
255
            api=Apis.Chembl,
256
            taxa=Utils.get_taxa(taxa),
257
            traversal_strategy=traversal,
258
            allowed_target_types=Utils.get_target_types(target_types),
259
            min_confidence_score=min_confidence,
260
        )
261
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
262
263
264
class EntryChemblTrials(Entry[IndicationSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
265
    @classmethod
266
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (10/5)
Loading history...
267
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
268
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
269
        key: str = EntryArgs.key("chembl:trial"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
270
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
271
        min_phase: Optional[int] = EntryArgs.chembl_trial,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
272
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
273
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
274
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
275
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
276
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
277
    ) -> Searcher:
278
        """
279
        Diseases from clinical trials listed in ChEMBL.
280
281
        OBJECT: MeSH code
282
283
        PREDICATE: "phase <level> trial"
284
        """
285
        built = IndicationSearch(key=key, api=Apis.Chembl, min_phase=min_phase)
286
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
287
288
289
class EntryChemblAtc(Entry[AtcSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
290
    @classmethod
291
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (10/5)
Loading history...
292
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
293
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
294
        key: str = EntryArgs.key("chembl:atc"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
295
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
296
        levels: str = EntryArgs.atc_level,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
297
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
298
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
299
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
300
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
301
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
302
    ) -> Searcher:
303
        """
304
        ATC codes from ChEMBL.
305
306
        OBJECT: ATC Code
307
308
        PREDICATE: "ATC L<leveL> code"
309
        """
310
        built = AtcSearch(
311
            key=key, api=Apis.Chembl, levels={int(x.strip()) for x in levels.split(",")}
312
        )
313
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
314
315
316
class _EntryChemblGo(Entry[GoSearch], metaclass=abc.ABCMeta):
317
    @classmethod
318
    def go_type(cls) -> GoType:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
319
        raise NotImplementedError()
320
321
    @classmethod
322
    def cmd(cls) -> str:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
323
        me = str(cls.go_type().name)
0 ignored issues
show
Coding Style Naming introduced by
Variable name "me" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
324
        return f"chembl:go.{me.lower()}"
325
326
    @classmethod
327
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Comprehensibility introduced by
This function exceeds the maximum number of variables (20/15).
Loading history...
best-practice introduced by
Too many arguments (17/5)
Loading history...
328
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
329
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
330
        key: str = EntryArgs.key("<see above>"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
331
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
332
        taxa: Optional[str] = EntryArgs.taxa,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
333
        traversal_strategy: str = EntryArgs.traversal_strategy,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
334
        target_types: str = EntryArgs.target_types,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
335
        confidence: Optional[int] = EntryArgs.min_confidence,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
336
        relations: str = EntryArgs.relations,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
337
        min_pchembl: float = EntryArgs.min_pchembl,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
338
        banned_flags: Optional[str] = EntryArgs.banned_flags,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
339
        binding_search: Optional[str] = EntryArgs.binding_search_name,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
340
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
341
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
342
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
343
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
344
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
345
    ) -> Searcher:
346
        """
347
        GO terms associated with ChEMBL binding targets.
348
349
        OBJECT: GO Term name
350
351
        PREDICATE: "associated with ""Function"|"Process"|"Component"" term"
352
353
        OTHER COLUMNS:
354
            See the docs for ``mandos chembl:binding``
355
356
        Note:
357
358
            By default, the key is the "chembl:go.function", "chembl:go.process", or "chembl:go.component".
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (107/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
359
360
        """
361
        if key is None or key == "<see above>":
362
            key = cls.cmd()
363
        api = ChemblApi.wrap(Apis.Chembl)
364
        if binding_search is None:
365
            binding_clazz = BindingSearch
366
        else:
367
            binding_clazz = ReflectionUtils.injection(binding_search, BindingSearch)
368
            logger.info(f"NOTICE: Passing parameters to {binding_clazz.__qualname__}")
369
        try:
370
            binding_search = binding_clazz(
371
                key=key,
372
                api=Apis.Chembl,
373
                taxa=Utils.get_taxa(taxa),
374
                traversal_strategy=traversal_strategy,
375
                allowed_target_types=Utils.get_target_types(target_types),
376
                min_confidence_score=confidence,
377
                allowed_relations=Utils.split(relations),
378
                min_pchembl=min_pchembl,
379
                banned_flags=Utils.get_flags(banned_flags),
380
            )
381
        except (TypeError, ValueError):
382
            raise InjectionError(f"Failed to build {binding_clazz.__qualname__}")
383
        built = GoSearch(key, api, cls.go_type(), binding_search)
384
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
385
386
387
class EntryGoFunction(_EntryChemblGo):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
388
    @classmethod
389
    def go_type(cls) -> GoType:
390
        return GoType.function
391
392
393
class EntryGoProcess(_EntryChemblGo):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
394
    @classmethod
395
    def go_type(cls) -> GoType:
396
        return GoType.process
397
398
399
class EntryGoComponent(_EntryChemblGo):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
400
    @classmethod
401
    def go_type(cls) -> GoType:
402
        return GoType.component
403
404
405
class EntryPubchemDisease(Entry[DiseaseSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
406
    @classmethod
407
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
408
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
409
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
410
        key: str = EntryArgs.key("disease.ctd:mesh"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
411
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
412
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
413
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
414
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
415
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
416
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
417
    ) -> Searcher:
418
        """
419
        Diseases in the CTD.
420
421
        Comparative Toxicogenomics Database.
422
423
        OBJECT: MeSH code of disease
424
425
        PREDICATE: "marker/mechanism evidence for" or "disease evidence for"
426
        """
427
        built = DiseaseSearch(key, Apis.Pubchem)
428
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
429
430
431
class _EntryPubchemCoOccurrence(Entry[U], metaclass=abc.ABCMeta):
432
    @classmethod
433
    def cmd(cls) -> str:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
434
        me = str(cls.get_cooccurrence_type().name)
0 ignored issues
show
Coding Style Naming introduced by
Variable name "me" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
435
        return f"lit.pubchem:{me.lower()}"
436
437
    @classmethod
438
    def get_cooccurrence_type(cls) -> CoOccurrenceType:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
439
        s: CoOccurrenceSearch = cls.get_search_type()
0 ignored issues
show
Coding Style Naming introduced by
Variable name "s" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
440
        return s.cooccurrence_type()
441
442
    @classmethod
443
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (11/5)
Loading history...
444
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
445
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
446
        key: str = EntryArgs.key("<see above>"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
447
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
448
        min_score: float = EntryArgs.min_cooccurrence_score,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
449
        min_articles: int = EntryArgs.min_cooccurring_articles,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
450
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
451
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
452
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
453
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
454
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
455
    ) -> Searcher:
456
        """
457
        Co-occurrences from PubMed articles.
458
        There is extended documentation on this search.
459
        Also refer to https://pubchemdocs.ncbi.nlm.nih.gov/knowledge-panels
460
461
        OBJECT: Name of gene/chemical/disease
462
463
        PREDICATE: "co-occurs with <gene/chemical/disease>"
464
465
        OTHER COLUMNS:
466
467
        - score: enrichment score; see PubChem docs
468
469
        - intersect_count: Number of articles co-occurring
470
471
        - query_count: Total number of articles for query compound
472
473
        - neighbor_count: Total number of articles for target (co-occurring) compound
474
        """
475
        if key is None or key == "<see above>":
476
            key = cls.cmd()
477
        clazz = cls.get_search_type()
478
        built = clazz(key, Apis.Pubchem, min_score=min_score, min_articles=min_articles)
479
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
480
481
482
class EntryPubchemGeneCoOccurrence(_EntryPubchemCoOccurrence[GeneCoOccurrenceSearch]):
0 ignored issues
show
Documentation introduced by
Empty class docstring
Loading history...
483
    """"""
484
485
486
class EntryPubchemDiseaseCoOccurrence(_EntryPubchemCoOccurrence[DiseaseCoOccurrenceSearch]):
0 ignored issues
show
Documentation introduced by
Empty class docstring
Loading history...
487
    """"""
488
489
490
class EntryPubchemChemicalCoOccurrence(_EntryPubchemCoOccurrence[ChemicalCoOccurrenceSearch]):
0 ignored issues
show
Documentation introduced by
Empty class docstring
Loading history...
491
    """"""
492
493
494
class EntryPubchemDgi(Entry[DgiSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
495
    @classmethod
496
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
497
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
498
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
499
        key: str = EntryArgs.key("inter.dgidb:gene"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
500
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
501
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
502
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
503
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
504
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
505
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
506
    ) -> Searcher:
507
        """
508
        Drug/gene interactions in the DGIDB.
509
510
        Drug Gene Interaction Database.
511
        Also see ``disease.dgidb:int``.
512
513
        OBJECT: Name of the gene
514
515
        PREDICATE: "interacts with gene"
516
        """
517
        built = DgiSearch(key, Apis.Pubchem)
518
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
519
520
521
class EntryPubchemCgi(Entry[CtdGeneSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
522
    @classmethod
523
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
524
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
525
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
526
        key: str = EntryArgs.key("inter.ctd:gene"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
527
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
528
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
529
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
530
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
531
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
532
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
533
    ) -> Searcher:
534
        """
535
        Compound/gene interactions in the DGIDB.
536
537
        Drug Gene Interaction Database.
538
        Also see ``interact.dgidb:int``.
539
540
        OBJECT: Name of the gene
541
542
        PREDICATE: "compound/gene interaction"
543
544
        """
545
        built = CtdGeneSearch(key, Apis.Pubchem)
546
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
547
548
549
class EntryDrugbankTarget(Entry[DrugbankTargetSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
550 View Code Duplication
    @classmethod
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
551
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
552
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
553
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
554
        key: str = EntryArgs.key("inter.drugbank:target"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
555
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
556
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
557
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
558
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
559
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
560
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
561
    ) -> Searcher:
562
        """
563
        Protein targets from DrugBank.
564
565
        OBJECT: Target name (e.g. "Solute carrier family 22 member 11") from DrugBank
566
567
        PREDICATE: Action (e.g. "binder", "downregulator", or "agonist")
568
        """
569
        built = DrugbankTargetSearch(key, Apis.Pubchem, {DrugbankTargetType.target})
570
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
571
572
573
class EntryGeneralFunction(Entry[DrugbankGeneralFunctionSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
574 View Code Duplication
    @classmethod
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
575
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
576
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
577
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
578
        key: str = EntryArgs.key("inter.drugbank:target-fn"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
579
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
580
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
581
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
582
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
583
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
584
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
585
    ) -> Searcher:
586
        """
587
        General functions from DrugBank targets.
588
589
        OBJECT: Name of the general function (e.g. "Toxic substance binding")
590
591
        PREDICATE: against on target (e.g. "binder", "downregulator", or "agonist").
592
        """
593
        built = DrugbankGeneralFunctionSearch(key, Apis.Pubchem, {DrugbankTargetType.target})
594
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
595
596
597
class EntryDrugbankTransporter(Entry[DrugbankTargetSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
598 View Code Duplication
    @classmethod
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
599
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
600
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
601
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
602
        key: str = EntryArgs.key("inter.drugbank:pk"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
603
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
604
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
605
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
606
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
607
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
608
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
609
    ) -> Searcher:
610
        """
611
        PK-related proteins from DrugBank.
612
613
        OBJECT: Transporter name (e.g. "Solute carrier family 22 member 11") from DrugBank
614
615
        PREDICATE: "transported by", "carried by", or "metabolized by"
616
        """
617
        target_types = {
618
            DrugbankTargetType.transporter,
619
            DrugbankTargetType.carrier,
620
            DrugbankTargetType.enzyme,
621
        }
622
        built = DrugbankTargetSearch(key, Apis.Pubchem, target_types)
623
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
624
625
626
class EntryTransporterGeneralFunction(Entry[DrugbankGeneralFunctionSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
627 View Code Duplication
    @classmethod
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
628
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
629
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
630
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
631
        key: str = EntryArgs.key("inter.drugbank:pk-fn"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
632
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
633
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
634
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
635
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
636
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
637
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
638
    ) -> Searcher:
639
        """
640
        DrugBank PK-related protein functions.
641
642
        OBJECT: Name of the general function (e.g. "Toxic substance binding")
643
644
        PREDICATE: "transported by", "carried by", or "metabolized by"
645
        """
646
        target_types = {
647
            DrugbankTargetType.transporter,
648
            DrugbankTargetType.carrier,
649
            DrugbankTargetType.enzyme,
650
        }
651
        built = DrugbankGeneralFunctionSearch(key, Apis.Pubchem, target_types)
652
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
653
654
655
class EntryDrugbankDdi(Entry[DrugbankDdiSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
656
    @classmethod
657
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
658
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
659
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
660
        key: str = EntryArgs.key("inter.drugbank:ddi"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
661
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
662
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
663
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
664
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
665
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
666
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
667
    ) -> Searcher:
668
        """
669
        Drug/drug interactions listed by DrugBank.
670
671
        The 'description' column includes useful information about the interaction,
672
        such as diseases and whether a risk is increased or decreased.
673
674
        OBJECT: name of the drug (e.g. "ibuprofen")
675
676
        PREDICATE: "ddi"
677
        """
678
        built = DrugbankDdiSearch(key, Apis.Pubchem)
679
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
680
681
682
class EntryPubchemAssay(Entry[BioactivitySearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
683
    @classmethod
684
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (11/5)
Loading history...
685
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
686
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
687
        key: str = EntryArgs.key("assay.pubchem:activity"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
688
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
689
        name_must_match: bool = EntryArgs.name_must_match,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
690
        ban_sources: Optional[str] = None,
0 ignored issues
show
Unused Code introduced by
The argument ban_sources seems to be unused.
Loading history...
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
691
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
692
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
693
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
694
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
695
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
696
    ) -> Searcher:
697
        """
698
        PubChem bioactivity results.
699
700
        Note: The species name, if present, is taken from the target name.
701
        The taxon ID is what was curated in PubChem.
702
703
        OBJECT: Name of the target without species suffix (e.g. "Slc6a3 - solute carrier family 6 member 3")
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (108/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
704
705
        PREDICATE: "active"|"inactive"|"inconclusive"|"undetermined"
706
707
        SOURCE: "PubChem: <referrer> "(""confirmatory"|"literature"|"other"")"
708
        """
709
        built = BioactivitySearch(key, Apis.Pubchem, compound_name_must_match=name_must_match)
710
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
711
712
713
class EntryDeaSchedule(Entry[BioactivitySearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
714
    @classmethod
715
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
716
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
717
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
718
        key: str = EntryArgs.key("drug.dea:schedule"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
719
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
720
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
721
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
722
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
723
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
724
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
725
    ) -> Searcher:
726
        """
727
        DEA schedules (PENDING).
728
729
        OBJECT: (1 to 4, or "unscheduled")
730
731
        PREDICATE: "has DEA schedule"
732
        """
733
        pass
0 ignored issues
show
Unused Code introduced by
Unnecessary pass statement
Loading history...
734
735
736
class EntryDeaClass(Entry[BioactivitySearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
737
    @classmethod
738
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
739
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
740
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
741
        key: str = EntryArgs.key("drug.dea:class"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
742
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
743
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
744
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
745
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
746
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
747
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
748
    ) -> Searcher:
749
        """
750
        DEA classes (PENDING).
751
752
        OBJECT: e.g. "hallucinogen"
753
754
        PREDICATE: "is in DEA class"
755
        """
756
        pass
0 ignored issues
show
Unused Code introduced by
Unnecessary pass statement
Loading history...
757
758
759
class EntryChemidPlusAcute(Entry[AcuteEffectSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
760
    @classmethod
761
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (10/5)
Loading history...
762
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
763
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
764
        key: str = EntryArgs.key("tox.chemidplus:acute"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
765
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
766
        level: int = EntryArgs.acute_effect_level,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
767
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
768
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
769
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
770
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
771
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
772
    ) -> Searcher:
773
        """
774
        Acute effect codes from ChemIDPlus.
775
776
        OBJECT: E.g. "behavioral: excitement"
777
778
        PREDICATE: "causes acute effect"
779
780
        OTHER COLUMNS:
781
782
            - organism: e.g. 'women', 'infant', 'men', 'human', 'dog', 'domestic animals - sheep and goats'
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (107/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
783
            - human: true or false
784
            - test_type: e.g. 'TDLo'
785
            - route: e.g. 'skin'
786
            - mg_per_kg: e.g. 17.5
787
        """
788
        built = AcuteEffectSearch(
789
            key,
790
            Apis.Pubchem,
791
            top_level=level == 1,
792
        )
793
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
794
795
796
class EntryChemidPlusLd50(Entry[Ld50Search]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
797
    @classmethod
798
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
799
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
800
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
801
        key: str = EntryArgs.key("tox.chemidplus:ld50"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
802
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
803
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
804
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
805
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
806
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
807
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
808
    ) -> Searcher:
809
        """
810
        LD50 acute effects from ChemIDPlus.
811
812
        OBJECT: A dose in mg/kg (e.g. 3100)
813
814
        PREDICATE: "LD50 :: <route>" (e.g. "LD50 :: intravenous)
815
816
        OTHER COLUMNS:
817
818
            - organism: e.g. 'women', 'infant', 'men', 'human', 'dog', 'domestic animals - sheep and goats'
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (107/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
819
            - human: true or false
820
        """
821
        built = Ld50Search(key, Apis.Pubchem)
822
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
823
824
825
class EntryHmdbTissue(Entry[BioactivitySearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
826
    @classmethod
827
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (10/5)
Loading history...
828
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
829
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
830
        key: str = EntryArgs.key("hmdb:tissue"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
831
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
832
        min_nanomolar: Optional[float] = None,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
833
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
834
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
835
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
836
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
837
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
838
    ) -> Searcher:
839
        """
840
        Tissue concentrations from HMDB (PENDING).
841
842
        OBJECT:
843
844
        PREDICATE: "tissue"
845
        """
846
        pass
0 ignored issues
show
Unused Code introduced by
Unnecessary pass statement
Loading history...
847
848
849
class EntryHmdbComputed(Entry[BioactivitySearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
850
    @classmethod
851
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (10/5)
Loading history...
852
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
853
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
854
        key: str = EntryArgs.key("hmdb:computed"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
855
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
856
        min_nanomolar: Optional[float] = None,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
857
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
858
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
859
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
860
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
861
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
862
    ) -> Searcher:
863
        """
864
        Computed properties from HMDB (PENDING).
865
866
        Keys include pKa, logP, logS, etc.
867
868
        OBJECT: A number; booleans are converted to 0/1
869
870
        PREDICATE: The name of the property
871
        """
872
        pass
0 ignored issues
show
Unused Code introduced by
Unnecessary pass statement
Loading history...
873
874
875
class EntryPubchemReact(Entry[BioactivitySearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
876
    @classmethod
877
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
878
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
879
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
880
        key: str = EntryArgs.key("inter.pubchem:react"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
881
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
882
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
883
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
884
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
885
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
886
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
887
    ) -> Searcher:
888
        """
889
        Metabolic reactions (PENDING).
890
891
        OBJECT: Equation
892
893
        PREDICATE: "<pathway>"
894
        """
895
        pass
0 ignored issues
show
Unused Code introduced by
Unnecessary pass statement
Loading history...
896
897
898
class EntryPubchemComputed(Entry[ComputedPropertySearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
899
    @classmethod
900
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (10/5)
Loading history...
901
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
902
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
903
        key: str = EntryArgs.key("chem.pubchem:computed"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
904
        keys: str = EntryArgs.pubchem_computed_keys,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
905
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
906
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
907
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
908
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
909
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
910
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
911
    ) -> Searcher:
912
        """
913
        Computed properties from PubChem.
914
915
        OBJECT: Number
916
917
        PREDICATE: e.g. "complexity"
918
        """
919
        # replace acronyms, etc.
920
        # ComputedPropertySearch standardizes punctuation and casing
921
        known = {
922
            k: v
923
            for k, v in {
924
                **EntryArgs.KNOWN_USEFUL_KEYS,
925
                **EntryArgs.KNOWN_USELESS_KEYS,
926
            }
927
            if v is not None
928
        }
929
        keys = {known.get(s.strip(), s) for s in keys.split(",")}
930
        built = ComputedPropertySearch(key, Apis.Pubchem, descriptors=keys, source="PubChem")
931
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
932
933
934
class EntryDrugbankAdmet(Entry[DrugbankTargetSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
935
    @classmethod
936
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
937
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
938
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
939
        key: str = EntryArgs.key("drugbank.admet:properties"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
940
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
941
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
942
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
943
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
944
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
945
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
946
    ) -> Searcher:
947
        """
948
        Enzyme predictions from DrugBank (PENDING).
949
950
        OBJECT: Enzyme name
951
952
        PREDICATE: Action
953
        """
954
955
956
class EntryDrugbankMetabolites(Entry[DrugbankTargetSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
957
    @classmethod
958
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
959
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
960
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
961
        key: str = EntryArgs.key("drugbank.admet:metabolites"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
962
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
963
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
964
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
965
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
966
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
967
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
968
    ) -> Searcher:
969
        """
970
        Metabolites from DrugBank (PENDING).
971
972
        OBJECT: Compound name (e.g. "norcocaine").
973
974
        PREDICATE: "metabolized to"
975
        """
976
977
978
class EntryDrugbankDosage(Entry[DrugbankTargetSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
979
    @classmethod
980
    def run(
0 ignored issues
show
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
best-practice introduced by
Too many arguments (9/5)
Loading history...
981
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
982
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
983
        key: str = EntryArgs.key("drugbank.admet:dosage"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
984
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
985
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
986
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
987
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
988
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
989
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
990
    ) -> Searcher:
991
        """
992
        Dosage from DrugBank (PENDING).
993
994
        OBJECT: concentration in mg/mL
995
996
        PREDICATE: "dosage :: <route>"
997
998
        OTHER COLUMNS:
999
1000
        - form (e.g. liquid)
1001
        """
1002
1003
1004
class EntryMetaRandom(Entry[BioactivitySearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
1005
    @classmethod
1006
    def run(
0 ignored issues
show
best-practice introduced by
Too many arguments (9/5)
Loading history...
Coding Style Naming introduced by
Argument name "to" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
1007
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1008
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1009
        key: str = EntryArgs.key("meta:random"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1010
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1011
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1012
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1013
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1014
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1015
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1016
    ) -> Searcher:
1017
        """
1018
        Random class assignment (PENDING).
1019
1020
        OBJECT: 1 thru n-compounds
1021
1022
        PREDICATE: "random"
1023
        """
1024
        pass
0 ignored issues
show
Unused Code introduced by
Unnecessary pass statement
Loading history...
1025
1026
1027
Entries = [
1028
    EntryChemblBinding,
1029
    EntryChemblMechanism,
1030
    EntryChemblAtc,
1031
    EntryChemblTrials,
1032
    EntryGoFunction,
1033
    EntryGoProcess,
1034
    EntryGoComponent,
1035
    EntryPubchemDisease,
1036
    EntryPubchemGeneCoOccurrence,
1037
    EntryPubchemDiseaseCoOccurrence,
1038
    EntryPubchemChemicalCoOccurrence,
1039
    EntryPubchemDgi,
1040
    EntryPubchemCgi,
1041
    EntryDrugbankTarget,
1042
    EntryGeneralFunction,
1043
    EntryDrugbankTransporter,
1044
    EntryTransporterGeneralFunction,
1045
    EntryDrugbankDdi,
1046
    EntryPubchemAssay,
1047
    EntryDeaSchedule,
1048
    EntryDeaClass,
1049
    EntryChemidPlusAcute,
1050
    EntryChemidPlusLd50,
1051
    EntryHmdbTissue,
1052
    EntryPubchemReact,
1053
    EntryMetaRandom,
1054
]
1055