<commit_before>{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "http://epigenomesportal.ca/schemas/sample.json",
    "title": "IHEC Data Hub Sample schema",
    "description": "The IHEC Data Hub Sample schema covers all metadata requested by IHEC Metadata Standards, as specified here: https://github.com/IHEC/ihec-metadata/blob/master/specs/Ihec_metadata_specification.md",
    "type" : "object",

    "properties": {
        "sample_ontology_curie" : {"type": "array", "items": {"type": "string", "pattern": "^(?!http|https|www)([a-z]*):[A-Za-z0-9]*", "description": "(Ontology: EFO) links to sample ontology information."}},
        "disease_ontology_curie" : {"type": "array", "items": {"type": "string", "pattern": "^(?!http|https|www)([a-z]*):[A-Za-z0-9]*", "description": "(Ontology: NCIM) links to sample disease ontology information. This property reflects the disease for this particular sample, not for the donor health condition. The NCImetathesaurus term C0277545 “Disease type AND/OR category unknown” should be used for unknown diseases. Phenotypes associated with the disease should be submitted as DISEASE_ONTOLOGY_CURIEs (if available) or in the free form DISEASE attribute. For samples without any known disease, use the NCImetathesaurus C0549184 term 'None'. If dealing with a rare disease consider identifiability issues."}},
        "disease" : {"type": "string", "description": "Free form field for more specific sample disease information. This property reflects the disease for this particular sample, not for the donor health condition. If dealing with a rare disease consider identifiability issues."},
        "biomaterial_provider" : {"type": "string", "description": "The name of the company, laboratory or person that provided the biological material."},
        "biomaterial_type" : {"type": "string", "enum":["Cell Line", "Primary Cell", "Primary Cell Culture", "Primary Tissue"], "description": ""},
        "treatment" : {"type": "string", "description": "Any artificial modification (differentiation, activation, genome editing, etc)."},
        "biological_replicates": {"type": "array", "items": {"type": "string"}, "description": "List of biological replicate sample accessions"}
    },

    "required": ["sample_ontology_curie", "disease", "disease_ontology_curie", "biomaterial_type"],

    "allOf": [
    {"if": {
      "properties": {
        "biomaterial_type": {"const": "Cell Line"}
      },
      "required": ["biomaterial_type"]
    },
    "then": {
      "properties": {
        "line" : {"type": "string", "description": "The name of the cell line."},
        "lineage" : {"type": "string", "description": "The developmental lineage to which the cell line belongs."},
        "differentiation_stage" : {"type": "string", "description": "The stage in cell differentiation to which the cell line belongs."},
        "differentiation_method" : {"type": "string", "description": "The protocol used to differentiation the cell line."},
        "passage" : {"type": "string", "description": "The number of times the cell line has been re-plated and allowed to grow back to confluency or to some maximum density if using suspension cultures."},
        "medium" : {"type": "string", "description": "The medium in which the cell line has been grown."},
        "sex" : {"type": "string", "enum": ["Male", "Female", "Unknown", "Mixed"], "description": "'Male', 'Female', 'Unknown', or 'Mixed' for pooled samples."},
        "batch" : {"type": "string", "description": "The batch from which the cell line is derived. Primarily applicable to initial H1 cell line batches. NA if not applicable."}
      },
        "required": ["line", "lineage", "differentiation_stage", "medium", "sex"]
      }
    },
    {
    "if": {
      "properties": {
        "biomaterial_type": {"const": "Primary Cell"}
      },
      "required": ["biomaterial_type"]
    },
    "then": {
      "properties": {
        "origin_sample_ontology_curie" : {"type": "array", "items": {{"type": "string", "pattern": "^(?!http|https|www)([a-z]*):[A-Za-z0-9]*", "description": "(Ontology: UBERON) links to the tissue from which sample was extracted."}},
        "origin_sample" : {"type": "string", "description": "Description of the origin tissue from which sample was extracted."},
        "cell_type" : {"type": "string", "description": "The type of cell."},
        "markers" : {"type": "string", "description": "Markers used to isolate and identify the cell type."},
        "passage_if_expanded" : {"type": "string", "description": "If the primary cell has been expanded, the number of times the primary cell has been re-plated and allowed to grow back to confluency or to some maximum density if using suspension cultures. NA if no expansion."}
      },
        "required": ["cell_type"],
        "allOf": [{ "$ref": "file:../schemas/json/sample.json#/definitions/donor" }]
     }
    },
    {"if": {
      "properties": {
        "biomaterial_type": {"const": "Primary Cell Culture"}
      },
      "required": ["biomaterial_type"]
    },
    "then": {
      "properties": {
        "origin_sample_ontology_curie" : {"type": "array", "items": {"type": "string", "pattern": "^(?!http|https|www)([a-z]*):[A-Za-z0-9]*", "description": "(Ontology: UBERON) links to the tissue from which sample was extracted."}},
        "origin_sample" : {"type": "string", "description": "Description of the origin tissue from which sample was extracted."},
        "cell_type" : {"type": "string", "description": ""},
        "markers" : {"type": "string", "description": "Markers used to isolate and identify the cell type."},
        "culture_conditions" : {"type": "string", "description": "The conditions under which the primary cell was cultured."},
        "passage_if_expanded" : {"type": "string", "description": "If the primary cell culture has been expanded, the number of times the primary cell culture has been re-plated and allowed to grow back to confluency or to some maximum density if using suspension cultures. NA if no expansion."}<commit_msg>Correcting typo in json schema<commit_after>{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "http://epigenomesportal.ca/schemas/sample.json",
    "title": "IHEC Data Hub Sample schema",
    "description": "The IHEC Data Hub Sample schema covers all metadata requested by IHEC Metadata Standards, as specified here: https://github.com/IHEC/ihec-metadata/blob/master/specs/Ihec_metadata_specification.md",
    "type" : "object",

    "properties": {
        "sample_ontology_curie" : {"type": "array", "items": {"type": "string", "pattern": "^(?!http|https|www)([a-z]*):[A-Za-z0-9]*", "description": "(Ontology: EFO) links to sample ontology information."}},
        "disease_ontology_curie" : {"type": "array", "items": {"type": "string", "pattern": "^(?!http|https|www)([a-z]*):[A-Za-z0-9]*", "description": "(Ontology: NCIM) links to sample disease ontology information. This property reflects the disease for this particular sample, not for the donor health condition. The NCImetathesaurus term C0277545 “Disease type AND/OR category unknown” should be used for unknown diseases. Phenotypes associated with the disease should be submitted as DISEASE_ONTOLOGY_CURIEs (if available) or in the free form DISEASE attribute. For samples without any known disease, use the NCImetathesaurus C0549184 term 'None'. If dealing with a rare disease consider identifiability issues."}},
        "disease" : {"type": "string", "description": "Free form field for more specific sample disease information. This property reflects the disease for this particular sample, not for the donor health condition. If dealing with a rare disease consider identifiability issues."},
        "biomaterial_provider" : {"type": "string", "description": "The name of the company, laboratory or person that provided the biological material."},
        "biomaterial_type" : {"type": "string", "enum":["Cell Line", "Primary Cell", "Primary Cell Culture", "Primary Tissue"], "description": ""},
        "treatment" : {"type": "string", "description": "Any artificial modification (differentiation, activation, genome editing, etc)."},
        "biological_replicates": {"type": "array", "items": {"type": "string"}, "description": "List of biological replicate sample accessions"}
    },

    "required": ["sample_ontology_curie", "disease", "disease_ontology_curie", "biomaterial_type"],

    "allOf": [
    {"if": {
      "properties": {
        "biomaterial_type": {"const": "Cell Line"}
      },
      "required": ["biomaterial_type"]
    },
    "then": {
      "properties": {
        "line" : {"type": "string", "description": "The name of the cell line."},
        "lineage" : {"type": "string", "description": "The developmental lineage to which the cell line belongs."},
        "differentiation_stage" : {"type": "string", "description": "The stage in cell differentiation to which the cell line belongs."},
        "differentiation_method" : {"type": "string", "description": "The protocol used to differentiation the cell line."},
        "passage" : {"type": "string", "description": "The number of times the cell line has been re-plated and allowed to grow back to confluency or to some maximum density if using suspension cultures."},
        "medium" : {"type": "string", "description": "The medium in which the cell line has been grown."},
        "sex" : {"type": "string", "enum": ["Male", "Female", "Unknown", "Mixed"], "description": "'Male', 'Female', 'Unknown', or 'Mixed' for pooled samples."},
        "batch" : {"type": "string", "description": "The batch from which the cell line is derived. Primarily applicable to initial H1 cell line batches. NA if not applicable."}
      },
        "required": ["line", "lineage", "differentiation_stage", "medium", "sex"]
      }
    },
    {
    "if": {
      "properties": {
        "biomaterial_type": {"const": "Primary Cell"}
      },
      "required": ["biomaterial_type"]
    },
    "then": {
      "properties": {
        "origin_sample_ontology_curie" : {"type": "array", "items": {"type": "string", "pattern": "^(?!http|https|www)([a-z]*):[A-Za-z0-9]*", "description": "(Ontology: UBERON) links to the tissue from which sample was extracted."}},
        "origin_sample" : {"type": "string", "description": "Description of the origin tissue from which sample was extracted."},
        "cell_type" : {"type": "string", "description": "The type of cell."},
        "markers" : {"type": "string", "description": "Markers used to isolate and identify the cell type."},
        "passage_if_expanded" : {"type": "string", "description": "If the primary cell has been expanded, the number of times the primary cell has been re-plated and allowed to grow back to confluency or to some maximum density if using suspension cultures. NA if no expansion."}
      },
        "required": ["cell_type"],
        "allOf": [{ "$ref": "file:../schemas/json/sample.json#/definitions/donor" }]
     }
    },
    {"if": {
      "properties": {
        "biomaterial_type": {"const": "Primary Cell Culture"}
      },
      "required": ["biomaterial_type"]
    },
    "then": {
      "properties": {
        "origin_sample_ontology_curie" : {"type": "array", "items": {"type": "string", "pattern": "^(?!http|https|www)([a-z]*):[A-Za-z0-9]*", "description": "(Ontology: UBERON) links to the tissue from which sample was extracted."}},
        "origin_sample" : {"type": "string", "description": "Description of the origin tissue from which sample was extracted."},
        "cell_type" : {"type": "string", "description": ""},
        "markers" : {"type": "string", "description": "Markers used to isolate and identify the cell type."},
        "culture_conditions" : {"type": "string", "description": "The conditions under which the primary cell was cultured."},
        "passage_if_expanded" : {"type": "string", "description": "If the primary cell culture has been expanded, the number of times the primary cell culture has been re-plated and allowed to grow back to confluency or to some maximum density if using suspension cultures. NA if no expansion."}
{'fraction_non_alphanumeric': 0.16034482758620688, 'fraction_numerical': 0.004105090311986864, 'mean_word_length': 4.081768877763872, 'pattern_counts': {'":': 202, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1040631', 'n_tokens_mistral': 3511, 'n_tokens_neox': 3374, 'n_words': 1233}