# Test file for CiliaryFunctionAssay
# This assay supports both in_vitro and in_vivo contexts (supported_contexts: in_vitro_or_in_vivo)
#
# Example 1 shows the two-condition pattern: an air control output record and
# an ozone-exposed output record, each linked to its exposure condition.
# Example 2 shows the single-record case, where no exposure was applied.
ciliary_function_assays:
  # Example 1: In vitro context using ALI culture
  - id: "CILIARY:001"
    name: "CBF measurement after ozone exposure (in vitro)"
    has_specified_output:
      - id: "CILIARY:001-output-control"
        name: "Air control ciliary function measurements"
        experimental_group: control
        measured_under: "EXPOSURE:air-4h"
        beat_frequency_hz:
          value: "12.4"
          unit:
            id: "UO:0000106"
            name: "hertz"
          central_tendency: mean
          sample_size: 6
          variability:
            variability_type: standard_deviation
            value: "1.1"
            unit:
              id: "UO:0000106"
              name: "hertz"
        active_area_percentage:
          value: "91"
          unit:
            id: "UO:0000187"
            name: "percent"
          central_tendency: mean
          sample_size: 6
        percentage_ciliated_cells:
          value: "78"
          unit:
            id: "UO:0000187"
            name: "percent"
          central_tendency: mean
          sample_size: 6
        cilia_length:
          value: "7.4"
          unit:
            id: "UO:0000017"
            name: "micrometer"
          central_tendency: mean
          sample_size: 6
        cilia_per_cell:
          value: "180"
          unit:
            id: "UO:0000189"
            name: "count unit"
          central_tendency: mean
          sample_size: 6
        ciliary_motion_patterns: coordinated
        ciliary_beat_amplitude:
          value: "6.1"
          unit:
            id: "UO:0000017"
            name: "micrometer"
          central_tendency: mean
          sample_size: 6
      - id: "CILIARY:001-output-ozone"
        name: "Ozone-exposed ciliary function measurements"
        experimental_group: treated
        measured_under: "EXPOSURE:ozone-200ppb-4h"
        beat_frequency_hz:
          value: "8.5"
          unit:
            id: "UO:0000106"
            name: "hertz"
          central_tendency: mean
          sample_size: 6
          variability:
            variability_type: standard_deviation
            value: "1.3"
            unit:
              id: "UO:0000106"
              name: "hertz"
        active_area_percentage:
          value: "72"
          unit:
            id: "UO:0000187"
            name: "percent"
          central_tendency: mean
          sample_size: 6
        percentage_ciliated_cells:
          value: "65"
          unit:
            id: "UO:0000187"
            name: "percent"
          central_tendency: mean
          sample_size: 6
        cilia_length:
          value: "7.2"
          unit:
            id: "UO:0000017"
            name: "micrometer"
          central_tendency: mean
          sample_size: 6
        cilia_per_cell:
          value: "150"
          unit:
            id: "UO:0000189"
            name: "count unit"
          central_tendency: mean
          sample_size: 6
        ciliary_motion_patterns: dyskinetic
        ciliary_beat_amplitude:
          value: "4.5"
          unit:
            id: "UO:0000017"
            name: "micrometer"
          central_tendency: mean
          sample_size: 6
    assay_date: "2024-01-15"
    informs_on_key_event:
      id: "KE:ke3-impaired-ciliary"
      name: "Decreased ciliary function"
      biological_action: decreased
      level_of_biological_organization: cellular
    has_exposure_condition:
      - id: "EXPOSURE:air-4h"
        name: "Filtered air 4 hours (control)"
        exposure_duration:
          value: "4"
          unit:
            id: "UO:0000032"
            name: "hour"
        timing_post_exposure:
          value: "2"
          unit:
            id: "UO:0000032"
            name: "hour"
      - id: "EXPOSURE:ozone-200ppb-4h"
        name: "Ozone 200 ppb for 4 hours"
        exposure_agent:
          id: "CHEBI:25812"
          name: "ozone"
        exposure_concentration:
          value: "200"
          unit:
            id: "UO:0000170"
            name: "parts per billion"
        exposure_duration:
          value: "4"
          unit:
            id: "UO:0000032"
            name: "hour"
        timing_post_exposure:
          value: "2"
          unit:
            id: "UO:0000032"
            name: "hour"
    study_subject:
      subject_type: CellularSystem
      id: "soma:culture-001"
      name: "Primary HBE ALI culture"
      cell_type:
        id: "CL:0002328"
        name: "bronchial epithelial cell"
      model_species:
        id: "NCBITaxon:9606"
        name: "Homo sapiens"
      primary_cell:
        id: "CL:0002328"
        name: "bronchial epithelial cell"
      anatomical_origin:
        id: "UBERON:0002031"
        name: "bronchus"
      cell_culture_growth_mode: air_liquid_interface
      days_at_differentiation: 21
      donor_info: "Healthy non-smoker, male, age 35, no respiratory disease"
      replicates_per_donor: 3
      substrate_type: transwell_insert
      passage_number: 2
      seeding_density:
        value: "200000"
        unit:
          id: "UO:0000210"
          name: "cells per square centimeter"
      culture_conditions:
        id: "soma:conditions-001"
        name: "Standard ALI culture conditions"
        days_at_air_liquid_interface: 21
        substrate_type: transwell_insert
        cell_culture_growth_mode: air_liquid_interface
        replicates_per_donor: 3
      culture_media:
        id: "soma:media-001"
        name: "PneumaCult-ALI medium"
        base_medium: "PneumaCult-ALI"
        manufacturer: "STEMCELL Technologies"
        supplements:
          - id: "soma:supp-001"
            name: "Hydrocortisone"
            supplement_type: hormone
            concentration:
              value: "0.48"
              unit:
                id: "UO:0000274"
                name: "microgram per milliliter"
          - id: "soma:supp-002"
            name: "Heparin"
            supplement_type: growth_factor
            concentration:
              value: "4"
              unit:
                id: "UO:0000274"
                name: "microgram per milliliter"
    follows_protocols:
      - protocol_type: ImagingProtocol
        id: "PROTOCOL:cbf-001"
        name: "High-speed video microscopy for CBF"
        imaging_frame_rate:
          value: "200"
          unit:
            id: "UO:0000105"
            name: "hertz"
        imaging_duration:
          value: "5"
          unit:
            id: "UO:0000010"
            name: "second"
        temperature_control:
          value: "37"
          unit:
            id: "UO:0000027"
            name: "degree Celsius"
  # Example 2: In vivo context using OCT-based measurement
  - id: "CILIARY:002"
    name: "In vivo OCT-based ciliary function assessment"
    # No exposure was applied here, so the single output record is marked as
    # a baseline measurement and carries no measured_under reference - both
    # slots are optional, and measured_under is only meaningful when the
    # assay defines exposure conditions.
    has_specified_output:
      - id: "CILIARY:002-output-baseline"
        name: "Baseline in vivo ciliary function measurements"
        experimental_group: baseline
        beat_frequency_hz:
          value: "11.2"
          unit:
            id: "UO:0000106"
            name: "hertz"
          central_tendency: single_value
          sample_size: 1
        active_area_percentage:
          value: "85"
          unit:
            id: "UO:0000187"
            name: "percent"
          central_tendency: single_value
          sample_size: 1
    assay_date: "2024-03-10"
    informs_on_key_event:
      id: "KE:ke3-impaired-ciliary"
      name: "Decreased ciliary function"
      biological_action: decreased
      level_of_biological_organization: cellular
    study_subject:
      subject_type: InVivoSubject
      id: "SUBJECT:003"
      name: "Subject C"
      model_species:
        id: "NCBITaxon:9606"
        name: "Homo sapiens"
      age:
        value: "38"
        unit:
          id: "UO:0000036"
          name: "year"
      sex: "female"
      subject_characteristics: "Non-smoker, no respiratory disease, healthy volunteer"
      sample_collection_method: "In vivo OCT imaging of nasal epithelium"
      clinical_context: "Baseline assessment, no active respiratory symptoms"
    follows_protocols:
      - protocol_type: ImagingProtocol
        id: "PROTOCOL:oct-001"
        name: "In vivo OCT for ciliary function"
        imaging_frame_rate:
          value: "100"
          unit:
            id: "UO:0000105"
            name: "hertz"
        imaging_duration:
          value: "10"
          unit:
            id: "UO:0000010"
            name: "second"
        temperature_control:
          value: "37"
          unit:
            id: "UO:0000027"
            name: "degree Celsius"

# Analysis layer: the drop in ciliary beat frequency relative to the air
# control, referencing the two output records of Example 1.
response_comparisons:
  - id: "COMP:CILIARY001-cbf"
    name: "Change in ciliary beat frequency, ozone vs filtered air"
    derived_from_assay: "CILIARY:001"
    compared_measurement: "beat_frequency_hz"
    control_output: "CILIARY:001-output-control"
    treated_output: "CILIARY:001-output-ozone"
    change_type: absolute_difference
    change_direction: decreased
    change_value:
      value: "-3.9"
      unit:
        id: "UO:0000106"
        name: "hertz"
    p_value: 0.002
    statistical_test: "two-sample t-test"
    derivation: computed
