|
10 | 10 | from src.interfaces.simple_enum import NodeLabel, RelationshipLabel
|
11 | 11 | from src.models.analyte import Synonym
|
12 | 12 | from src.models.gene import Gene as GeneBase, GeneticLocation
|
13 |
| -from src.models.generif import GeneGeneRifRelationship, GeneRif as GeneRifBase |
| 13 | +from src.models.generif import GeneGeneRifRelationship as GeneGeneRifRelationshipBase, GeneRif as GeneRifBase |
14 | 14 | from src.models.go_term import GoTerm as GoTermBase, ProteinGoTermRelationship as ProteinGoTermRelationshipBase, \
|
15 | 15 | GoEvidence as GoEvidenceBase
|
16 |
| -from src.models.ligand import Ligand as LigandBase, ProteinLigandRelationship, ActivityDetails |
| 16 | +from src.models.ligand import Ligand as LigandBase, ProteinLigandRelationship as ProteinLigandRelationshipBase, ActivityDetails |
17 | 17 | from src.models.node import Node, EquivalentId, Relationship
|
18 | 18 | from src.models.protein import Protein as ProteinBase
|
19 |
| -from src.models.transcript import Transcript as TranscriptBase, TranscriptLocation, IsoformProteinRelationship, \ |
20 |
| - GeneProteinRelationship, \ |
21 |
| - TranscriptProteinRelationship, GeneTranscriptRelationship |
| 19 | +from src.models.transcript import Transcript as TranscriptBase, TranscriptLocation, IsoformProteinRelationship as IsoformProteinRelationshipBase, \ |
| 20 | + GeneProteinRelationship as GeneProteinRelationshipBase, \ |
| 21 | + TranscriptProteinRelationship as TranscriptProteinRelationshipBase, GeneTranscriptRelationship as GeneTranscriptRelationshipBase |
22 | 22 |
|
23 | 23 | NodeLabel = strawberry.type(NodeLabel)
|
24 | 24 | Node = strawberry.type(Node)
|
25 | 25 | EquivalentId = strawberry.type(EquivalentId)
|
26 | 26 | Synonym = strawberry.type(Synonym)
|
27 | 27 | GeneticLocation = strawberry.type(GeneticLocation)
|
28 | 28 | ActivityDetails = strawberry.type(ActivityDetails)
|
29 |
| - |
30 |
| -IsoformProteinRelationship = strawberry.type(IsoformProteinRelationship) |
31 |
| -GeneProteinRelationship = strawberry.type(GeneProteinRelationship) |
32 |
| -TranscriptProteinRelationship = strawberry.type(TranscriptProteinRelationship) |
33 |
| -GeneTranscriptRelationship = strawberry.type(GeneTranscriptRelationship) |
34 |
| -ProteinLigandRelationship = strawberry.type(ProteinLigandRelationship) |
35 |
| -GeneGeneRifRelationship = strawberry.type(GeneGeneRifRelationship) |
36 | 29 | RelationshipLabel = strawberry.type(RelationshipLabel)
|
37 | 30 | Relationship = strawberry.type(Relationship)
|
38 |
| - |
39 | 31 | TranscriptLocation = strawberry.type(TranscriptLocation)
|
40 | 32 |
|
41 |
| - |
42 | 33 | @strawberry.type
|
43 | 34 | class GeneRif(GeneRifBase):
|
44 | 35 | pmids: List[str]
|
@@ -292,9 +283,59 @@ class ProteinGoTermRelationship(ProteinGoTermRelationshipBase):
|
292 | 283 | @strawberry.field()
|
293 | 284 | def provenance(root) -> Provenance:
|
294 | 285 | return Provenance.parse_provenance_fields(root)
|
295 |
| - |
| 286 | + start_node: Protein |
| 287 | + end_node: GoTerm |
296 | 288 | evidence: List[GoEvidence]
|
297 | 289 |
|
| 290 | + |
| 291 | +@strawberry.type |
| 292 | +class IsoformProteinRelationship(IsoformProteinRelationshipBase): |
| 293 | + @strawberry.field() |
| 294 | + def provenance(root) -> Provenance: |
| 295 | + return Provenance.parse_provenance_fields(root) |
| 296 | + start_node: Protein |
| 297 | + end_node: Protein |
| 298 | + |
| 299 | +@strawberry.type |
| 300 | +class GeneProteinRelationship(GeneProteinRelationshipBase): |
| 301 | + @strawberry.field() |
| 302 | + def provenance(root) -> Provenance: |
| 303 | + return Provenance.parse_provenance_fields(root) |
| 304 | + start_node: Gene |
| 305 | + end_node: Protein |
| 306 | + |
| 307 | +@strawberry.type |
| 308 | +class TranscriptProteinRelationship(TranscriptProteinRelationshipBase): |
| 309 | + @strawberry.field() |
| 310 | + def provenance(root) -> Provenance: |
| 311 | + return Provenance.parse_provenance_fields(root) |
| 312 | + start_node: Transcript |
| 313 | + end_node: Protein |
| 314 | + |
| 315 | +@strawberry.type |
| 316 | +class GeneTranscriptRelationship(GeneTranscriptRelationshipBase): |
| 317 | + @strawberry.field() |
| 318 | + def provenance(root) -> Provenance: |
| 319 | + return Provenance.parse_provenance_fields(root) |
| 320 | + start_node: Gene |
| 321 | + end_node: Transcript |
| 322 | + |
| 323 | +@strawberry.type |
| 324 | +class ProteinLigandRelationship(ProteinLigandRelationshipBase): |
| 325 | + @strawberry.field() |
| 326 | + def provenance(root) -> Provenance: |
| 327 | + return Provenance.parse_provenance_fields(root) |
| 328 | + start_node: Protein |
| 329 | + end_node: Ligand |
| 330 | + |
| 331 | +@strawberry.type |
| 332 | +class GeneGeneRifRelationship(GeneGeneRifRelationshipBase): |
| 333 | + @strawberry.field() |
| 334 | + def provenance(root) -> Provenance: |
| 335 | + return Provenance.parse_provenance_fields(root) |
| 336 | + start_node: Gene |
| 337 | + end_node: GeneRif |
| 338 | + |
298 | 339 | ProteinGeneQueryResult = make_linked_list_result_type("ProteinGeneQueryResult", "ProteinGeneDetails", GeneProteinRelationship, Gene)
|
299 | 340 | ProteinTranscriptQueryResult = make_linked_list_result_type("ProteinTranscriptQueryResult", "ProteinTranscriptDetails", TranscriptProteinRelationship, Transcript)
|
300 | 341 | ProteinGoTermQueryResult = make_linked_list_result_type("ProteinGoTermQueryResult", "ProteinGoTermDetails", ProteinGoTermRelationship, GoTerm)
|
|
0 commit comments