Passed
Push — dependabot/pip/flake8-bugbear-... ( 5c5892...6076c0 )
by
unknown
01:34
created

mandos.entries.entries   F

Complexity

Total Complexity 60

Size/Duplication

Total Lines 1058
Duplicated Lines 8.88 %

Importance

Changes 0
Metric Value
eloc 641
dl 94
loc 1058
rs 3.559
c 0
b 0
f 0
wmc 60

47 Methods

Rating   Name   Duplication   Size   Complexity  
A EntryTransporterGeneralFunction.run() 26 26 1
A EntryPubchemAssay.run() 0 28 1
A Entry.get_search_type() 0 4 1
A EntryPubchemReact.run() 0 20 1
A Entry._get_default_key() 0 8 2
A _EntryPubchemCoOccurrence.get_cooccurrence_type() 0 4 1
A EntryChemblMechanism.run() 0 40 1
A EntryChemblBinding.run() 0 58 1
A EntryDrugbankDosage.run() 0 13 1
A EntryHmdbComputed.run() 0 23 1
A EntryHmdbTissue.run() 0 21 1
A EntryPubchemComputed.run() 0 33 1
A EntryDeaClass.run() 0 20 1
A EntryDrugbankTransporter.run() 26 26 1
A EntryGoFunction.go_type() 0 3 1
A Utils.get_flags() 0 3 1
A EntryPubchemDisease.run() 0 23 1
A EntryDrugbankDdi.run() 0 24 1
A Entry._get_searcher() 0 8 1
A EntryGeneralFunction.run() 21 21 1
A EntryChemblAtc.run() 0 24 1
A EntryGoComponent.go_type() 0 3 1
A EntryMetaRandom.run() 0 20 1
A Entry.default_param_values() 0 6 2
A _EntryPubchemCoOccurrence.cmd() 0 4 1
A EntryDeaSchedule.run() 0 20 1
A Utils.get_target_types() 0 3 1
A _EntryChemblGo.go_type() 0 3 1
A EntryGoProcess.go_type() 0 3 1
A Utils.get_taxa() 0 7 1
A Entry.run() 0 3 1
A Entry._run() 0 22 3
A EntryDrugbankMetabolites.run() 0 13 1
A Utils.split() 0 3 1
B _EntryChemblGo.run() 0 59 5
A Entry.test() 0 3 1
A _EntryChemblGo.cmd() 0 4 1
A EntryPubchemCgi.run() 0 25 1
A EntryPubchemDgi.run() 0 24 1
A _EntryPubchemCoOccurrence.run() 0 38 3
A Entry.cmd() 0 8 4
A EntryDrugbankTarget.run() 21 21 1
A Utils.get_trial_statuses() 0 3 1
A EntryDrugbankAdmet.run() 0 13 1
A EntryChemidPlusAcute.run() 0 34 1
A EntryChemidPlusLd50.run() 0 26 1
A EntryChemblTrials.run() 0 22 1

How to fix   Duplicated Code    Complexity   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

Complexity

 Tip:   Before tackling complexity, make sure that you eliminate any duplication first. This often can reduce the size of classes significantly.

Complex classes like mandos.entries.entries often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

