Conditions | 1 |
Total Lines | 19 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | from dataclasses import dataclass |
||
22 | def find(self, inchikey: str) -> Sequence[CtdGeneHit]: |
||
23 | data = self.api.fetch_data(inchikey) |
||
24 | return [ |
||
25 | CtdGeneHit( |
||
26 | record_id=None, |
||
27 | origin_inchikey=inchikey, |
||
28 | matched_inchikey=data.names_and_identifiers.inchikey, |
||
29 | compound_id=str(data.cid), |
||
30 | compound_name=data.name, |
||
31 | predicate="gene interaction", |
||
32 | object_id=dd.gene_name, |
||
33 | object_name=dd.gene_name, |
||
34 | search_key=self.key, |
||
35 | search_class=self.search_class, |
||
36 | data_source=self.data_source, |
||
37 | taxon_id=dd.tax_id, |
||
38 | taxon_name=dd.tax_name, |
||
39 | ) |
||
40 | for dd in data.biomolecular_interactions_and_pathways.compound_gene_interactions |
||
41 | ] |
||
45 |