add_protein_complex
Create protein complexes in GO-CAM models by adding validated components with evidence and references, ensuring atomic operations that link all parts using BFO:0000051 relations.
Instructions
Add a protein complex to a GO-CAM model with validated components.
Creates a protein-containing complex (GO:0032991 by default) and links all components using BFO:0000051 (has part) relation. The operation is atomic - either all components are added successfully or the entire operation is rolled back.
Args: model_id: The GO-CAM model identifier components: List of component dictionaries with keys: - entity_id (required): Protein/gene product ID (e.g., "UniProtKB:P12345") - label (optional): Component label for validation - evidence_type (optional): ECO code (e.g., "ECO:0000353") - reference (optional): Source reference (e.g., "PMID:12345678") assign_var: Variable name for the complex (default: "complex1")
Returns: Barista API response with complex ID and component IDs
Examples: # Create a simple dimer complex add_protein_complex( "gomodel:12345", [ {"entity_id": "UniProtKB:P04637", "label": "TP53"}, {"entity_id": "UniProtKB:P04637", "label": "TP53"} ], )
Notes: - All components must have entity_id specified - Label validation prevents ID hallucination - Evidence and references are optional but recommended - Uses BFO:0000051 (has part) to link components - Atomic operation with automatic rollback on failure
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | Yes | ||
| components | Yes | ||
| assign_var | No | complex1 |