1
"""
0 ignored issues
show
coding-style introduced by
Too many lines in module (1058/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
from typer.models import OptionInfo
0 ignored issues
show
introduced by
Unable to import 'typer.models'
Loading history...
13
14
from mandos.entries import EntryMeta
15
from mandos.entries.args import EntryArgs
16
from mandos.model import ReflectionUtils, InjectionError
17
from mandos.model.chembl_api import ChemblApi
18
from mandos.model.chembl_support import DataValidityComment
19
from mandos.model.chembl_support.chembl_targets import TargetType
20
from mandos.model.pubchem_support.pubchem_models import (
21
    ClinicalTrialsGovUtils,
22
    CoOccurrenceType,
23
    DrugbankTargetType,
24
)
25
from mandos.model.searches import Search
26
from mandos.model.settings import MANDOS_SETTINGS
27
from mandos.model.taxonomy import Taxonomy
28
from mandos.model.taxonomy_caches import TaxonomyFactories
29
from mandos.entries.api_singletons import Apis
30
from mandos.search.pubchem.acute_effects_search import AcuteEffectSearch, Ld50Search
31
from mandos.search.pubchem.bioactivity_search import BioactivitySearch
32
from mandos.search.pubchem.computed_property_search import ComputedPropertySearch
33
from mandos.search.pubchem.dgidb_search import DgiSearch
34
from mandos.search.pubchem.ctd_gene_search import CtdGeneSearch
35
from mandos.entries.searcher import Searcher
36
from mandos.search.pubchem.drugbank_ddi_search import DrugbankDdiSearch
37
from mandos.search.pubchem.drugbank_interaction_search import (
38
    DrugbankTargetSearch,
39
    DrugbankGeneralFunctionSearch,
40
)
41
42
from mandos import logger
43
from mandos.search.chembl.binding_search import BindingSearch
44
from mandos.search.chembl.atc_search import AtcSearch
45
from mandos.search.chembl.go_search import GoType, GoSearch
46
from mandos.search.chembl.indication_search import IndicationSearch
47
from mandos.search.chembl.mechanism_search import MechanismSearch
48
from mandos.search.pubchem.cooccurrence_search import (
49
    GeneCoOccurrenceSearch,
50
    ChemicalCoOccurrenceSearch,
51
    CoOccurrenceSearch,
52
    DiseaseCoOccurrenceSearch,
53
)
54
from mandos.search.pubchem.disease_search import DiseaseSearch
55
56
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...
57
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...
58
59
60
class Utils:
0 ignored issues
show
Documentation introduced by
Empty class docstring
Loading history...
61
    """"""
62
63
    @staticmethod
64
    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...
65
        return {s.strip() for s in st.split(",")}
66
67
    @staticmethod
68
    def get_taxa(taxa: str) -> Sequence[Taxonomy]:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
69
        return [
70
            TaxonomyFactories.from_uniprot(MANDOS_SETTINGS.taxonomy_cache_path).load(
71
                str(taxon).strip()
72
            )
73
            for taxon in taxa.split(",")
74
        ]
75
76
    @staticmethod
77
    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...
78
        return ClinicalTrialsGovUtils.resolve_statuses(st)
79
80
    @staticmethod
81
    def get_target_types(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...
82
        return {s.name for s in TargetType.resolve(st)}
83
84
    @staticmethod
85
    def get_flags(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...
86
        return {s.name for s in DataValidityComment.resolve(st)}
87
88
89
class Entry(Generic[S], metaclass=abc.ABCMeta):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
90
    @classmethod
91
    def cmd(cls) -> str:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
92
        key = cls._get_default_key()
93
        if isinstance(key, typer.models.OptionInfo):
94
            key = key.default
95
        if key is None or not isinstance(key, str):
96
            raise AssertionError(f"Key for {cls.__name__} is {key}")
97
        return key
98
99
    @classmethod
100
    def run(cls, path: Path, **params) -> None:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
101
        raise NotImplementedError()
102
103
    @classmethod
104
    def get_search_type(cls) -> Type[S]:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
105
        # noinspection PyTypeChecker
106
        return ReflectionUtils.get_generic_arg(cls, Search)
107
108
    # noinspection PyUnusedLocal
109
    @classmethod
110
    def test(cls, path: Path, **params) -> None:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
111
        cls.run(path, **{**params, **dict(check=True)})
112
113
    @classmethod
114
    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...
115
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
116
        built: S,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
117
        path: Path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
118
        to: Optional[Path],
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
119
        check: bool,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
120
        log: Optional[Path],
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
121
        quiet: bool,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
122
        verbose: bool,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
123
        no_setup: bool,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
124
    ):
125
        if not no_setup:
126
            level = EntryMeta.set_logging(verbose, quiet, log)
127
            logger.notice(f"Ready. Set log level to {level}")
128
        searcher = cls._get_searcher(built, path, to)
129
        logger.notice(f"Searching {built.key} [{built.search_class}] on {path}")
130
        out = searcher.output_paths[built.key]
131
        if not check:
132
            searcher.search()
133
        logger.notice(f"Done! Wrote to {out}")
134
        return searcher
135
136
    @classmethod
137
    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...
138
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
139
        built: S,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
140
        path: Path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
141
        to: Optional[Path],
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
142
    ):
143
        return Searcher([built], [to], path)
144
145
    @classmethod
146
    def default_param_values(cls) -> Mapping[str, Union[str, float, int, Path]]:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
147
        return {
148
            param: (value.default if isinstance(value, OptionInfo) else value)
149
            for param, value in ReflectionUtils.default_arg_values(cls.run).items()
150
            if param not in {"key", "path"}
151
        }
152
153
    @classmethod
154
    def _get_default_key(cls) -> str:
155
        vals = ReflectionUtils.default_arg_values(cls.run)
156
        try:
157
            return vals["key"]
158
        except KeyError:
159
            logger.error(f"key not in {vals.keys()} for {cls.__name__}")
160
            raise
161
162
163
class EntryChemblBinding(Entry[BindingSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
164
    @classmethod
165
    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 (19/15).
Loading history...
best-practice introduced by
Too many arguments (18/5)
Loading history...
166
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
167
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
168
        key: str = EntryArgs.key("chembl:binding"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
169
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
170
        taxa: str = EntryArgs.taxa,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
171
        traversal: str = EntryArgs.traversal_strategy,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
172
        target_types: str = EntryArgs.target_types,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
173
        confidence: int = EntryArgs.min_confidence,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
174
        binding: float = EntryArgs.binds_cutoff,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
175
        nonbinding: float = EntryArgs.does_not_bind_cutoff,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
176
        relations: str = EntryArgs.relations,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
177
        min_pchembl: float = EntryArgs.min_pchembl,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
178
        banned_flags: str = EntryArgs.banned_flags,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
179
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
180
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
181
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
182
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
183
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
184
    ) -> Searcher:
185
        """
