entity_types:
  - &protein
      id: PR:000000001
      name: protein
  - &chemical_entity
      id: CHEBI:24431
      name: chemical entity
  - &gene
      id: SO:0000704
      name: gene
  - &protein_complex
      id: GO:0032991
      name: protein-containing complex
  - &genotype
      id: SO:0001027
      name: genotype
  - &variation
      id: VariO:0001
      name: variation
  - &protein_family
      id: NCIT:C20130
      name: protein family
  - &polypeptide_region
      id: SO:0000839
      name: polypeptide region
  - &rule
      id: IAO:0000055
      name: rule
  - &biological_process
      id: GO:0008150
      name: biological_process
  - &cellular_component
      id: GO:0005575
      name: cellular component
  - &molecular_function
      id: GO:0003674
      name: molecular_function
  - &vocabulary
      id: SIO:001080
      name: vocabulary
  - &catalytic_activity
      id: GO:0003824
      name: catalytic activity
  - &phenotype
      id: UPHENO:0001001
      name: phenotype
  - &rna
      id: CHEBI:33697
      name: ribonucleic acid
  - &primary_transcript
      id: SO:0000185
      name: primary transcript

eco_usage_constraints:
  - eco_id: ECO:0000353
    go_evidence: IPI
    allowed_reference: PMID:[0-9]+
    with_presence: conditional
    with_presence_condition:
      condition: db_object_type eq 'complex'
      when_false: mandatory
      when_true: optional
    with_structure: compound
    with_entities:
      - entity_type: *protein
      - entity_type: *chemical_entity
      - entity_type: *gene
      - entity_type: *protein_complex
      - entity_type: *rna
  - eco_id: ECO:0000316
    go_evidence: IGI
    allowed_reference: PMID:[0-9]+
    with_presence: mandatory
    with_structure: compound
    with_entities:
      - entity_type: *gene
      - entity_type: *genotype
      - entity_type: *protein
      - entity_type: *variation
      - entity_type: *protein_complex
      - entity_type: *rna
  - eco_id: ECO:0000318
    go_evidence: IBA
    allowed_reference: GO_REF:0000033$
    with_presence: mandatory
    with_structure: simple
    with_entities:
      - entity_type: *gene
      - entity_type: *protein
      - entity_type: *protein_family
      - entity_type: *rna
      - entity_type: *primary_transcript
  - eco_id: ECO:0000319
    go_evidence: IBD
    allowed_reference: GO_REF:0000033$
    with_presence: mandatory
    with_structure: simple
    with_entities:
      - entity_type: *gene
      - entity_type: *protein
      - entity_type: *protein_family
      - entity_type: *rna
  - eco_id: ECO:0000320
    go_evidence: IKR
    allowed_reference:  (GO_REF:0000(033|047))|(PMID:[0-9]+)
    with_presence: conditional
    with_presence_condition:
      condition: reference matches '^GO_REF:[0-9]{7}$'
      when_false: optional
      when_true: mandatory
    with_structure: simple
    with_entities:
      - entity_type: *polypeptide_region
      - entity_type: *protein
      - entity_type: *rule
  - eco_id: ECO:0000321
    go_evidence: IRD
    allowed_reference: GO_REF:0000033$
    with_presence: mandatory
    with_structure: simple
    with_entities:
      - entity_type: *gene
      - entity_type: *protein
      - entity_type: *protein_family
      - entity_type: *rna
  - eco_id: ECO:0000250
    go_evidence: ISS
    allowed_reference: (GO_REF:0000(024|027|110|122))|(PMID:[0-9]+)
    with_presence: mandatory
    with_structure: simple
    with_entities:
      - entity_type: *gene
      - entity_type: *protein
      - entity_type: *protein_complex
      - entity_type: *rna
    allowed_references:
      - GO_REF:0000(024|030|008|027|028|110|122)$
  - eco_id: ECO:0000266
    go_evidence: ISO
    allowed_reference: (GO_REF:0000(024|096|008|101|119|121|122))|(PMID:[0-9]+)
    with_presence: mandatory
    with_structure: simple
    with_entities:
      - entity_type: *gene
      - entity_type: *protein
      - entity_type: *protein_family
      - entity_type: *protein_complex
      - entity_type: *rna
  - eco_id: ECO:0000247
    go_evidence: ISA
    allowed_reference: (GO_REF:0000(012|113|122))|(PMID:[0-9]+)
    with_presence: mandatory
    with_structure: simple
    with_entities:
      - entity_type: *gene
      - entity_type: *protein
      - entity_type: *polypeptide_region
      - entity_type: *protein_family
      - entity_type: *rna
  - eco_id: ECO:0000305
    go_evidence: IC
    allowed_reference: (GO_REF:0000(024|036|050|111))|(PMID:[0-9]+)
    with_presence: mandatory
    with_structure: compound
    with_entities:
      - entity_type: *biological_process
      - entity_type: *cellular_component
      - entity_type: *molecular_function
  - eco_id: ECO:0000501
    go_evidence: IEA
    allowed_reference: 
    with_presence: mandatory
    with_structure: simple
    with_entities:
      - entity_type: *gene
      - entity_type: *protein
      - entity_type: *polypeptide_region
      - entity_type: *rule
      - entity_type: *vocabulary
      - entity_type: *catalytic_activity
      - entity_type: *biological_process
      - entity_type: *protein_complex
      - entity_type: *rna      
  - eco_id: ECO:0007322
    go_evidence: IEA
    allowed_reference: 
    with_presence: mandatory
    with_structure: simple
    with_entities:
      - entity_type: *vocabulary
  - eco_id: ECO:0000255
    go_evidence: ISM
    allowed_reference: GO_REF:0000(030|050|011|122)$
    with_presence: recommended
    with_structure: simple
    with_entities:
      - entity_type: *polypeptide_region
  - eco_id: ECO:0000317
    go_evidence: IGC
    allowed_reference: PMID:[0-9]+
    with_presence: recommended
    with_structure: compound
    with_entities:
      - entity_type: *gene
      - entity_type: *protein
      - entity_type: *biological_process
      - entity_type: *rna
  - eco_id: ECO:0007003
    go_evidence: HGI
    allowed_reference: PMID:[0-9]+
    with_presence: mandatory
    with_structure: compound
    with_entities:
      - entity_type: *gene
      - entity_type: *genotype
      - entity_type: *protein
      - entity_type: *variation
      - entity_type: *protein_complex
      - entity_type: *rna
  - eco_id: ECO:0000315
    go_evidence: IMP
    allowed_reference: PMID:[0-9]+
    with_presence: optional
    with_structure: compound
    with_entities:
      - entity_type: *gene
      - entity_type: *phenotype
      - entity_type: *genotype
      - entity_type: *protein
      - entity_type: *variation
      - entity_type: *chemical_entity
      - entity_type: *protein_complex
      - entity_type: *rna
  - eco_id: ECO:0000245
    go_evidence: RCA
    allowed_reference: (GO_REF:0000123$|PMID:[0-9]+)
    with_presence: optional
    with_structure: simple
    with_entities:
      - entity_type: *gene
      - entity_type: *protein
      - entity_type: *polypeptide_region
      - entity_type: *rule
      - entity_type: *vocabulary
      - entity_type: *catalytic_activity
      - entity_type: *biological_process
      - entity_type: *protein_complex
      - entity_type: *rna
  - eco_id: ECO:0007001
    go_evidence: HMP
    allowed_reference: PMID:[0-9]+
    with_presence: optional
    with_structure: compound
    with_entities:
      - entity_type: *gene
      - entity_type: *phenotype
      - entity_type: *genotype
      - entity_type: *protein
      - entity_type: *variation
      - entity_type: *chemical_entity
      - entity_type: *protein_complex
      - entity_type: *rna
  - eco_id: ECO:0000269
    go_evidence: EXP
    allowed_reference: PMID:[0-9]+
    with_presence: disallowed
  - eco_id: ECO:0000314
    go_evidence: IDA
    allowed_reference: (GO_REF:0000(052|054|109))|(PMID:[0-9]+)
    with_presence: disallowed
  - eco_id: ECO:0000270
    go_evidence: IEP
    allowed_reference: PMID:[0-9]+
    with_presence: disallowed
  - eco_id: ECO:0000304
    go_evidence: TAS
    allowed_reference: PMID:[0-9]+
    with_presence: disallowed
  - eco_id: ECO:0000303
    go_evidence: NAS
    allowed_reference: (GO_REF:0000051)|(PMID:[0-9]+)
    with_presence: disallowed
  - eco_id: ECO:0000307
    go_evidence: ND
    allowed_reference: GO_REF:0000015$
    with_presence: disallowed
  - eco_id: ECO:0006056
    go_evidence: HTP
    allowed_reference: PMID:[0-9]+
    with_presence: disallowed
  - eco_id: ECO:0007005
    go_evidence: HDA
    allowed_reference: PMID:[0-9]+
    with_presence: disallowed
  - eco_id: ECO:0007007
    go_evidence: HEP
    allowed_reference: PMID:[0-9]+
    with_presence: disallowed
  - eco_id: ECO:0005610
    go_evidence: ISS
    allowed_reference: GO_REF:0000114$
    with_presence: mandatory
    with_structure: simple
    with_entities:
      - entity_type: *protein_complex
  - eco_id: ECO:0005544
    go_evidence: IS0
    allowed_reference: GO_REF:0000114$
    with_presence: mandatory
  - eco_id: ECO:0005546
    go_evidence: ISS
    allowed_reference: GO_REF:0000114$
    with_presence: mandatory
  - eco_id: ECO:0005547
    go_evidence: NAS
    allowed_reference: GO_REF:0000114$
    with_presence: disallowed
  - eco_id: ECO:0005543
    go_evidence: EXP
    allowed_reference: PMID:[0-9]+
    with_presence: disallowed
  - eco_id: ECO:0005542
    go_evidence: EXP
    allowed_reference: PMID:[0-9]+
    with_presence: disallowed
