<commit_before><?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/phisSchema" xmlns:x="http://www.example.org/phisSchema">

	<!-- Change image_type to 3 fields as in David's document -->
	<!-- add production center, source project name, source project url, analysis center -->
	
	<!--  Type declaration -->
	<simpleType name="Sex"> <!-- Could use Caro for sexes -->
		<restriction base="string">
			<enumeration value="male"></enumeration>
			<enumeration value="female"></enumeration>
			<enumeration value="unknown"></enumeration>
			<enumeration value="unsexed"></enumeration>
		</restriction>
	</simpleType>

	<simpleType name="Zygosity">
		<restriction base="string">
			<enumeration value="homozygous"></enumeration>
			<enumeration value="heterozygous"></enumeration>
			<enumeration value="hemizygous"></enumeration>
			<enumeration value="wild type"></enumeration>
			<enumeration value="unspecified"></enumeration>
		</restriction>
	</simpleType>
	<complexType name="ZygArray">
		<sequence>
			<element name="el" type="x:Zygosity" minOccurs="0" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<simpleType name="SampleType">
		<restriction base="string">
			<enumeration value="mutant"></enumeration>
			<enumeration value="wild type"></enumeration>
		</restriction>
	</simpleType>

	<simpleType name="ImageType">
		<restriction base="string">
			<enumeration value="phenotype/anatomy"></enumeration>
			<enumeration value="expression"></enumeration>
		</restriction>
	</simpleType>
	<complexType name="ImageTypeArray">
		<sequence>
			<element name="el" type="x:ImageType" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<simpleType name="PositiveInt">
		<restriction base="int">
			<minInclusive value="1" />
		</restriction>
	</simpleType>
	<complexType name="PositiveIntArray">
		<sequence>
			<element name="el" type="x:PositiveInt" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<complexType name="IntArray">
		<sequence>
			<element name="el" type="int" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<complexType name="FloatArray">
		<sequence>
			<element name="el" type="float" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<complexType name="StringArray">
		<sequence>
			<element name="el" type="string" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<simpleType name="Percentage">
		<restriction base="float">
			<minInclusive value="0" />
			<maxInclusive value="100" />
		</restriction>
	</simpleType>
	<complexType name="PercentArray">
		<sequence>
			<element name="el" type="x:Percentage" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<complexType name="Dimensions"> <!-- in pixels -->
		<all>
			<element name="image_depth" type="x:PositiveInt" minOccurs="0" maxOccurs="1" />
			<element name="image_height" type="x:PositiveInt" minOccurs="1" maxOccurs="1" />
			<element name="image_width" type="x:PositiveInt" minOccurs="1" maxOccurs="1" />
		</all>
	</complexType>

	<complexType name="Coordinates"> <!-- in % relative to the image dimensions -->
		<all>
			<element name="z_coordinates" type="x:PercentArray" minOccurs="0" maxOccurs="1" />
			<element name="y_coordinates" type="x:PercentArray" minOccurs="1" maxOccurs="1" />
			<element name="x_coordinates" type="x:PercentArray" minOccurs="1" maxOccurs="1" />
		</all>
	</complexType>

	<simpleType name="Strand">
		<restriction base="string">
			<enumeration value="+"></enumeration>
			<enumeration value="-"></enumeration>
		</restriction>
	</simpleType>

	<complexType name="GenomicLocation">
		<all>
			<element name="start_pos" type="long" minOccurs="0" maxOccurs="1" />
			<element name="end_pos" type="long" minOccurs="0" maxOccurs="1" />
			<element name="chromosone" type="string" minOccurs="0" maxOccurs="1" />
			<element name="strand" type="x:Strand" minOccurs="0" maxOccurs="1" />
		</all>
	</complexType>
	<complexType name="GenomicLocationArray">
		<sequence>
			<element name="el" type="x:GenomicLocation" minOccurs="0" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<complexType name="ImageDescription">
		<all>
			<element name="image_url" type="string" minOccurs="1" maxOccurs="1" />
			<element name="image_context_url" type="string" minOccurs="0" maxOccurs="1" /> <!-- URL linking back to the image page on the original website, if they have single image pages -->
			<element name="image_dimensions" type="x:Dimensions" minOccurs="1" maxOccurs="1" />
			<element name="machine" type="string" minOccurs="0" maxOccurs="1" />
			<element name="image_generated_by" type="x:Link" minOccurs="1" /> <!-- Lab/center/institute that produced the images -->
			<element name="image_processed_by" type="x:LinkArray" minOccurs="0" />
			<element name="organism_generated_by" type="x:Link" minOccurs="1" maxOccurs="1" /> <!-- Lab/center/institute that produced the organism -->
			<element name="host" type="x:Link" minOccurs="1" maxOccurs="1" /> <!-- URL to the website where all the images are accessible -->
			<element name="imaging_method" type="x:AnnotationArray" minOccurs="0" maxOccurs="1" /> <!-- from Fbbi -->
			<element name="sample_preparation" type="x:AnnotationArray" minOccurs="0" maxOccurs="1" /> <!-- from Fbbi -->
			<element name="image_type" type="x:ImageTypeArray" minOccurs="1" maxOccurs="1" />
			<element name="sample_type" type="x:SampleType" minOccurs="1" maxOccurs="1" />
		</all>
	</complexType>

	<complexType name="Link">
		<all>
			<element name="display_name" type="string" minOccurs="1" maxOccurs="1" />
			<element name="url" type="string" minOccurs="0" maxOccurs="1" />
			<element name="details" type="string" minOccurs="0" maxOccurs="1" />
		</all>
	</complexType>
	<complexType name="LinkArray">
		<sequence>
			<element name="el" type="x:Link" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>


	<complexType name="Organism">
		<all>
			<element name="age" type="string" minOccurs="0" maxOccurs="1" />
			<element name="taxon" type="string" minOccurs="1" maxOccurs="1" /> <!--  example: Mus Musculus -->
			<element name="sex" type="x:Sex" minOccurs="0" maxOccurs="1" />
			<element name="ncbi_taxon_id" type="string" minOccurs="0" maxOccurs="1" />	<!-- example: NCBITaxon_862507 -->
			<element name="stage" type="x:OntologyTerm" minOccurs="0" maxOccurs="1" /> <!--  from a public developmental stage ontology i.e. from https://code.google.com/p/developmental-stage-ontologies/ -->
			<element name="organism_id" type="string" minOccurs="0" maxOccurs="1"/>
		</all>
	</complexType>

	<complexType name="OntologyTerm">
		<all>
			<element name="term_label" type="string" minOccurs="1" maxOccurs="1" />
			<element name="term_id" type="string" minOccurs="1" maxOccurs="1" /> <!-- OWL style, with underscores after namespace not colon -->
		</all>
	</complexType>
	<complexType name="OntologyTermArray">
		<sequence>
			<element name="el" type="x:OntologyTerm" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<simpleType name="AnnotationMode">
		<restriction base="string">
			<enumeration value="Manual"></enumeration>
			<enumeration value="Automated"></enumeration>
		</restriction>
	</simpleType>

	<complexType name="Annotation">
		<all minOccurs="1">
			<element name="ontology_term" type="x:OntologyTerm" minOccurs="0" maxOccurs="1" />
			<element name="annotation_freetext" type="string" minOccurs="0" maxOccurs="1" />
			<element name="annotation_mode" type="x:AnnotationMode" minOccurs="0" maxOccurs="1" />
		</all>
	</complexType>
	<complexType name="AnnotationArray">
		<sequence>
			<element name="el" type="x:Annotation" minOccurs="1" maxOccurs="unbounded" />
		</sequence><commit_msg>Lower case enum values for annotation mode.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/phisSchema" xmlns:x="http://www.example.org/phisSchema">

	<!-- Change image_type to 3 fields as in David's document -->
	<!-- add production center, source project name, source project url, analysis center -->
	
	<!--  Type declaration -->
	<simpleType name="Sex"> <!-- Could use Caro for sexes -->
		<restriction base="string">
			<enumeration value="male"></enumeration>
			<enumeration value="female"></enumeration>
			<enumeration value="unknown"></enumeration>
			<enumeration value="unsexed"></enumeration>
		</restriction>
	</simpleType>

	<simpleType name="Zygosity">
		<restriction base="string">
			<enumeration value="homozygous"></enumeration>
			<enumeration value="heterozygous"></enumeration>
			<enumeration value="hemizygous"></enumeration>
			<enumeration value="wild type"></enumeration>
			<enumeration value="unspecified"></enumeration>
		</restriction>
	</simpleType>
	<complexType name="ZygArray">
		<sequence>
			<element name="el" type="x:Zygosity" minOccurs="0" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<simpleType name="SampleType">
		<restriction base="string">
			<enumeration value="mutant"></enumeration>
			<enumeration value="wild type"></enumeration>
		</restriction>
	</simpleType>

	<simpleType name="ImageType">
		<restriction base="string">
			<enumeration value="phenotype/anatomy"></enumeration>
			<enumeration value="expression"></enumeration>
		</restriction>
	</simpleType>
	<complexType name="ImageTypeArray">
		<sequence>
			<element name="el" type="x:ImageType" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<simpleType name="PositiveInt">
		<restriction base="int">
			<minInclusive value="1" />
		</restriction>
	</simpleType>
	<complexType name="PositiveIntArray">
		<sequence>
			<element name="el" type="x:PositiveInt" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<complexType name="IntArray">
		<sequence>
			<element name="el" type="int" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<complexType name="FloatArray">
		<sequence>
			<element name="el" type="float" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<complexType name="StringArray">
		<sequence>
			<element name="el" type="string" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<simpleType name="Percentage">
		<restriction base="float">
			<minInclusive value="0" />
			<maxInclusive value="100" />
		</restriction>
	</simpleType>
	<complexType name="PercentArray">
		<sequence>
			<element name="el" type="x:Percentage" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<complexType name="Dimensions"> <!-- in pixels -->
		<all>
			<element name="image_depth" type="x:PositiveInt" minOccurs="0" maxOccurs="1" />
			<element name="image_height" type="x:PositiveInt" minOccurs="1" maxOccurs="1" />
			<element name="image_width" type="x:PositiveInt" minOccurs="1" maxOccurs="1" />
		</all>
	</complexType>

	<complexType name="Coordinates"> <!-- in % relative to the image dimensions -->
		<all>
			<element name="z_coordinates" type="x:PercentArray" minOccurs="0" maxOccurs="1" />
			<element name="y_coordinates" type="x:PercentArray" minOccurs="1" maxOccurs="1" />
			<element name="x_coordinates" type="x:PercentArray" minOccurs="1" maxOccurs="1" />
		</all>
	</complexType>

	<simpleType name="Strand">
		<restriction base="string">
			<enumeration value="+"></enumeration>
			<enumeration value="-"></enumeration>
		</restriction>
	</simpleType>

	<complexType name="GenomicLocation">
		<all>
			<element name="start_pos" type="long" minOccurs="0" maxOccurs="1" />
			<element name="end_pos" type="long" minOccurs="0" maxOccurs="1" />
			<element name="chromosone" type="string" minOccurs="0" maxOccurs="1" />
			<element name="strand" type="x:Strand" minOccurs="0" maxOccurs="1" />
		</all>
	</complexType>
	<complexType name="GenomicLocationArray">
		<sequence>
			<element name="el" type="x:GenomicLocation" minOccurs="0" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<complexType name="ImageDescription">
		<all>
			<element name="image_url" type="string" minOccurs="1" maxOccurs="1" />
			<element name="image_context_url" type="string" minOccurs="0" maxOccurs="1" /> <!-- URL linking back to the image page on the original website, if they have single image pages -->
			<element name="image_dimensions" type="x:Dimensions" minOccurs="0" maxOccurs="1" />
			<element name="machine" type="string" minOccurs="0" maxOccurs="1" />
			<element name="image_generated_by" type="x:Link" minOccurs="1" /> <!-- Lab/center/institute that produced the images -->
			<element name="image_processed_by" type="x:LinkArray" minOccurs="0" />
			<element name="organism_generated_by" type="x:Link" minOccurs="0" maxOccurs="1" /> <!-- Lab/center/institute that produced the organism -->
			<element name="host" type="x:Link" minOccurs="1" maxOccurs="1" /> <!-- URL to the website where all the images are accessible -->
			<element name="imaging_method" type="x:AnnotationArray" minOccurs="0" maxOccurs="1" /> <!-- from Fbbi -->
			<element name="sample_preparation" type="x:AnnotationArray" minOccurs="0" maxOccurs="1" /> <!-- from Fbbi -->
			<element name="image_type" type="x:ImageTypeArray" minOccurs="1" maxOccurs="1" />
			<element name="sample_type" type="x:SampleType" minOccurs="1" maxOccurs="1" />
		</all>
	</complexType>

	<complexType name="Link">
		<all>
			<element name="display_name" type="string" minOccurs="1" maxOccurs="1" />
			<element name="url" type="string" minOccurs="0" maxOccurs="1" />
			<element name="details" type="string" minOccurs="0" maxOccurs="1" />
		</all>
	</complexType>
	<complexType name="LinkArray">
		<sequence>
			<element name="el" type="x:Link" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>


	<complexType name="Organism">
		<all>
			<element name="age" type="string" minOccurs="0" maxOccurs="1" />
			<element name="taxon" type="string" minOccurs="1" maxOccurs="1" /> <!--  example: Mus Musculus -->
			<element name="sex" type="x:Sex" minOccurs="0" maxOccurs="1" />
			<element name="ncbi_taxon_id" type="string" minOccurs="0" maxOccurs="1" />	<!-- example: NCBITaxon_862507 -->
			<element name="stage" type="x:OntologyTerm" minOccurs="0" maxOccurs="1" /> <!--  from a public developmental stage ontology i.e. from https://code.google.com/p/developmental-stage-ontologies/ -->
			<element name="organism_id" type="string" minOccurs="0" maxOccurs="1"/>
		</all>
	</complexType>

	<complexType name="OntologyTerm">
		<all>
			<element name="term_label" type="string" minOccurs="1" maxOccurs="1" />
			<element name="term_id" type="string" minOccurs="1" maxOccurs="1" /> <!-- OWL style, with underscores after namespace not colon -->
		</all>
	</complexType>
	<complexType name="OntologyTermArray">
		<sequence>
			<element name="el" type="x:OntologyTerm" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
	</complexType>

	<simpleType name="AnnotationMode">
		<restriction base="string">
			<enumeration value="manual"></enumeration>
			<enumeration value="automated"></enumeration>
		</restriction>
	</simpleType>

	<complexType name="Annotation">
		<all minOccurs="1">
			<element name="ontology_term" type="x:OntologyTerm" minOccurs="0" maxOccurs="1" />
			<element name="annotation_freetext" type="string" minOccurs="0" maxOccurs="1" />
			<element name="annotation_mode" type="x:AnnotationMode" minOccurs="0" maxOccurs="1" />
		</all>
	</complexType>
	<complexType name="AnnotationArray">
		<sequence>
			<element name="el" type="x:Annotation" minOccurs="1" maxOccurs="unbounded" />
		</sequence>
{'fraction_non_alphanumeric': 0.1842508621790778, 'fraction_numerical': 0.01302848384212543, 'mean_word_length': 5.433442892358258, 'pattern_counts': {'":': 0, '<': 421, '<?xml version=': 2, '>': 421, 'https://': 2, 'lorem ipsum': 0, 'www.': 6, 'xml': 6}, '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': '660625', 'n_tokens_mistral': 5859, 'n_tokens_neox': 5212, 'n_words': 1051}