186
        Binding data from ChEMBL.
187
        These are 'activity' annotations of the type 'B' that have a pCHEMBL value.
188
        There is extended documentation on this search; see:
189
190
        https://mandos-chem.readthedocs.io/en/latest/binding.html
191
192
        OBJECT: ChEMBL preferred target name
193
194
        PREDICATE: Either "binds", "does not bind", or "binding <relation> at"
195
196
        OTHER COLUMNS:
197
198
        - taxon_id: From UniProt
199
200
        - taxon_name: From Uniprot (scientific name)
201
202
        - pchembl: Negative base-10 log of activity value (see docs on ChEMBL)
203
204
        - 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...
205
206
        - std_type: e.g. EC50, Kd
207
        """
208
        built = BindingSearch(
209
            key=key,
210
            api=Apis.Chembl,
211
            taxa=Utils.get_taxa(taxa),
212
            traversal_strategy=traversal,
213
            allowed_target_types=Utils.get_target_types(target_types),
214
            min_confidence_score=confidence,
215
            allowed_relations=Utils.split(relations),
216
            min_pchembl=min_pchembl,
217
            banned_flags=Utils.get_flags(banned_flags),
218
            binds_cutoff=binding,
219
            does_not_bind_cutoff=nonbinding,
220
        )
221
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
222
223
224
class EntryChemblMechanism(Entry[MechanismSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
225
    @classmethod
226
    def run(
0 ignored issues
show
best-practice introduced by
Too many arguments (13/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...
227
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
228
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
229
        key: str = EntryArgs.key("chembl:mechanism"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
230
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
231
        taxa: Optional[str] = EntryArgs.taxa,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
232
        traversal: str = EntryArgs.traversal_strategy,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
233
        target_types: str = EntryArgs.target_types,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
234
        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...
235
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
236
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
237
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
238
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
239
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
240
    ) -> Searcher:
241
        """
242
        Mechanism of action (MoA) data from ChEMBL.
243
244
        OBJECT: ChEMBL preferred target name
245
246
        PREDICATE: Target action; e.g. "agonist of" or "positive allosteric modulator of"
247
248
        OTHER COLUMNS:
249
250
        - direct_interaction: true or false
251
252
        - description: From ChEMBL
253
254
        - exact_target_id: the specifically annotated target, before traversal
255
        """
256
        built = MechanismSearch(
257
            key=key,
258
            api=Apis.Chembl,
259
            taxa=Utils.get_taxa(taxa),
260
            traversal_strategy=traversal,
261
            allowed_target_types=Utils.get_target_types(target_types),
262
            min_confidence_score=min_confidence,
263
        )
264
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
265
266
267
class EntryChemblTrials(Entry[IndicationSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
268
    @classmethod
269
    def run(
0 ignored issues
show
best-practice introduced by
Too many arguments (10/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...
270
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
271
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
272
        key: str = EntryArgs.key("chembl:trial"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
273
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
274
        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...
275
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
276
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
277
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
278
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
279
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
280
    ) -> Searcher:
281
        """
282
        Diseases from clinical trials listed in ChEMBL.
