{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://aptatlas.org/data/scoring.schema.json",
  "title": "Scores",
  "description": "Ten scored dimensions and each platform's scores on a 1 to 5 scale. Scores are the authors' assessment of published literature.",
  "type": "object",
  "required": [
    "schema",
    "name",
    "title",
    "version",
    "last_updated",
    "licence",
    "licence_url",
    "citation",
    "archive_doi",
    "third_party",
    "provenance",
    "class_balance_provenance",
    "lower_confidence",
    "data"
  ],
  "additionalProperties": false,
  "properties": {
    "schema": {
      "type": "string",
      "description": "URL of this schema for this release"
    },
    "name": {
      "const": "scoring"
    },
    "title": {
      "type": "string"
    },
    "version": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+$",
      "description": "APT release"
    },
    "last_updated": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "licence": {
      "const": "CC-BY-4.0"
    },
    "licence_url": {
      "type": "string"
    },
    "citation": {
      "type": "string"
    },
    "archive_doi": {
      "type": "string"
    },
    "third_party": {
      "type": "array",
      "description": "Sources this file draws on that carry their own licence.",
      "items": {
        "type": "object",
        "required": [
          "name",
          "licence",
          "url",
          "relationship",
          "note"
        ],
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "licence": {
            "type": "string",
            "description": "SPDX identifier"
          },
          "url": {
            "type": "string"
          },
          "relationship": {
            "enum": [
              "source",
              "derived"
            ]
          },
          "note": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "JSONPath, relative to data, of fields derived from this source"
          },
          "fields_derived_in_part": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "JSONPath, relative to data, of fields computed partly from the fields above"
          }
        }
      }
    },
    "provenance": {
      "type": "string",
      "description": "Who made the scores"
    },
    "class_balance_provenance": {
      "type": "string",
      "description": "How the Help Me Combine class_balance axis is computed"
    },
    "lower_confidence": {
      "type": "object",
      "required": [
        "rule",
        "platforms"
      ],
      "additionalProperties": false,
      "properties": {
        "rule": {
          "type": "string"
        },
        "platforms": {
          "type": "array",
          "items": {
            "enum": [
              "olink-explore-ht",
              "illumina-protein-prep",
              "nulisa",
              "nomic-omni",
              "seer-proteograph",
              "biognosys-truediscovery"
            ]
          }
        }
      }
    },
    "data": {
      "type": "object",
      "properties": {
        "dimensions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "shortLabel": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "label",
              "description",
              "shortLabel"
            ],
            "additionalProperties": false
          }
        },
        "scores": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "proteome_coverage": {
                "type": "integer"
              },
              "precision": {
                "type": "integer"
              },
              "specificity": {
                "type": "integer"
              },
              "sensitivity": {
                "type": "integer"
              },
              "cost_efficiency": {
                "type": "integer"
              },
              "throughput": {
                "type": "integer"
              },
              "quantification_type": {
                "type": "integer"
              },
              "sample_flexibility": {
                "type": "integer"
              },
              "evidence_depth": {
                "type": "integer"
              },
              "pqtl_accuracy": {
                "type": "integer"
              }
            },
            "required": [
              "proteome_coverage",
              "precision",
              "specificity",
              "sensitivity",
              "cost_efficiency",
              "throughput",
              "quantification_type",
              "sample_flexibility",
              "evidence_depth",
              "pqtl_accuracy"
            ],
            "additionalProperties": false
          }
        },
        "defaultWeights": {
          "type": "object",
          "properties": {
            "proteome_coverage": {
              "type": "integer"
            },
            "precision": {
              "type": "integer"
            },
            "specificity": {
              "type": "integer"
            },
            "sensitivity": {
              "type": "integer"
            },
            "cost_efficiency": {
              "type": "integer"
            },
            "throughput": {
              "type": "integer"
            },
            "quantification_type": {
              "type": "integer"
            },
            "sample_flexibility": {
              "type": "integer"
            },
            "evidence_depth": {
              "type": "integer"
            },
            "pqtl_accuracy": {
              "type": "integer"
            }
          },
          "required": [
            "proteome_coverage",
            "precision",
            "specificity",
            "sensitivity",
            "cost_efficiency",
            "throughput",
            "quantification_type",
            "sample_flexibility",
            "evidence_depth",
            "pqtl_accuracy"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "dimensions",
        "scores",
        "defaultWeights"
      ],
      "additionalProperties": false
    }
  }
}
