{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/helena-bio/json-schema/helena-bio-create-family-from-joint-vcf-request-schema.json",
  "title": "CreateFamilyFromJointVcfRequest",
  "description": "POST /api/v1/families/from-joint-vcf request body.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/helena-bio-families-api-openapi.yml#/components/schemas/CreateFamilyFromJointVcfRequest",
  "properties": {
    "vcf_file_path": {
      "type": "string",
      "title": "Vcf File Path"
    },
    "family_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Family Name"
    },
    "family_notes": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Family Notes"
    },
    "inheritance_hypothesis": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Inheritance Hypothesis"
    },
    "sample_role_mapping": {
      "items": {
        "$ref": "#/$defs/JointVcfSampleMapping"
      },
      "type": "array",
      "title": "Sample Role Mapping"
    },
    "staging_session_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Staging Session Id"
    },
    "filtering_preset": {
      "type": "string",
      "title": "Filtering Preset",
      "description": "Quality filtering preset. Controls which low-quality variants are removed before annotation. Options: strict (default, quality>=30/depth>=20/GQ>=30), balanced (20/15/20), permissive (10/10/10), custom.",
      "default": "strict"
    }
  },
  "type": "object",
  "required": [
    "vcf_file_path",
    "sample_role_mapping"
  ],
  "$defs": {
    "JointVcfSampleMapping": {
      "properties": {
        "sample_name": {
          "type": "string",
          "title": "Sample Name"
        },
        "family_role": {
          "type": "string",
          "title": "Family Role"
        },
        "affected_status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Affected Status"
        },
        "sex": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sex"
        },
        "clinical_profile": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Clinical Profile"
        }
      },
      "type": "object",
      "required": [
        "sample_name",
        "family_role"
      ],
      "title": "JointVcfSampleMapping",
      "description": "Single sample to role mapping for joint VCF family creation.\n\nHELIX-CR-2026-FAMILY-FRONTEND-001 Phase 3-B: added sex field for\ninheritance pattern analysis (X-linked, hemizygous calling, mtDNA).\n\nHELIX-CR-2026-FAMILY-CLINICAL-PIPELINE-ARCHITECTURE-001: added\nclinical_profile for proband HPO transport from /create/trio flow.\nFrontend supplies a non-None dict only on the proband mapping;\nparent mappings carry None. SO writes NDJSON to disk before dispatch\nwhen this field is present in the corresponding session spec.\nDict matches ClinicalProfileRequest schema shape."
    }
  }
}