283
284
        OBJECT: MeSH code
285
286
        PREDICATE: "phase <level> trial"
287
        """
288
        built = IndicationSearch(key=key, api=Apis.Chembl, min_phase=min_phase)
289
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
290
291
292
class EntryChemblAtc(Entry[AtcSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
293
    @classmethod
294
    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...
295
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
296
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
297
        key: str = EntryArgs.key("chembl:atc"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
298
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
299
        levels: str = EntryArgs.atc_level,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
300
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
301
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
302
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
303
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
304
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
305
    ) -> Searcher:
306
        """
307
        ATC codes from ChEMBL.
308
309
        OBJECT: ATC Code
310
311
        PREDICATE: "ATC L<leveL> code"
312
        """
313
        built = AtcSearch(
314
            key=key, api=Apis.Chembl, levels={int(x.strip()) for x in levels.split(",")}
315
        )
316
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
317
318
319
class _EntryChemblGo(Entry[GoSearch], metaclass=abc.ABCMeta):
320
    @classmethod
321
    def go_type(cls) -> GoType:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
322
        raise NotImplementedError()
323
324
    @classmethod
325
    def cmd(cls) -> str:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
326
        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...
327
        return f"chembl:go.{me.lower()}"
328
329
    @classmethod
330
    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...
331
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
332
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
333
        key: str = EntryArgs.key("<see above>"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
334
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
335
        taxa: Optional[str] = EntryArgs.taxa,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
336
        traversal_strategy: str = EntryArgs.traversal_strategy,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
337
        target_types: str = EntryArgs.target_types,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
338
        confidence: Optional[int] = EntryArgs.min_confidence,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
339
        relations: str = EntryArgs.relations,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
340
        min_pchembl: float = EntryArgs.min_pchembl,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
341
        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...
342
        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...
343
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
344
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
345
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
346
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
347
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
348
    ) -> Searcher:
349
        """
350
        GO terms associated with ChEMBL binding targets.
351
352
        OBJECT: GO Term name
353
354
        PREDICATE: "associated with ""Function"|"Process"|"Component"" term"
355
356
        OTHER COLUMNS:
357
            See the docs for ``mandos chembl:binding``
358
359
        Note:
360
361
            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...
362
363
        """
364
        if key is None or key == "<see above>":
365
            key = cls.cmd()
366
        api = ChemblApi.wrap(Apis.Chembl)
367
        if binding_search is None:
368
            binding_clazz = BindingSearch
369
        else:
370
            binding_clazz = ReflectionUtils.injection(binding_search, BindingSearch)
371
            logger.info(f"NOTICE: Passing parameters to {binding_clazz.__qualname__}")
372
        try:
373
            binding_search = binding_clazz(
374
                key=key,
375
                api=Apis.Chembl,
376
                taxa=Utils.get_taxa(taxa),
377
                traversal_strategy=traversal_strategy,
378
                allowed_target_types=Utils.get_target_types(target_types),
379
                min_confidence_score=confidence,
380
                allowed_relations=Utils.split(relations),
381
                min_pchembl=min_pchembl,
382
                banned_flags=Utils.get_flags(banned_flags),
383
            )
384
        except (TypeError, ValueError):
385
            raise InjectionError(f"Failed to build {binding_clazz.__qualname__}")
386
        built = GoSearch(key, api, cls.go_type(), binding_search)
387
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
388
389
390
class EntryGoFunction(_EntryChemblGo):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
391
    @classmethod
392
    def go_type(cls) -> GoType:
393
        return GoType.function
394
395
396
class EntryGoProcess(_EntryChemblGo):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
397
    @classmethod
398
    def go_type(cls) -> GoType:
399
        return GoType.process
400
401
402
class EntryGoComponent(_EntryChemblGo):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
403
    @classmethod
404
    def go_type(cls) -> GoType:
405
        return GoType.component
406
407
408
class EntryPubchemDisease(Entry[DiseaseSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
409
    @classmethod
410
    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...
411
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
412
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
413
        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...
414
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
415
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
416
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
417
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
418
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
419
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
420
    ) -> Searcher:
421
        """
422
        Diseases in the CTD.
423
424
        Comparative Toxicogenomics Database.
425
426
        OBJECT: MeSH code of disease
427
428
        PREDICATE: "marker/mechanism evidence for" or "disease evidence for"
