{
  "$defs": {
    "ClinicalContext": {
      "additionalProperties": false,
      "properties": {
        "indication": {
          "anyOf": [
            {
              "maxLength": 1000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Indication"
        },
        "indication_details": {
          "anyOf": [
            {
              "maxLength": 10000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Indication Details"
        },
        "family_history": {
          "anyOf": [
            {
              "$ref": "#/$defs/FamilyHistory"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "title": "ClinicalContext",
      "type": "object"
    },
    "ClinicalInputs": {
      "additionalProperties": false,
      "properties": {
        "hpo_ids": {
          "items": {
            "type": "string"
          },
          "maxItems": 200,
          "title": "Hpo Ids",
          "type": "array"
        },
        "filtering_preset": {
          "default": "strict",
          "enum": [
            "strict",
            "balanced",
            "permissive"
          ],
          "title": "Filtering Preset",
          "type": "string"
        },
        "language": {
          "const": "en",
          "default": "en",
          "title": "Language",
          "type": "string"
        }
      },
      "title": "ClinicalInputs",
      "type": "object"
    },
    "Consent": {
      "additionalProperties": false,
      "properties": {
        "secondary_findings": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Secondary Findings"
        },
        "carrier_results": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Carrier Results"
        },
        "pharmacogenomics": {
          "default": false,
          "title": "Pharmacogenomics",
          "type": "boolean"
        }
      },
      "title": "Consent",
      "type": "object"
    },
    "CustomGene": {
      "additionalProperties": false,
      "properties": {
        "gene_symbol": {
          "maxLength": 50,
          "minLength": 1,
          "pattern": "^[A-Za-z0-9._-]+$",
          "title": "Gene Symbol",
          "type": "string"
        },
        "priority_score": {
          "default": 0.5,
          "maximum": 1,
          "minimum": 0,
          "title": "Priority Score",
          "type": "number"
        },
        "age_group_relevance": {
          "default": "all",
          "enum": [
            "neonatal",
            "pediatric",
            "adult",
            "all"
          ],
          "title": "Age Group Relevance",
          "type": "string"
        },
        "disease_name": {
          "anyOf": [
            {
              "maxLength": 1000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Disease Name"
        },
        "notes": {
          "anyOf": [
            {
              "maxLength": 4000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Notes"
        }
      },
      "required": [
        "gene_symbol"
      ],
      "title": "CustomGene",
      "type": "object"
    },
    "Demographics": {
      "additionalProperties": false,
      "properties": {
        "sex": {
          "enum": [
            "male",
            "female",
            "unknown"
          ],
          "title": "Sex",
          "type": "string"
        },
        "age_years": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Age Years"
        },
        "age_days": {
          "anyOf": [
            {
              "maximum": 365,
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Age Days"
        },
        "age_group": {
          "anyOf": [
            {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Age Group"
        }
      },
      "required": [
        "sex"
      ],
      "title": "Demographics",
      "type": "object"
    },
    "Ethnicity": {
      "additionalProperties": false,
      "properties": {
        "primary": {
          "maxLength": 200,
          "minLength": 1,
          "title": "Primary",
          "type": "string"
        },
        "populations": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "maxItems": 64,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Populations"
        },
        "note": {
          "anyOf": [
            {
              "maxLength": 4000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Note"
        }
      },
      "required": [
        "primary"
      ],
      "title": "Ethnicity",
      "type": "object"
    },
    "FamilyHistory": {
      "additionalProperties": false,
      "properties": {
        "has_affected_relatives": {
          "default": false,
          "title": "Has Affected Relatives",
          "type": "boolean"
        },
        "consanguinity": {
          "default": false,
          "title": "Consanguinity",
          "type": "boolean"
        },
        "details": {
          "anyOf": [
            {
              "maxLength": 10000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Details"
        }
      },
      "title": "FamilyHistory",
      "type": "object"
    },
    "Modules": {
      "additionalProperties": false,
      "properties": {
        "enable_screening": {
          "default": false,
          "title": "Enable Screening",
          "type": "boolean"
        },
        "enable_literature": {
          "default": false,
          "title": "Enable Literature",
          "type": "boolean"
        }
      },
      "title": "Modules",
      "type": "object"
    },
    "PartnerClinicalProfile": {
      "additionalProperties": false,
      "properties": {
        "demographics": {
          "$ref": "#/$defs/Demographics"
        },
        "modules": {
          "$ref": "#/$defs/Modules"
        },
        "ethnicity": {
          "anyOf": [
            {
              "$ref": "#/$defs/Ethnicity"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "clinical_context": {
          "anyOf": [
            {
              "$ref": "#/$defs/ClinicalContext"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "reproductive": {
          "anyOf": [
            {
              "$ref": "#/$defs/Reproductive"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "sample_info": {
          "anyOf": [
            {
              "$ref": "#/$defs/SampleInfo"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "consent": {
          "anyOf": [
            {
              "$ref": "#/$defs/Consent"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "phenotype": {
          "$ref": "#/$defs/Phenotype"
        },
        "panel_ids": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "maxItems": 64,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Panel Ids"
        },
        "custom_genes": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/CustomGene"
              },
              "maxItems": 500,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Custom Genes"
        },
        "language": {
          "const": "en",
          "default": "en",
          "title": "Language",
          "type": "string"
        },
        "filtering_preset": {
          "default": "strict",
          "enum": [
            "strict",
            "balanced",
            "permissive"
          ],
          "title": "Filtering Preset",
          "type": "string"
        }
      },
      "required": [
        "demographics"
      ],
      "title": "PartnerClinicalProfile",
      "type": "object"
    },
    "Phenotype": {
      "additionalProperties": false,
      "properties": {
        "hpo_ids": {
          "items": {
            "type": "string"
          },
          "maxItems": 200,
          "title": "Hpo Ids",
          "type": "array"
        },
        "clinical_notes": {
          "anyOf": [
            {
              "maxLength": 20000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Clinical Notes"
        }
      },
      "title": "Phenotype",
      "type": "object"
    },
    "Reproductive": {
      "additionalProperties": false,
      "properties": {
        "is_pregnant": {
          "default": false,
          "title": "Is Pregnant",
          "type": "boolean"
        },
        "gestational_age_weeks": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gestational Age Weeks"
        },
        "family_planning": {
          "default": false,
          "title": "Family Planning",
          "type": "boolean"
        }
      },
      "title": "Reproductive",
      "type": "object"
    },
    "S3ObjectInput": {
      "additionalProperties": false,
      "properties": {
        "kind": {
          "const": "s3_object",
          "title": "Kind",
          "type": "string"
        },
        "connection_id": {
          "format": "uuid",
          "title": "Connection Id",
          "type": "string"
        },
        "bucket": {
          "maxLength": 255,
          "minLength": 3,
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]+$",
          "title": "Bucket",
          "type": "string"
        },
        "key": {
          "maxLength": 1024,
          "minLength": 1,
          "title": "Key",
          "type": "string"
        },
        "version_id": {
          "maxLength": 2048,
          "minLength": 1,
          "title": "Version Id",
          "type": "string"
        }
      },
      "required": [
        "kind",
        "connection_id",
        "bucket",
        "key",
        "version_id"
      ],
      "title": "S3ObjectInput",
      "type": "object"
    },
    "SampleInfo": {
      "additionalProperties": false,
      "properties": {
        "sample_type": {
          "anyOf": [
            {
              "const": "singleton",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Sample Type"
        },
        "has_parental_samples": {
          "default": false,
          "title": "Has Parental Samples",
          "type": "boolean"
        },
        "has_affected_sibling": {
          "default": false,
          "title": "Has Affected Sibling",
          "type": "boolean"
        }
      },
      "title": "SampleInfo",
      "type": "object"
    },
    "SequencingInput": {
      "additionalProperties": false,
      "properties": {
        "kind": {
          "const": "s3_sequencing",
          "title": "Kind",
          "type": "string"
        },
        "input_type": {
          "enum": [
            "FASTQ",
            "BAM",
            "CRAM"
          ],
          "title": "Input Type",
          "type": "string"
        },
        "connection_id": {
          "format": "uuid",
          "title": "Connection Id",
          "type": "string"
        },
        "objects": {
          "items": {
            "$ref": "#/$defs/SequencingObject"
          },
          "maxItems": 2,
          "minItems": 1,
          "title": "Objects",
          "type": "array"
        }
      },
      "required": [
        "kind",
        "input_type",
        "connection_id",
        "objects"
      ],
      "title": "SequencingInput",
      "type": "object"
    },
    "SequencingObject": {
      "additionalProperties": false,
      "properties": {
        "role": {
          "enum": [
            "R1",
            "R2",
            "ALIGNMENT"
          ],
          "title": "Role",
          "type": "string"
        },
        "bucket": {
          "maxLength": 255,
          "minLength": 3,
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]+$",
          "title": "Bucket",
          "type": "string"
        },
        "key": {
          "maxLength": 1024,
          "minLength": 1,
          "title": "Key",
          "type": "string"
        },
        "version_id": {
          "maxLength": 2048,
          "minLength": 1,
          "title": "Version Id",
          "type": "string"
        }
      },
      "required": [
        "role",
        "bucket",
        "key",
        "version_id"
      ],
      "title": "SequencingObject",
      "type": "object"
    },
    "SequencingSample": {
      "additionalProperties": false,
      "properties": {
        "sample_id": {
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$",
          "title": "Sample Id",
          "type": "string"
        },
        "platform": {
          "const": "ILLUMINA",
          "title": "Platform",
          "type": "string"
        },
        "assay_type": {
          "enum": [
            "WES",
            "WGS"
          ],
          "title": "Assay Type",
          "type": "string"
        },
        "read_length": {
          "exclusiveMinimum": 0,
          "maximum": 1000,
          "title": "Read Length",
          "type": "integer"
        },
        "library_protocol": {
          "maxLength": 256,
          "minLength": 1,
          "title": "Library Protocol",
          "type": "string"
        },
        "sequencer": {
          "maxLength": 128,
          "minLength": 1,
          "title": "Sequencer",
          "type": "string"
        },
        "expected_x_ploidy": {
          "anyOf": [
            {
              "maximum": 2,
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Expected X Ploidy"
        }
      },
      "required": [
        "sample_id",
        "platform",
        "assay_type",
        "read_length",
        "library_protocol",
        "sequencer"
      ],
      "title": "SequencingSample",
      "type": "object"
    },
    "SequencingSettings": {
      "additionalProperties": false,
      "properties": {
        "sample": {
          "$ref": "#/$defs/SequencingSample"
        },
        "release_id": {
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$",
          "title": "Release Id",
          "type": "string"
        },
        "reference_id": {
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$",
          "title": "Reference Id",
          "type": "string"
        },
        "caller_selection": {
          "default": "default",
          "enum": [
            "default",
            "deepvariant",
            "gatk"
          ],
          "title": "Caller Selection",
          "type": "string"
        }
      },
      "required": [
        "sample",
        "release_id",
        "reference_id"
      ],
      "title": "SequencingSettings",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "context_binding_id": {
      "format": "uuid",
      "title": "Context Binding Id",
      "type": "string"
    },
    "profile": {
      "enum": [
        "singleton-germline-v1",
        "singleton-germline-v2",
        "singleton-sequencing-v1"
      ],
      "title": "Profile",
      "type": "string"
    },
    "external_reference": {
      "anyOf": [
        {
          "maxLength": 200,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "External Reference"
    },
    "input": {
      "discriminator": {
        "mapping": {
          "s3_object": "#/$defs/S3ObjectInput",
          "s3_sequencing": "#/$defs/SequencingInput"
        },
        "propertyName": "kind"
      },
      "oneOf": [
        {
          "$ref": "#/$defs/S3ObjectInput"
        },
        {
          "$ref": "#/$defs/SequencingInput"
        }
      ],
      "title": "Input"
    },
    "sequencing": {
      "anyOf": [
        {
          "$ref": "#/$defs/SequencingSettings"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "clinical": {
      "$ref": "#/$defs/ClinicalInputs"
    },
    "clinical_profile": {
      "anyOf": [
        {
          "$ref": "#/$defs/PartnerClinicalProfile"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "outputs": {
      "items": {
        "enum": [
          "json",
          "pdf"
        ],
        "type": "string"
      },
      "maxItems": 2,
      "minItems": 1,
      "title": "Outputs",
      "type": "array"
    },
    "max_cost_units": {
      "maximum": 9223372036854775807,
      "minimum": 0,
      "title": "Max Cost Units",
      "type": "integer"
    }
  },
  "required": [
    "context_binding_id",
    "profile",
    "input",
    "max_cost_units"
  ],
  "title": "CreatePartnerAnalysis",
  "type": "object"
}