429
        """
430
        built = DiseaseSearch(key, Apis.Pubchem)
431
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
432
433
434
class _EntryPubchemCoOccurrence(Entry[U], metaclass=abc.ABCMeta):
435
    @classmethod
436
    def cmd(cls) -> str:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
437
        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...
438
        return f"lit.pubchem:{me.lower()}"
439
440
    @classmethod
441
    def get_cooccurrence_type(cls) -> CoOccurrenceType:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
442
        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...
443
        return s.cooccurrence_type()
444
445
    @classmethod
446
    def run(
0 ignored issues
show
best-practice introduced by
Too many arguments (11/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...
447
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
448
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
449
        key: str = EntryArgs.key("<see above>"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
450
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
451
        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...
452
        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...
453
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
454
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
455
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
456
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
457
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
458
    ) -> Searcher:
459
        """
460
        Co-occurrences from PubMed articles.
461
        There is extended documentation on this search.
462
        Also refer to https://pubchemdocs.ncbi.nlm.nih.gov/knowledge-panels
463
464
        OBJECT: Name of gene/chemical/disease
465
466
        PREDICATE: "co-occurs with <gene/chemical/disease>"
467
468
        OTHER COLUMNS:
469
470
        - score: enrichment score; see PubChem docs
471
472
        - intersect_count: Number of articles co-occurring
473
474
        - query_count: Total number of articles for query compound
475
476
        - neighbor_count: Total number of articles for target (co-occurring) compound
477
        """
478
        if key is None or key == "<see above>":
479
            key = cls.cmd()
480
        clazz = cls.get_search_type()
481
        built = clazz(key, Apis.Pubchem, min_score=min_score, min_articles=min_articles)
482
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
483
484
485
class EntryPubchemGeneCoOccurrence(_EntryPubchemCoOccurrence[GeneCoOccurrenceSearch]):
0 ignored issues
show
Documentation introduced by
Empty class docstring
Loading history...
486
    """"""
487
488
489
class EntryPubchemDiseaseCoOccurrence(_EntryPubchemCoOccurrence[DiseaseCoOccurrenceSearch]):
0 ignored issues
show
Documentation introduced by
Empty class docstring
Loading history...
490
    """"""
491
492
493
class EntryPubchemChemicalCoOccurrence(_EntryPubchemCoOccurrence[ChemicalCoOccurrenceSearch]):
0 ignored issues
show
Documentation introduced by
Empty class docstring
Loading history...
494
    """"""
495
496
497
class EntryPubchemDgi(Entry[DgiSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
498
    @classmethod
499
    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...
500
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
501
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
502
        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...
503
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
504
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
505
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
506
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
507
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
508
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
509
    ) -> Searcher:
510
        """
511
        Drug/gene interactions in the DGIDB.
512
513
        Drug Gene Interaction Database.
514
        Also see ``disease.dgidb:int``.
515
516
        OBJECT: Name of the gene
517
518
        PREDICATE: "interacts with gene"
519
        """
520
        built = DgiSearch(key, Apis.Pubchem)
521
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
522
523
524
class EntryPubchemCgi(Entry[CtdGeneSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
525
    @classmethod
526
    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...
527
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
528
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
529
        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...
530
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
531
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
532
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
533
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
534
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
535
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
536
    ) -> Searcher:
537
        """
538
        Compound/gene interactions in the DGIDB.
539
540
        Drug Gene Interaction Database.
541
        Also see ``interact.dgidb:int``.
542
543
        OBJECT: Name of the gene
544
545
        PREDICATE: "compound/gene interaction"
546
547
        """
548
        built = CtdGeneSearch(key, Apis.Pubchem)
549
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
550
551
552
class EntryDrugbankTarget(Entry[DrugbankTargetSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
553 View Code Duplication
    @classmethod
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
554
    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...
555
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
556
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
557
        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...
558
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
559
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
560
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
561
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
562
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
563
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
564
    ) -> Searcher:
565
        """
566
        Protein targets from DrugBank.
567
568
        OBJECT: Target name (e.g. "Solute carrier family 22 member 11") from DrugBank
569
570
        PREDICATE: Action (e.g. "binder", "downregulator", or "agonist")
571
        """
572
        built = DrugbankTargetSearch(key, Apis.Pubchem, {DrugbankTargetType.target})
573
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
574
575
576
class EntryGeneralFunction(Entry[DrugbankGeneralFunctionSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
577 View Code Duplication
    @classmethod
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
578
    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...
579
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
580
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
581
        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...
582
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
583
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
584
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
585
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
586
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
587
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
588
    ) -> Searcher:
589
        """
590
        General functions from DrugBank targets.
591
592
        OBJECT: Name of the general function (e.g. "Toxic substance binding")
593
594
        PREDICATE: against on target (e.g. "binder", "downregulator", or "agonist").
595
        """
596
        built = DrugbankGeneralFunctionSearch(key, Apis.Pubchem, {DrugbankTargetType.target})
597
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
598
599
600
class EntryDrugbankTransporter(Entry[DrugbankTargetSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
601 View Code Duplication
    @classmethod
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
602
    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...
603
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
604
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
605
        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...
606
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
607
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
608
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
609
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
610
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
611
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
612
    ) -> Searcher:
613
        """
614
        PK-related proteins from DrugBank.
615
616
        OBJECT: Transporter name (e.g. "Solute carrier family 22 member 11") from DrugBank
617
618
        PREDICATE: "transported by", "carried by", or "metabolized by"
619
        """
620
        target_types = {
621
            DrugbankTargetType.transporter,
622
            DrugbankTargetType.carrier,
623
            DrugbankTargetType.enzyme,
624
        }
625
        built = DrugbankTargetSearch(key, Apis.Pubchem, target_types)
626
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
627
628
629
class EntryTransporterGeneralFunction(Entry[DrugbankGeneralFunctionSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
630 View Code Duplication
    @classmethod
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
631
    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...
632
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
633
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
634
        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...
635
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
636
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
637
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
638
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
639
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
640
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
641
    ) -> Searcher:
642
        """
643
        DrugBank PK-related protein functions.
644
645
        OBJECT: Name of the general function (e.g. "Toxic substance binding")
646
647
        PREDICATE: "transported by", "carried by", or "metabolized by"
648
        """
649
        target_types = {
650
            DrugbankTargetType.transporter,
651
            DrugbankTargetType.carrier,
652
            DrugbankTargetType.enzyme,
653
        }
654
        built = DrugbankGeneralFunctionSearch(key, Apis.Pubchem, target_types)
655
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
656
657
658
class EntryDrugbankDdi(Entry[DrugbankDdiSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
659
    @classmethod
660
    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...
661
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
662
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
663
        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...
664
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
665
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
666
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
667
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
668
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
669
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
670
    ) -> Searcher:
671
        """
672
        Drug/drug interactions listed by DrugBank.
673
674
        The 'description' column includes useful information about the interaction,
675
        such as diseases and whether a risk is increased or decreased.
676
677
        OBJECT: name of the drug (e.g. "ibuprofen")
678
679
        PREDICATE: "ddi"
680
        """
681
        built = DrugbankDdiSearch(key, Apis.Pubchem)
682
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
683
684
685
class EntryPubchemAssay(Entry[BioactivitySearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
686
    @classmethod
687
    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...
688
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
689
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
690
        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...
691
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
692
        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...
693
        ban_sources: Optional[str] = None,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
Unused Code introduced by
The argument ban_sources seems to be unused.
Loading history...
694
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
695
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
696
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
697
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
698
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
699
    ) -> Searcher:
700
        """
701
        PubChem bioactivity results.
702
703
        Note: The species name, if present, is taken from the target name.
704
        The taxon ID is what was curated in PubChem.
705
706
        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...
707
708
        PREDICATE: "active"|"inactive"|"inconclusive"|"undetermined"
709
710
        SOURCE: "PubChem: <referrer> "(""confirmatory"|"literature"|"other"")"
711
        """
712
        built = BioactivitySearch(key, Apis.Pubchem, compound_name_must_match=name_must_match)
713
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
714
715
716
class EntryDeaSchedule(Entry[BioactivitySearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
717
    @classmethod
718
    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...
719
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
720
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
721
        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...
722
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
723
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
724
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
725
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
726
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
727
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
728
    ) -> Searcher:
729
        """
730
        DEA schedules (PENDING).
731
732
        OBJECT: (1 to 4, or "unscheduled")
733
734
        PREDICATE: "has DEA schedule"
735
        """
736
        pass
0 ignored issues
show
Unused Code introduced by
Unnecessary pass statement
Loading history...
737
738
739
class EntryDeaClass(Entry[BioactivitySearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
740
    @classmethod
741
    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...
742
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
743
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
744
        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...
745
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
746
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
747
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
748
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
749
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
750
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
751
    ) -> Searcher:
752
        """
753
        DEA classes (PENDING).
754
755
        OBJECT: e.g. "hallucinogen"
756
757
        PREDICATE: "is in DEA class"
758
        """
759
        pass
0 ignored issues
show
Unused Code introduced by
Unnecessary pass statement
Loading history...
760
761
762
class EntryChemidPlusAcute(Entry[AcuteEffectSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
763
    @classmethod
764
    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...
765
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
766
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
767
        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...
768
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
769
        level: int = EntryArgs.acute_effect_level,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
770
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
771
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
772
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
773
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
774
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
775
    ) -> Searcher:
776
        """
777
        Acute effect codes from ChemIDPlus.
778
779
        OBJECT: E.g. "behavioral: excitement"
780
781
        PREDICATE: "causes acute effect"
782
783
        OTHER COLUMNS:
784
785
            - 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...
786
            - human: true or false
787
            - test_type: e.g. 'TDLo'
788
            - route: e.g. 'skin'
789
            - mg_per_kg: e.g. 17.5
790
        """
791
        built = AcuteEffectSearch(
792
            key,
793
            Apis.Pubchem,
794
            top_level=level == 1,
795
        )
796
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
797
798
799
class EntryChemidPlusLd50(Entry[Ld50Search]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
800
    @classmethod
801
    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...
802
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
803
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
804
        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...
805
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
806
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
807
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
808
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
809
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
810
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
811
    ) -> Searcher:
812
        """
813
        LD50 acute effects from ChemIDPlus.
814
815
        OBJECT: A dose in mg/kg (e.g. 3100)
816
817
        PREDICATE: "LD50 :: <route>" (e.g. "LD50 :: intravenous)
818
819
        OTHER COLUMNS:
820
821
            - 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...
822
            - human: true or false
823
        """
824
        built = Ld50Search(key, Apis.Pubchem)
825
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
826
827
828
class EntryHmdbTissue(Entry[BioactivitySearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
829
    @classmethod
830
    def run(
0 ignored issues
show
best-practice introduced by
Too many arguments (10/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...
831
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
832
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
833
        key: str = EntryArgs.key("hmdb:tissue"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
834
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
835
        min_nanomolar: Optional[float] = None,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
836
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
837
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
838
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
839
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
840
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
841
    ) -> Searcher:
842
        """
843
        Tissue concentrations from HMDB (PENDING).
844
845
        OBJECT:
846
847
        PREDICATE: "tissue"
848
        """
849
        pass
0 ignored issues
show
Unused Code introduced by
Unnecessary pass statement
Loading history...
850
851
852
class EntryHmdbComputed(Entry[BioactivitySearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
853
    @classmethod
854
    def run(
0 ignored issues
show
best-practice introduced by
Too many arguments (10/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...
855
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
856
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
857
        key: str = EntryArgs.key("hmdb:computed"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
858
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
859
        min_nanomolar: Optional[float] = None,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
860
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
861
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
862
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
863
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
864
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
865
    ) -> Searcher:
866
        """
867
        Computed properties from HMDB (PENDING).
868
869
        Keys include pKa, logP, logS, etc.
870
871
        OBJECT: A number; booleans are converted to 0/1
872
873
        PREDICATE: The name of the property
874
        """
875
        pass
0 ignored issues
show
Unused Code introduced by
Unnecessary pass statement
Loading history...
876
877
878
class EntryPubchemReact(Entry[BioactivitySearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
879
    @classmethod
880
    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...
881
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
882
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
883
        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...
884
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
885
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
886
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
887
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
888
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
889
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
890
    ) -> Searcher:
891
        """
892
        Metabolic reactions (PENDING).
893
894
        OBJECT: Equation
895
896
        PREDICATE: "<pathway>"
897
        """
898
        pass
0 ignored issues
show
Unused Code introduced by
Unnecessary pass statement
Loading history...
899
900
901
class EntryPubchemComputed(Entry[ComputedPropertySearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
902
    @classmethod
903
    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...
904
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
905
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
906
        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...
907
        keys: str = EntryArgs.pubchem_computed_keys,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
908
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
909
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
910
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
911
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
912
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
913
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
914
    ) -> Searcher:
915
        """
916
        Computed properties from PubChem.
917
918
        OBJECT: Number
919
920
        PREDICATE: e.g. "complexity"
921
        """
922
        # replace acronyms, etc.
923
        # ComputedPropertySearch standardizes punctuation and casing
924
        known = {
925
            k: v
926
            for k, v in {
927
                **EntryArgs.KNOWN_USEFUL_KEYS,
928
                **EntryArgs.KNOWN_USELESS_KEYS,
929
            }.items()
930
            if v is not None
931
        }
932
        keys = {known.get(s.strip(), s) for s in keys.split(",")}
933
        built = ComputedPropertySearch(key, Apis.Pubchem, descriptors=keys)
934
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
935
936
937
class EntryDrugbankAdmet(Entry[DrugbankTargetSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
938
    @classmethod
939
    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...
940
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
941
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
942
        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...
943
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
944
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
945
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
946
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
947
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
948
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
949
    ) -> Searcher:
950
        """
951
        Enzyme predictions from DrugBank (PENDING).
952
953
        OBJECT: Enzyme name
954
955
        PREDICATE: Action
956
        """
957
958
959
class EntryDrugbankMetabolites(Entry[DrugbankTargetSearch]):
0 ignored issues
show
introduced by
Value 'Entry' is unsubscriptable
Loading history...
introduced by
Missing class docstring
Loading history...
960
    @classmethod
961
    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...
962
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
963
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
964
        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...
965
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
966
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
967
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
968
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
969
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
970
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
971
    ) -> Searcher:
972
        """
973
        Metabolites from DrugBank (PENDING).
974
975
        OBJECT: Compound name (e.g. "norcocaine").
976
977
        PREDICATE: "metabolized to"
978
        """
979
980
981
class EntryDrugbankDosage(Entry[DrugbankTargetSearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
982
    @classmethod
983
    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...
984
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
985
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
986
        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...
987
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
988
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
989
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
990
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
991
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
992
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
993
    ) -> Searcher:
994
        """
995
        Dosage from DrugBank (PENDING).
996
997
        OBJECT: concentration in mg/mL
998
999
        PREDICATE: "dosage :: <route>"
1000
1001
        OTHER COLUMNS:
1002
1003
        - form (e.g. liquid)
1004
        """
1005
1006
1007
class EntryMetaRandom(Entry[BioactivitySearch]):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
introduced by
Value 'Entry' is unsubscriptable
Loading history...
1008
    @classmethod
1009
    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...
1010
        cls,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1011
        path: Path = EntryArgs.path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1012
        key: str = EntryArgs.key("meta:random"),
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1013
        to: Optional[Path] = EntryArgs.to,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1014
        check: bool = EntryArgs.test,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1015
        log: Optional[Path] = EntryArgs.log_path,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1016
        quiet: bool = EntryArgs.quiet,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1017
        verbose: bool = EntryArgs.verbose,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1018
        no_setup: bool = EntryArgs.no_setup,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
1019
    ) -> Searcher:
1020
        """
1021
        Random class assignment (PENDING).
1022
1023
        OBJECT: 1 thru n-compounds
1024
1025
        PREDICATE: "random"
1026
        """
1027
        pass
0 ignored issues
show
Unused Code introduced by
Unnecessary pass statement
Loading history...
1028
1029
1030
Entries = [
1031
    EntryChemblBinding,
1032
    EntryChemblMechanism,
1033
    EntryChemblAtc,
1034
    EntryChemblTrials,
1035
    EntryGoFunction,
1036
    EntryGoProcess,
1037
    EntryGoComponent,
1038
    EntryPubchemComputed,
1039
    EntryPubchemDisease,
1040
    EntryPubchemGeneCoOccurrence,
1041
    EntryPubchemDiseaseCoOccurrence,
1042
    EntryPubchemChemicalCoOccurrence,
1043
    EntryPubchemDgi,
1044
    EntryPubchemCgi,
1045
    EntryDrugbankTarget,
1046
    EntryGeneralFunction,
1047
    EntryDrugbankTransporter,
1048
    EntryTransporterGeneralFunction,
1049
    EntryDrugbankDdi,
1050
    EntryPubchemAssay,
1051
    EntryDeaSchedule,
1052
    EntryDeaClass,
1053
    EntryChemidPlusAcute,
1054
    EntryChemidPlusLd50,
1055
    EntryHmdbTissue,
1056
    EntryPubchemReact,
1057
    EntryMetaRandom,
1058
]
1059