├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── check-pull-request.yaml │ ├── codespell.yml │ ├── doc_pages.yaml │ └── pypi-publish.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── docs ├── Makefile ├── _static │ └── .gitkeep ├── cli.rst ├── conf.py ├── index.rst ├── install.rst ├── introduction.rst ├── make.bat ├── metamodels │ └── index.rst └── packages │ ├── annotators.rst │ ├── generalizers.rst │ ├── importers.rst │ ├── index.rst │ └── utilities.rst ├── local └── README.md ├── notebooks └── images │ └── FRED.png ├── poetry.lock ├── pyproject.toml ├── schema_automator ├── __init__.py ├── annotators │ ├── __init__.py │ ├── curated_to_enums.py │ ├── enum_annotator.py │ ├── enums_to_curateable.py │ ├── jsonld_annotator.py │ ├── llm_annotator.py │ └── schema_annotator.py ├── cli.py ├── generalizers │ ├── __init__.py │ ├── csv_data_generalizer.py │ ├── generalizer.py │ ├── infer_model_from_rdftab.py │ ├── json_instance_generalizer.py │ ├── pandas_generalizer.py │ ├── rdf_data_generalizer.py │ └── toml_instance_generalizer.py ├── importers │ ├── __init__.py │ ├── cadsr_import_engine.py │ ├── dbml_import_engine.py │ ├── dosdp_import_engine.py │ ├── frictionless_import_engine.py │ ├── import_engine.py │ ├── jsonschema_import_engine.py │ ├── kwalify_import_engine.py │ ├── owl_import_engine.py │ ├── rdfs_import_engine.py │ ├── sql_import_engine.py │ └── tabular_import_engine.py ├── jsonschema │ └── __init__.py ├── metamodels │ ├── __init__.py │ ├── cadsr.py │ ├── cadsr.yaml │ ├── dosdp │ │ ├── __init__.py │ │ ├── dosdp_linkml.yaml │ │ └── model.py │ ├── frictionless.py │ ├── frictionless.yaml │ └── jsonschema.py └── utils │ ├── __init__.py │ ├── enums_pvs_tsv.py │ ├── instance_extractor.py │ ├── schema_extractor.py │ └── schemautils.py ├── target └── placeholder └── tests ├── __init__.py ├── outputs └── README.md ├── resources ├── BioMRLs-table.html ├── C2M2_datapackage.json ├── MPLEx.toml ├── NWT_wildfires_biophysical_2016.tsv ├── bio.obo ├── biobank-specimens.tsv ├── biopax-level3.db ├── biopax-level3.nt ├── biopax-level3.ofn ├── biopax-level3.owl ├── biopax3.yaml ├── biosamples.tsv ├── books.tsv ├── cadsr-cde-12137353.json ├── cadsr-cde-2179609.json ├── cadsr-cde-2721353.json ├── cadsr-cde-2724331.json ├── cadsr-cde-996.json ├── cadsr-swagger.json ├── dad-is-metadata.tsv ├── data-package.json ├── data_to_import.tsv ├── db-xrefs.yaml ├── dosdp │ ├── OMIM_disease_series_by_gene.yaml │ ├── OMIM_phenotypic_series.yaml │ ├── acquired.yaml │ ├── acute.yaml │ ├── adenocarcinoma.yaml │ ├── adenoma.yaml │ ├── adenosquamous_carcinoma.yaml │ ├── adult.yaml │ ├── allergic_form_of_disease.yaml │ ├── allergy.yaml │ ├── autoimmune.yaml │ ├── autoimmune_inflammation.yaml │ ├── autosomal_dominant.yaml │ ├── autosomal_recessive.yaml │ ├── basis_in_disruption_of_process.yaml │ ├── benign.yaml │ ├── benign_neoplasm.yaml │ ├── cancer.yaml │ ├── carcinoma.yaml │ ├── carcinoma_in_situ.yaml │ ├── childhood.yaml │ ├── chronic.yaml │ ├── congenital.yaml │ ├── consequence_of_infectious_disease.yaml │ ├── dependence_on_substance.yaml │ ├── disease_by_dysfunctional_structure.yaml │ ├── disease_series_by_gene.yaml │ ├── disease_series_by_gene_and_inheritance.yaml │ ├── disrupts_process.yaml │ ├── environmental_stimulus.yaml │ ├── genetic.yaml │ ├── hemangioma.yaml │ ├── hereditary.yaml │ ├── idiopathic.yaml │ ├── inborn_metabolic.yaml │ ├── inborn_metabolic_disrupts.yaml │ ├── infantile.yaml │ ├── infectious_disease_by_agent.yaml │ ├── infectious_inflammation.yaml │ ├── inflammatory_disease_by_site.yaml │ ├── inherited_susceptibility.yaml │ ├── isolated.yaml │ ├── juvenile.yaml │ ├── leiomyoma.yaml │ ├── leiomyosarcoma.yaml │ ├── lipoma.yaml │ ├── location.yaml │ ├── location_top.yaml │ ├── lymphoma.yaml │ ├── malignant.yaml │ ├── melanoma.yaml │ ├── meningioma.yaml │ ├── mitochondrial_subtype.yaml │ ├── mucoepidermoid_carcinoma.yaml │ ├── neoplasm.yaml │ ├── neoplasm_by_origin.yaml │ ├── neuroendocrine_neoplasm.yaml │ ├── neuroendocrine_neoplasm_grade1.yaml │ ├── nuclear_subtype.yaml │ ├── poisoning.yaml │ ├── postinfectious_disease.yaml │ ├── primary_infectious.yaml │ ├── rare.yaml │ ├── rare_genetic.yaml │ ├── realized_in_response_to_environmental_exposure.yaml │ ├── refractory.yaml │ ├── rhabdomyosarcoma.yaml │ ├── sarcoma.yaml │ ├── small_cell_carcinoma.yaml │ ├── specific_disease_by_disrupted_process.yaml │ ├── specific_disease_by_dysfunctional_structure.yaml │ ├── specific_infectious_disease_by_agent.yaml │ ├── specific_infectious_disease_by_location.yaml │ ├── specific_inflammatory_disease_by_site.yaml │ ├── squamous_cell_carcinoma.yaml │ ├── substance_abuse.yaml │ ├── susceptibility_by_gene.yaml │ ├── syndromic.yaml │ ├── vectorBorneDisease.yaml │ ├── x_linked.yaml │ └── y_linked.yaml ├── envo.tsv ├── foaf_snippet.ttl ├── hca │ ├── README.md │ ├── core │ │ ├── biomaterial │ │ │ └── biomaterial_core.json │ │ ├── file │ │ │ └── file_core.json │ │ ├── process │ │ │ └── process_core.json │ │ ├── project │ │ │ └── project_core.json │ │ └── protocol │ │ │ └── protocol_core.json │ ├── module │ │ ├── biomaterial │ │ │ ├── cell_morphology.json │ │ │ ├── death.json │ │ │ ├── familial_relationship.json │ │ │ ├── growth_conditions.json │ │ │ ├── human_specific.json │ │ │ ├── medical_history.json │ │ │ ├── mouse_specific.json │ │ │ ├── preservation_storage.json │ │ │ ├── state_of_specimen.json │ │ │ └── timecourse.json │ │ ├── ontology │ │ │ ├── biological_macromolecule_ontology.json │ │ │ ├── cell_cycle_ontology.json │ │ │ ├── cell_type_ontology.json │ │ │ ├── cellular_component_ontology.json │ │ │ ├── contributor_role_ontology.json │ │ │ ├── development_stage_ontology.json │ │ │ ├── disease_ontology.json │ │ │ ├── enrichment_ontology.json │ │ │ ├── ethnicity_ontology.json │ │ │ ├── file_content_ontology.json │ │ │ ├── file_format_ontology.json │ │ │ ├── instrument_ontology.json │ │ │ ├── length_unit_ontology.json │ │ │ ├── library_amplification_ontology.json │ │ │ ├── library_construction_ontology.json │ │ │ ├── mass_unit_ontology.json │ │ │ ├── microscopy_ontology.json │ │ │ ├── organ_ontology.json │ │ │ ├── organ_part_ontology.json │ │ │ ├── process_type_ontology.json │ │ │ ├── protocol_type_ontology.json │ │ │ ├── sequencing_ontology.json │ │ │ ├── species_ontology.json │ │ │ ├── strain_ontology.json │ │ │ ├── target_pathway_ontology.json │ │ │ ├── time_unit_ontology.json │ │ │ └── treatment_method_ontology.json │ │ ├── process │ │ │ ├── purchased_reagents.json │ │ │ └── sequencing │ │ │ │ ├── S10x.json │ │ │ │ ├── barcode.json │ │ │ │ ├── insdc_experiment.json │ │ │ │ └── plate_based_sequencing.json │ │ ├── project │ │ │ ├── contact.json │ │ │ ├── funder.json │ │ │ └── publication.json │ │ └── protocol │ │ │ ├── channel.json │ │ │ ├── matrix.json │ │ │ └── probe.json │ ├── property_migrations.json │ ├── system │ │ ├── file_descriptor.json │ │ ├── license.json │ │ ├── links.json │ │ └── provenance.json │ ├── type │ │ ├── biomaterial │ │ │ ├── cell_line.json │ │ │ ├── cell_suspension.json │ │ │ ├── donor_organism.json │ │ │ ├── imaged_specimen.json │ │ │ ├── organoid.json │ │ │ └── specimen_from_organism.json │ │ ├── file │ │ │ ├── analysis_file.json │ │ │ ├── image_file.json │ │ │ ├── reference_file.json │ │ │ ├── sequence_file.json │ │ │ └── supplementary_file.json │ │ ├── process │ │ │ ├── analysis │ │ │ │ └── analysis_process.json │ │ │ └── process.json │ │ ├── project │ │ │ └── project.json │ │ └── protocol │ │ │ ├── analysis │ │ │ └── analysis_protocol.json │ │ │ ├── biomaterial_collection │ │ │ ├── aggregate_generation_protocol.json │ │ │ ├── collection_protocol.json │ │ │ ├── differentiation_protocol.json │ │ │ ├── dissociation_protocol.json │ │ │ ├── enrichment_protocol.json │ │ │ ├── ipsc_induction_protocol.json │ │ │ └── treatment_protocol.json │ │ │ ├── imaging │ │ │ ├── imaging_preparation_protocol.json │ │ │ └── imaging_protocol.json │ │ │ ├── protocol.json │ │ │ └── sequencing │ │ │ ├── library_preparation_protocol.json │ │ │ └── sequencing_protocol.json │ ├── update_log.csv │ └── versions.json ├── hpo-fhir.json ├── jsonschema │ ├── dosdp_schema.yaml │ └── vrs.schema.json ├── kitchen_sink.yaml ├── mixs │ ├── air.yaml │ ├── built_environment.yaml │ ├── checklists.yaml │ ├── core.yaml │ ├── host_associated.yaml │ ├── human_associated.yaml │ ├── human_gut.yaml │ ├── human_oral.yaml │ ├── human_skin.yaml │ ├── human_vaginal.yaml │ ├── hydrocarbon_resources_cores.yaml │ ├── hydrocarbon_resources_fluids_swabs.yaml │ ├── microbial_mat_biofilm.yaml │ ├── miscellaneous_natural_or_artificial_environment.yaml │ ├── mixs.yaml │ ├── plant_associated.yaml │ ├── ranges.yaml │ ├── sediment.yaml │ ├── soil.yaml │ ├── terms.yaml │ ├── wastewater_sludge.yaml │ └── water.yaml ├── model_card.schema.json ├── neon-in-gold.json.gz ├── obo-pred-summary.tsv ├── obo_registry.context.jsonld ├── obo_registry.schema.json ├── omo-pred-summary.tsv ├── phenopackets │ ├── any.proto │ ├── api.proto │ ├── base.proto │ ├── biosample.proto │ ├── descriptor.proto │ ├── disease.proto │ ├── duration.proto │ ├── empty.proto │ ├── field_mask.proto │ ├── genome.proto │ ├── individual.proto │ ├── interpretation.proto │ ├── measurement.proto │ ├── medical_action.proto │ ├── meta_data.proto │ ├── mme.proto │ ├── pedigree.proto │ ├── phenopackets.proto │ ├── phenopackets.schema.json │ ├── phenotypic_feature.proto │ ├── plugin.proto │ ├── source_context.proto │ ├── struct.proto │ ├── timestamp.proto │ ├── type.proto │ ├── vrsatile.proto │ └── wrappers.proto ├── prov.ofn ├── prov.ttl ├── reproschema.ofn ├── reproschema.ttl ├── sample.tsv ├── sbol.ofn ├── schemaorg-robot.ofn ├── shacl.ofn ├── shacl.owl ├── shacl.ttl ├── so-mini.obo ├── sosa.ttl ├── ssn.ttl ├── synonymizer.yaml ├── test-anon-individual.ofn ├── test.kwalify.yaml ├── test2.kwalify.yaml ├── users.yaml ├── webmap_enums.tsv └── zfa-pred-summary.tsv ├── test_annotators ├── __init__.py ├── test_bioportal_schema_annotator.py ├── test_jsonld_annotator.py ├── test_lov_schema_annotator.py └── test_schema_enricher.py ├── test_cli └── __init__.py ├── test_generalizers ├── __init__.py ├── test_csv_data_generalizer.py ├── test_fk_inference.py ├── test_from_robot_template.py ├── test_json_data_generalizer.py ├── test_pandas_data_generalizer.py └── test_rdf_data_generalizer.py ├── test_importers ├── __init__.py ├── test_cadsr_importer.py ├── test_convert_shacl_owl_representation.py ├── test_dbml_importer.py ├── test_dosdp_importer.py ├── test_frictionless_importer.py ├── test_from_owl_schemaorg.py ├── test_jsonschema_importer.py ├── test_kwalify_importer.py ├── test_owl_importer.py ├── test_rdfs_importer.py ├── test_sql_importer.py └── test_tabular_importer.py └── test_utils ├── __init__.py └── test_instance_extractor.py /.gitattributes: -------------------------------------------------------------------------------- 1 | # Why in oaklib? -> https://github.com/linkml/schema-automator/pull/104#issuecomment-1307388416 2 | # This file may be removed after funowl is fixed to work with platform-specific line endings. 3 | 4 | # https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings 5 | # Declare files that will always have LF line endings on checkout. 6 | *.ofn text eol=lf 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior. 15 | 16 | **Expected behavior** 17 | A clear and concise description of what you expected to happen. 18 | 19 | **Code snippets** 20 | If applicable, code snippets to reproduce this behavior. 21 | 22 | **Additional context** 23 | Add any other context about the problem here. 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/codespell.yml: -------------------------------------------------------------------------------- 1 | # Codespell configuration is within pyproject.toml 2 | --- 3 | name: Codespell 4 | 5 | on: 6 | push: 7 | branches: [main] 8 | pull_request: 9 | branches: [main] 10 | 11 | permissions: 12 | contents: read 13 | 14 | jobs: 15 | codespell: 16 | name: Check for spelling errors 17 | runs-on: ubuntu-latest 18 | 19 | steps: 20 | - name: Checkout 21 | uses: actions/checkout@v4 22 | - name: Codespell 23 | uses: codespell-project/actions-codespell@v2 24 | -------------------------------------------------------------------------------- /.github/workflows/doc_pages.yaml: -------------------------------------------------------------------------------- 1 | name: Sphinx Documentation 2 | on: 3 | push: 4 | branches: [ main ] 5 | 6 | jobs: 7 | build-docs: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout 11 | uses: actions/checkout@main 12 | with: 13 | fetch-depth: 0 # otherwise, you will failed to push refs to dest repo 14 | 15 | - name: Set up Python 3. 16 | uses: actions/setup-python@v3 17 | with: 18 | python-version: 3.9 19 | 20 | - name: Install Poetry. 21 | uses: snok/install-poetry@v1.3 22 | 23 | - name: install 24 | run: poetry install -E docs 25 | 26 | - name: Build documentation. 27 | run: | 28 | mkdir gh-pages 29 | touch gh-pages/.nojekyll 30 | make all-docs 31 | cd docs/ 32 | poetry run sphinx-build -b html . _build 33 | cp -r _build/* ../gh-pages/ 34 | 35 | - name: Deploy documentation. 36 | if: ${{ github.event_name == 'push' }} 37 | uses: JamesIves/github-pages-deploy-action@v4.3.0 38 | with: 39 | branch: gh-pages 40 | force: true 41 | folder: gh-pages 42 | -------------------------------------------------------------------------------- /.github/workflows/pypi-publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish Python Package 2 | 3 | on: 4 | release: 5 | types: [created] 6 | 7 | jobs: 8 | build-n-publish: 9 | name: Build and publish Python 🐍 distributions 📦 to PyPI 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v3 14 | 15 | - name: Set up Python 16 | uses: actions/setup-python@v3 17 | with: 18 | python-version: 3.9 19 | 20 | - name: Install Poetry 21 | uses: snok/install-poetry@v1.3.1 22 | with: 23 | virtualenvs-create: true 24 | virtualenvs-in-project: true 25 | 26 | - name: Install dependencies 27 | run: poetry install --no-interaction 28 | 29 | - name: Build source and wheel archives 30 | run: | 31 | poetry version $(git describe --tags --abbrev=0) 32 | poetry build 33 | 34 | - name: Publish distribution 📦 to PyPI 35 | uses: pypa/gh-action-pypi-publish@v1.5.0 36 | with: 37 | user: __token__ 38 | password: ${{ secrets.pypi_password }} 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .ipynb_checkpoints/ 3 | docs/_build/ 4 | wwwroot/*.js 5 | node_modules 6 | typings 7 | dist 8 | schema_automator.egg-info/* 9 | tmp/ 10 | __pycache__ 11 | .idea/ 12 | *.pyc 13 | tests/outputs/* 14 | venv/ 15 | .venv/ 16 | target/ 17 | local/ 18 | .python-version 19 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # set base image (host OS) 2 | FROM python:3.9 3 | 4 | # https://stackoverflow.com/questions/53835198/integrating-python-poetry-with-docker 5 | ENV YOUR_ENV=${YOUR_ENV} \ 6 | PYTHONFAULTHANDLER=1 \ 7 | PYTHONUNBUFFERED=1 \ 8 | PYTHONHASHSEED=random \ 9 | PIP_NO_CACHE_DIR=off \ 10 | PIP_DISABLE_PIP_VERSION_CHECK=on \ 11 | PIP_DEFAULT_TIMEOUT=100 \ 12 | POETRY_VERSION=1.1.13 13 | 14 | # System deps: 15 | RUN pip install "poetry==$POETRY_VERSION" 16 | 17 | # set the working directory in the container 18 | WORKDIR /work 19 | 20 | RUN pip install schema-automator 21 | 22 | #COPY poetry.lock pyproject.toml /code/ 23 | 24 | # Project initialization: 25 | #RUN poetry install 26 | 27 | 28 | # command to run on container start 29 | CMD [ "bash" ] 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019, Biomedical Data Translator Consortium 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the names of 13 | its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | RUN = poetry run 2 | VERSION = $(shell git tag | tail -1) 3 | MODELS = cadsr frictionless 4 | 5 | .PHONY: all clean test all-docs sphinx-html check-dependencies 6 | 7 | all: clean test 8 | 9 | 10 | test: 11 | $(RUN) pytest tests/ 12 | 13 | schema_automator/metamodels/%.py: schema_automator/metamodels/%.yaml 14 | $(RUN) gen-python $< > $@.tmp && mv $@.tmp $@ 15 | 16 | check-dependencies: 17 | $(RUN) deptry schema_automator --known-first-party schema_automator 18 | 19 | # create a convenient wrapper script; 20 | # this can be used outside the poetry environment 21 | bin/schemauto: 22 | echo `poetry run which schemauto` '"$$@"' > $@ && chmod +x $@ 23 | 24 | ######################## 25 | #### Metamodel docs #### 26 | ######################## 27 | 28 | all-docs: $(patsubst %,docs-%,$(MODELS)) 29 | 30 | docs-dosdp: schema_automator/metamodels/dosdp/dosdp_linkml.yaml 31 | $(RUN) gen-doc -d docs/metamodels/dosdp $< 32 | 33 | docs-%: schema_automator/metamodels/%.yaml 34 | $(RUN) gen-doc -d docs/metamodels/$* $< 35 | 36 | sphinx-%: 37 | cd docs && $(RUN) make $* 38 | .PHONY: sphinx-% 39 | 40 | ################################################ 41 | #### Commands for building the Docker image #### 42 | ################################################ 43 | 44 | IM=linkml/schema-automator 45 | 46 | docker-build-no-cache: 47 | @docker build --no-cache -t $(IM):$(VERSION) . \ 48 | && docker tag $(IM):$(VERSION) $(IM):latest 49 | 50 | docker-build: 51 | @docker build -t $(IM):$(VERSION) . \ 52 | && docker tag $(IM):$(VERSION) $(IM):latest 53 | 54 | docker-build-use-cache-dev: 55 | @docker build -t $(DEV):$(VERSION) . \ 56 | && docker tag $(DEV):$(VERSION) $(DEV):latest 57 | 58 | docker-clean: 59 | docker kill $(IM) || echo not running ; 60 | docker rm $(IM) || echo not made 61 | 62 | docker-publish-no-build: 63 | @docker push $(IM):$(VERSION) \ 64 | && docker push $(IM):latest 65 | 66 | docker-publish-dev-no-build: 67 | @docker push $(DEV):$(VERSION) \ 68 | && docker push $(DEV):latest 69 | 70 | docker-publish: docker-build 71 | @docker push $(IM):$(VERSION) \ 72 | && docker push $(IM):latest 73 | 74 | docker-run: 75 | @docker run -v $(PWD):/work -w /work -ti $(IM):$(VERSION) 76 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LinkML Schema Automator 2 | 3 | This is a toolkit that assists with the generation and enhancement of [LinkML](https://linkml.io/linkml) schemas 4 | 5 | ## Install 6 | 7 | ```bash 8 | pip install schema-automator 9 | ``` 10 | 11 | ## Command Line 12 | 13 | See [CLI docs](https://linkml.io/schema-automator/cli) 14 | 15 | Generalizing: 16 | 17 | ```bash 18 | schemauto generalize-tsv my-data.tsv > my-schema.yaml 19 | ``` 20 | 21 | Importing: 22 | 23 | ```bash 24 | schemauto import-json-schema their.schema.json > my-schema.yaml 25 | ``` 26 | 27 | Annotating: 28 | 29 | ```bash 30 | schemauto annotate-schema my-schema.yaml 31 | ``` 32 | 33 | ## Full Documentation 34 | 35 | [linkml.io/schema-automator](https://linkml.io/schema-automator/) 36 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/_static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkml/schema-automator/70fe4eb5421165561f051c496179ba380abe9079/docs/_static/.gitkeep -------------------------------------------------------------------------------- /docs/cli.rst: -------------------------------------------------------------------------------- 1 | .. _cli: 2 | 3 | Command Line Interface 4 | ====================== 5 | 6 | All Schema Automator functionality is available via the ``schemauto`` command. 7 | 8 | Preamble 9 | -------- 10 | 11 | .. warning:: 12 | 13 | Previous versions had specific commands like ``tsv2linkml`` these are now deprecated. 14 | Instead these are now *subcommands* of the main ``schemauto`` command, and have been renamed. 15 | 16 | .. note:: 17 | 18 | we follow the `CLIG `_ guidelines as far as possible 19 | 20 | Main commands 21 | ------------- 22 | 23 | .. currentmodule:: schema_automator.cli 24 | 25 | .. click:: schema_automator.cli:main 26 | :prog: schemauto 27 | :show-nested: 28 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | LinkML Schema Automator 2 | ======================= 3 | 4 | Schema Automator is a toolkit for bootstrapping and automatically enhancing schemas from a variety of sources. 5 | 6 | The project is open source (BSD 3-clause license) and hosted on `GitHub `_. 7 | 8 | Use cases include: 9 | 10 | 1. Inferring an initial schema or data dictionary from a dataset that is a collection of TSVs 11 | 2. Automatically annotating schema elements and enumerations using the BioPortal annotator 12 | 3. Importing from a language like RDFS/OWL/SQL 13 | 14 | The primary output of Schema Automator is a `LinkML Schema `_. This can be converted to other 15 | schema frameworks, including: 16 | 17 | * JSON-Schema 18 | * SQL DDL 19 | * SHACL 20 | * ShEx 21 | * RDFS/OWL 22 | * Python dataclasses or Pydantic 23 | 24 | .. toctree:: 25 | :maxdepth: 3 26 | :caption: Contents: 27 | 28 | introduction 29 | install 30 | cli 31 | packages/index 32 | metamodels/index 33 | 34 | 35 | Indices and tables 36 | ================== 37 | 38 | * :ref:`genindex` 39 | * :ref:`modindex` 40 | * :ref:`search` 41 | -------------------------------------------------------------------------------- /docs/install.rst: -------------------------------------------------------------------------------- 1 | Installation 2 | ============ 3 | 4 | Direct Installation 5 | ------------------- 6 | 7 | ``schema-automator`` and its components require Python 3.9 or greater. 8 | 9 | .. code:: bash 10 | 11 | pip install schema-automator 12 | 13 | To check this works: 14 | 15 | .. code:: bash 16 | 17 | schemauto --help 18 | 19 | Running via Docker 20 | ------------------ 21 | 22 | You can use the `Schema Automator Docker Container `_ 23 | 24 | To start a shell 25 | 26 | .. code:: bash 27 | 28 | docker run -v $PWD:/work -w /work -ti linkml/schema-automator 29 | 30 | Within the shell you should see all your files, and you should have access: 31 | 32 | .. code:: bash 33 | 34 | schemauto --help 35 | -------------------------------------------------------------------------------- /docs/introduction.rst: -------------------------------------------------------------------------------- 1 | Introduction 2 | ============ 3 | 4 | This is a toolkit that assists with generating and enhancing schemas and data models from a variety 5 | of sources. 6 | 7 | The primary end target is a `LinkML `_ schema, but the framework can be used 8 | to generate JSON-Schema, SHACL, SQL DDL etc via the `LinkML Generator `_ framework. 9 | 10 | All functionality is available via a :ref:`CLI `. In future there will be a web-based interface. 11 | The functionality is also available by using the relevant Python :ref:`packages`. 12 | 13 | Generalization from Instance Data 14 | --------------------------------- 15 | 16 | See :ref:`generalizers` 17 | 18 | Generalizers allow you to *bootstrap* a schema by generalizing from existing data files 19 | 20 | * TSVs and spreadsheets 21 | * SQLite databases 22 | * RDF instance graphs 23 | 24 | Importing from alternative modeling frameworks 25 | ---------------------------------------------- 26 | 27 | See :ref:`importers` 28 | 29 | * OWL (but this only works for schema-style OWL) 30 | * JSON-Schema 31 | * SQL DDL 32 | 33 | In future other frameworks will be supported 34 | 35 | Annotating schemas 36 | ------------------ 37 | 38 | See :ref:`annotators` 39 | 40 | Annotators to provide ways to automatically add metadata to your schema, including 41 | 42 | * Assigning class or slot URIs to schema elements 43 | * Mapping enums to ontologies and vocabularies 44 | * Annotate using Large Language Models (LLMs) 45 | 46 | General Utilities 47 | ----------------- 48 | 49 | See :ref:`utilities` 50 | 51 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | %SPHINXBUILD% >NUL 2>NUL 14 | if errorlevel 9009 ( 15 | echo. 16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 17 | echo.installed, then set the SPHINXBUILD environment variable to point 18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 19 | echo.may add the Sphinx directory to PATH. 20 | echo. 21 | echo.If you don't have Sphinx installed, grab it from 22 | echo.https://www.sphinx-doc.org/ 23 | exit /b 1 24 | ) 25 | 26 | if "%1" == "" goto help 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/metamodels/index.rst: -------------------------------------------------------------------------------- 1 | Source Metamodels 2 | ================= 3 | 4 | Schema Automator makes use of LinkML Schema representations of source 5 | metamodels in order to define transformations. 6 | 7 | .. toctree:: 8 | :maxdepth: 3 9 | :caption: Contents: 10 | 11 | cadsr/index 12 | frictionless/index 13 | dosdp/index 14 | -------------------------------------------------------------------------------- /docs/packages/annotators.rst: -------------------------------------------------------------------------------- 1 | Annotators 2 | ========== 3 | 4 | Importers take an existing schema and *annotate* it with information 5 | 6 | Annotators typically talk to an external ontology. We use the OAK library to wrap a large number 7 | of different sources that can be used for annotation, including: 8 | 9 | - BioPortal 10 | - OLS/ZOOMA 11 | - Arbitrary ontologies in obo format, OWL, RDF, or JSON 12 | - Ubergraph 13 | - Wikidata 14 | - LOV 15 | 16 | For documentation on selecting the right ontology source, see: 17 | 18 | - `Selectors `_ 19 | 20 | .. currentmodule:: schema_automator.annotators 21 | 22 | .. autoclass:: SchemaAnnotator 23 | :members: 24 | 25 | .. autoclass:: JsonLdAnnotator 26 | :members: 27 | 28 | .. autoclass:: LLMAnnotator 29 | :members: 30 | -------------------------------------------------------------------------------- /docs/packages/index.rst: -------------------------------------------------------------------------------- 1 | Packages 2 | ======== 3 | 4 | The code is organized into different python *packages* 5 | 6 | .. toctree:: 7 | :maxdepth: 3 8 | :caption: Contents: 9 | 10 | importers 11 | generalizers 12 | annotators 13 | utilities 14 | -------------------------------------------------------------------------------- /docs/packages/utilities.rst: -------------------------------------------------------------------------------- 1 | Utilities 2 | ========= 3 | 4 | General purpose utilities 5 | 6 | 7 | .. currentmodule:: schema_automator.utils 8 | 9 | .. autosummary:: 10 | :toctree: src 11 | 12 | schemautils 13 | 14 | 15 | -------------------------------------------------------------------------------- /local/README.md: -------------------------------------------------------------------------------- 1 | placeholder for local data files. on .gitignore, so not synced. 2 | -------------------------------------------------------------------------------- /notebooks/images/FRED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkml/schema-automator/70fe4eb5421165561f051c496179ba380abe9079/notebooks/images/FRED.png -------------------------------------------------------------------------------- /schema_automator/__init__.py: -------------------------------------------------------------------------------- 1 | from importlib import metadata 2 | 3 | from schema_automator.annotators import * 4 | from schema_automator.importers import * 5 | from schema_automator.generalizers import * 6 | 7 | try: 8 | __version__ = metadata.version(__package__) 9 | except metadata.PackageNotFoundError: 10 | # package is not installed 11 | __version__ = "0.0.0" # pragma: no cover 12 | -------------------------------------------------------------------------------- /schema_automator/annotators/__init__.py: -------------------------------------------------------------------------------- 1 | from schema_automator.annotators.schema_annotator import SchemaAnnotator 2 | from schema_automator.annotators.jsonld_annotator import JsonLdAnnotator 3 | from schema_automator.annotators.llm_annotator import LLMAnnotator 4 | -------------------------------------------------------------------------------- /schema_automator/annotators/enums_to_curateable.py: -------------------------------------------------------------------------------- 1 | import click 2 | import pandas as pd 3 | from linkml_runtime.utils.schemaview import SchemaView 4 | 5 | # specify normalized_dist and dist type? 6 | blank_row = {"text": "", "title": "", "meaning": "", "match_id": "", "match_pref_lab": "", "match_type": "", 7 | "match_val": "", "cosine": "", "curated_id": "", "curated_pref_lab": "", "curated_type": "", 8 | "curated_val": "", "curation_notes": "", } 9 | br_keys = list(blank_row.keys()) 10 | br_keys.sort() 11 | 12 | 13 | @click.command() 14 | @click.option('--modelfile', type=click.Path(exists=True), required=True) 15 | @click.option('--tsv_out', type=click.Path(), default="enums_to_curateable.tsv", show_default=True) 16 | @click.option('--enum', required=True) 17 | def enums_to_curateable(modelfile, enum, tsv_out): 18 | row_list = [] 19 | mschema = SchemaView(modelfile) 20 | menum = mschema.get_enum(enum) 21 | mpvs = menum.permissible_values 22 | for apvt, apvd in mpvs.items(): 23 | current_blank = blank_row.copy() 24 | apvd_annotations = apvd.annotations 25 | apvd_anno_keys = list(apvd_annotations.keys()) 26 | for i in br_keys: 27 | if i in apvd_anno_keys: 28 | current_blank[i] = apvd_annotations[i].value 29 | elif i in apvd: 30 | current_blank[i] = apvd[i] 31 | row_list.append(current_blank) 32 | row_frame = pd.DataFrame(row_list) 33 | print(row_frame) 34 | row_frame.to_csv(tsv_out, sep="\t", index=False) 35 | 36 | 37 | if __name__ == '__main__': 38 | enums_to_curateable() 39 | -------------------------------------------------------------------------------- /schema_automator/generalizers/__init__.py: -------------------------------------------------------------------------------- 1 | from schema_automator.generalizers.csv_data_generalizer import CsvDataGeneralizer 2 | from schema_automator.generalizers.json_instance_generalizer import JsonDataGeneralizer 3 | from schema_automator.generalizers.rdf_data_generalizer import RdfDataGeneralizer -------------------------------------------------------------------------------- /schema_automator/generalizers/generalizer.py: -------------------------------------------------------------------------------- 1 | from abc import ABC 2 | from collections.abc import Collection, Set 3 | from dataclasses import dataclass, field 4 | from typing import List 5 | 6 | import inflect 7 | from linkml_runtime.linkml_model import SchemaDefinition, Prefix 8 | 9 | DEFAULT_CLASS_NAME = 'Observation' 10 | DEFAULT_SCHEMA_NAME = 'MySchema' 11 | 12 | 13 | @dataclass 14 | class Generalizer(ABC): 15 | """ 16 | Abstract Base Class for all Generalization Engines. 17 | 18 | Generalization Engines take example data in some format and generalizes to a new SchemaDefinition 19 | """ 20 | 21 | identifier_slots: List[str] = field(default_factory=lambda: []) 22 | """Slots asserted to be identifiers""" 23 | 24 | depluralize_class_names: bool = field(default_factory=lambda: False) 25 | 26 | inflect_engine: inflect.engine = field(default_factory=lambda: inflect.engine()) 27 | 28 | 29 | def convert(self, file: str, **kwargs) -> SchemaDefinition: 30 | raise NotImplementedError 31 | 32 | def add_prefix(self, schema: SchemaDefinition, prefix: str, url: str): 33 | schema.prefixes[prefix] = Prefix(prefix, url) 34 | 35 | def add_default_prefixes(self, schema: SchemaDefinition): 36 | self.add_prefix(schema, 'linkml', 'https://w3id.org/linkml/') 37 | 38 | def add_additional_info(self, schema: SchemaDefinition) -> None: 39 | for s in self.identifier_slots: 40 | schema.slots[s].identifier = True -------------------------------------------------------------------------------- /schema_automator/generalizers/toml_instance_generalizer.py: -------------------------------------------------------------------------------- 1 | import click 2 | from typing import Union, Dict, List, Any 3 | from collections import defaultdict 4 | import json 5 | import yaml 6 | import gzip 7 | 8 | from dataclasses import dataclass 9 | 10 | from linkml_runtime import SchemaView 11 | from linkml_runtime.linkml_model import SchemaDefinition 12 | 13 | from schema_automator import JsonDataGeneralizer 14 | from schema_automator.generalizers.generalizer import Generalizer 15 | from schema_automator.generalizers.csv_data_generalizer import CsvDataGeneralizer 16 | from linkml_runtime.utils.formatutils import camelcase 17 | 18 | from schema_automator.utils.schemautils import write_schema 19 | 20 | 21 | @dataclass 22 | class TomlDataGeneralizer(Generalizer): 23 | """ 24 | A generalizer that abstract from TOML instance data 25 | """ 26 | mappings: dict = None 27 | omit_null: bool = None 28 | 29 | def convert(self, input: str, **kwargs) -> SchemaDefinition: 30 | """ 31 | Generalizes from a JSON file 32 | 33 | :param input: 34 | :param kwargs: 35 | :return: 36 | """ 37 | w 38 | json_engine = JsonDataGeneralizer(**kwargs) 39 | return json_engine.convert(input, format='toml', **kwargs) -------------------------------------------------------------------------------- /schema_automator/importers/__init__.py: -------------------------------------------------------------------------------- 1 | from schema_automator.importers.jsonschema_import_engine import JsonSchemaImportEngine 2 | from schema_automator.importers.owl_import_engine import OwlImportEngine 3 | from schema_automator.importers.dosdp_import_engine import DOSDPImportEngine 4 | from schema_automator.importers.frictionless_import_engine import FrictionlessImportEngine 5 | from schema_automator.importers.cadsr_import_engine import CADSRImportEngine 6 | -------------------------------------------------------------------------------- /schema_automator/importers/import_engine.py: -------------------------------------------------------------------------------- 1 | from abc import ABC 2 | from dataclasses import dataclass 3 | 4 | from linkml_runtime.linkml_model import SchemaDefinition, Prefix 5 | 6 | 7 | @dataclass 8 | class ImportEngine(ABC): 9 | """ 10 | Abstract Base Class for all Import Engines. 11 | 12 | Import Engines take some kind of input and import into a new SchemaDefinition 13 | """ 14 | 15 | def convert(self, file: str, **kwargs) -> SchemaDefinition: 16 | raise NotImplementedError 17 | 18 | def add_prefix(self, schema: SchemaDefinition, prefix: str, url: str): 19 | schema.prefixes[prefix] = Prefix(prefix, url) 20 | 21 | def add_default_prefixes(self, schema: SchemaDefinition): 22 | self.add_prefix(schema, 'linkml', 'https://w3id.org/linkml/') -------------------------------------------------------------------------------- /schema_automator/importers/tabular_import_engine.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | from dataclasses import dataclass 4 | from tempfile import NamedTemporaryFile 5 | from typing import List 6 | 7 | from linkml_runtime.linkml_model.meta import SchemaDefinition 8 | from schemasheets.schemamaker import SchemaMaker 9 | 10 | from schema_automator.importers.import_engine import ImportEngine 11 | import pandas as pd 12 | 13 | 14 | @dataclass 15 | class TableImportEngine(ImportEngine): 16 | """ 17 | An ImportEngine that imports tabular data via schemasheets 18 | 19 | """ 20 | element_type: str = None 21 | parent: str = None 22 | columns: List[str] = None 23 | 24 | def convert(self, file: str) -> SchemaDefinition: 25 | """ 26 | Converts one or more JSON files into a Schema 27 | 28 | :param files: 29 | :param kwargs: 30 | :return: 31 | """ 32 | df = pd.read_csv(file, sep='\t') 33 | self.import_from_dataframe(df) 34 | 35 | def import_from_dataframe(self, df: pd.DataFrame): 36 | """ 37 | Imports a dataframe into a schema 38 | 39 | :param df: 40 | :return: 41 | """ 42 | tf = NamedTemporaryFile(delete=False) 43 | if not self.columns: 44 | raise ValueError("Must specify columns") 45 | logging.info(f"Using columns: {self.columns}") 46 | ix = 1 47 | line = pd.DataFrame(dict(zip(df.head(), self.columns)), index=[ix]) 48 | df = pd.concat([df.iloc[:ix-1], line, df.iloc[ix-1:]]).reset_index(drop=True) 49 | if self.parent: 50 | df.insert(0, 51 | column="parent", 52 | value=[f">{self.element_type}"] + [self.parent] * (len(df) - 1)) 53 | df.to_csv(tf.name, sep='\t', index=False) 54 | #print(open(tf.name, 'r').read()) 55 | #element_map = dict(zip(df.head(), self.columns)) 56 | sm = SchemaMaker() 57 | return sm.create_schema([tf.name]) 58 | -------------------------------------------------------------------------------- /schema_automator/jsonschema/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /schema_automator/metamodels/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkml/schema-automator/70fe4eb5421165561f051c496179ba380abe9079/schema_automator/metamodels/__init__.py -------------------------------------------------------------------------------- /schema_automator/metamodels/dosdp/__init__.py: -------------------------------------------------------------------------------- 1 | from schema_automator.metamodels.dosdp.model import * 2 | -------------------------------------------------------------------------------- /schema_automator/utils/__init__.py: -------------------------------------------------------------------------------- 1 | from schema_automator.utils.schemautils import write_schema -------------------------------------------------------------------------------- /schema_automator/utils/enums_pvs_tsv.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import click 3 | import click_log 4 | import pandas as pd 5 | from linkml_runtime.utils.schemaview import SchemaView 6 | 7 | logger = logging.getLogger(__name__) 8 | click_log.basic_config(logger) 9 | 10 | 11 | @click.command() 12 | @click_log.simple_verbosity_option(logger) 13 | @click.option('--modelfile', help="path to LinkML input", type=click.Path(exists=True), show_default=True, 14 | required=True) 15 | @click.option('--output_file', help="path to TSV output", type=click.Path(), required=True) 16 | def enums_pvs_tsv(modelfile, output_file): 17 | """ 18 | Writes a TSV report of the enums and permissible values in modelfile (a LinkML YAML file) to output_file (a TSV file). 19 | """ 20 | row_list = [] 21 | view = SchemaView(modelfile) 22 | enums = view.all_enums() 23 | for ek, ev in enums.items(): 24 | pvs = ev.permissible_values 25 | for pk, pv in pvs.items(): 26 | logger.debug(f"{ek}: {pk}") 27 | row_list.append({"enum": ek, "pv": pk}) 28 | row_frame = pd.DataFrame(row_list) 29 | row_frame.to_csv(output_file, sep="\t", index=False) 30 | 31 | 32 | if __name__ == '__main__': 33 | enums_pvs_tsv() 34 | -------------------------------------------------------------------------------- /target/placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkml/schema-automator/70fe4eb5421165561f051c496179ba380abe9079/target/placeholder -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pprint 3 | 4 | ROOT = os.path.abspath(os.path.dirname(__file__)) 5 | INPUT_DIR = os.path.join(ROOT, 'resources') 6 | OUTPUT_DIR = os.path.join(ROOT, 'outputs') 7 | MODEL_DIR = os.path.join(ROOT, 'test_models') 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/outputs/README.md: -------------------------------------------------------------------------------- 1 | test output here 2 | -------------------------------------------------------------------------------- /tests/resources/MPLEx.toml: -------------------------------------------------------------------------------- 1 | # Chemical derivatization method for global GC-MS metabolomics 2 | title = 'MPLEx extraction (Grass) ' 3 | author = 'First Last' 4 | section = 'Metabolomics' 5 | updated = '08/10/2022' 6 | protocol_url = '' 7 | protocol_doi = '' 8 | description = 'Procedure for chloroform/methanol Folch-type extraction applicable for soil and environmental samples.' 9 | 10 | [sample-storage-activity] 11 | id = 'mplex:1' 12 | organic_matter = { numeric_value = '1', unit = 'g' } 13 | contanier = { type = 'Olympus', numeric_value = '50', unit = 'mL'} 14 | temperature = { numeric_value = '-70', unit = 'C' } 15 | 16 | [homogenization-activity] 17 | id = 'mplex:2' 18 | source_material = 'mplex:1' 19 | solvent = 'MeOH/Water' 20 | concentration = { numeric_value = '4/3', unit = 'ratio' } 21 | volume = { numeric_value = '15', unit = 'mL' } 22 | shaker = {type = 'vortex'} 23 | instrument = {type = 'Omni Homogenizer', details = "disposable probes"} 24 | 25 | [solubilization-activity] 26 | id = 'mplex:3' 27 | source_material = 'mplex:2' 28 | solvent = {type = 'Chloroform', temperature = "ice-cold"} 29 | volume = { numeric_value = '18.5', unit = 'mL' } 30 | shaker = {type = 'vortex', numeric_value = '1', unit = 'minutes'} 31 | 32 | [sample-handling-activity] 33 | id = 'mplex:4' 34 | source_material = 'mplex:3' 35 | activity = {type = 'ice', numeric_value = '5', unit = 'minutes'} 36 | 37 | [mixing-activity] 38 | id = 'mplex:5' 39 | source_material = 'mplex:4' 40 | shaker = {type = 'vortex', numeric_value = '1', unit = 'minutes'} 41 | 42 | [centrifugation-activity] 43 | id = 'mplex:6' 44 | source_material = 'mplex:5' 45 | centrifuge = {speed = '5000', numeric_value = '10', unit = 'minutes'} 46 | temperature = { numeric_value = '4', unit = 'C' } 47 | 48 | [transfer-activity] 49 | id = 'derive:12' 50 | source_material = 'derive:11' 51 | type = 'supernatant' 52 | 53 | # To derivatization (Optional) 54 | -------------------------------------------------------------------------------- /tests/resources/bio.obo: -------------------------------------------------------------------------------- 1 | format-version: 1.2 2 | ontology: bio 3 | 4 | [Term] 5 | id: BIO:1 6 | name: biochemical reaction 7 | def: "A biochemical reaction" [] 8 | 9 | [Term] 10 | id: BIO:2 11 | name: chemical structure 12 | def: "A chemical structure" [] 13 | 14 | -------------------------------------------------------------------------------- /tests/resources/biopax-level3.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkml/schema-automator/70fe4eb5421165561f051c496179ba380abe9079/tests/resources/biopax-level3.db -------------------------------------------------------------------------------- /tests/resources/books.tsv: -------------------------------------------------------------------------------- 1 | id book_category name price inStock author series_t sequence_i genre_s yesno blah_b 2 | 0553573403 book|game A Game of Thrones 7.99 true George R.R. Martin A Song of Ice and Fire 1 fantasy true false 3 | 0553579908 book A Clash of Kings 7.99 true George R.R. Martin A Song of Ice and Fire 2 fantasy true false 4 | 055357342X book A Storm of Swords 7.99 true George R.R. Martin A Song of Ice and Fire 3 fantasy true false 5 | 0553293354 book Foundation 7.99 true Isaac Asimov Foundation Novels 1 scifi true false 6 | 0812521390 book The Black Company 6.99 false Glen Cook The Chronicles of The Black Company 1 fantasy true false 7 | 0812550706 book Ender's Game 6.99 true Orson Scott Card Ender 1 scifi true false 8 | 0441385532 book Jhereg 7.95 false Steven Brust Vlad Taltos 1 fantasy true false 9 | 0380014300 book Nine Princes In Amber 6.99 true Roger Zelazny the Chronicles of Amber 1 fantasy true false 10 | 0805080481 book The Book of Three 5.99 true Lloyd Alexander The Chronicles of Prydain 1 fantasy true false 11 | 080508049X book|film The Black Cauldron 5.99 true Lloyd Alexander The Chronicles of Prydain 2 fantasy false true 12 | 123 book Consider Phlebas 7.99 true Ian M Banks 1 scifi true false 13 | 456 book Warlord of the Air 5.99 true Michael Moorcock Oswald Bastable Trilogy 1 steambunk true false 14 | -------------------------------------------------------------------------------- /tests/resources/dosdp/acquired.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: acquired 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/acquired.yaml 4 | 5 | description: Pattern for extending a etiology-generic disease class to an acquired 6 | form. Here acquired means that basis for the disease is acquired during the individuals 7 | lifetime. It need not exclude genetic etiology, but it excludes inherited. 8 | 9 | contributors: 10 | - https://orcid.org/0000-0002-6601-2165 11 | 12 | classes: 13 | acquired: MONDO:0021141 14 | disease: MONDO:0000001 15 | 16 | relations: 17 | has modifier: RO:0002573 18 | 19 | annotationProperties: 20 | exact_synonym: oio:hasExactSynonym 21 | related_synonym: oio:hasRelatedSynonym 22 | 23 | vars: 24 | disease: '''disease''' 25 | 26 | name: 27 | text: acquired %s 28 | vars: 29 | - disease 30 | 31 | annotations: 32 | - annotationProperty: exact_synonym 33 | text: acquired %s 34 | vars: 35 | - disease 36 | 37 | def: 38 | text: An instance of %s that is acquired during the lifetime of the individual. 39 | vars: 40 | - disease 41 | 42 | equivalentTo: 43 | text: '%s and ''has modifier'' some ''acquired''' 44 | vars: 45 | - disease 46 | -------------------------------------------------------------------------------- /tests/resources/dosdp/acute.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: acute 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/acute.yaml 4 | 5 | description: 'This pattern is applied to diseases that are described as having an acute onset, i.e. the sudden appearance of disease manifestations over a short period of time. 6 | 7 | Examples: [acute bronchiolitis](http://purl.obolibrary.org/obo/MONDO_0020680), 8 | [acute liver failure](http://purl.obolibrary.org/obo/MONDO_0019542)' 9 | 10 | contributors: 11 | - https://orcid.org/0000-0002-6601-2165 12 | - https://orcid.org/0000-0001-5208-3432 13 | 14 | classes: 15 | acute: PATO:0000389 16 | disease: MONDO:0000001 17 | 18 | relations: 19 | has modifier: RO:0002573 20 | 21 | annotationProperties: 22 | exact_synonym: oio:hasExactSynonym 23 | related_synonym: oio:hasRelatedSynonym 24 | 25 | vars: 26 | disease: '''disease''' 27 | 28 | name: 29 | text: acute %s 30 | vars: 31 | - disease 32 | 33 | annotations: 34 | - annotationProperty: exact_synonym 35 | text: '%s, acute' 36 | vars: 37 | - disease 38 | 39 | def: 40 | text: Acute form of %s. 41 | vars: 42 | - disease 43 | 44 | equivalentTo: 45 | text: '%s and ''has modifier'' some ''acute''' 46 | vars: 47 | - disease 48 | -------------------------------------------------------------------------------- /tests/resources/dosdp/adenocarcinoma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: adenocarcinoma disease has location X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/adenocarcinoma.yaml 4 | 5 | description: 'Adenocarcinoma is a common cancer characterized by the presence of malignant glandular cells. This is a design pattern for classes representing adenocarcinomas based on their location. This may be the site of origin, but it can also represent a secondary site for metastatized cancer. We use the generic disease has location relation, which generalized over primary and secondary sites. 6 | 7 | Examples: [adenocarcinoma of cervix uteri](http://purl.obolibrary.org/obo/MONDO_0016275), 8 | [pituitary adenocarcinoma (disease)](http://purl.obolibrary.org/obo/MONDO_0017582)' 9 | 10 | contributors: 11 | - https://orcid.org/0000-0002-6601-2165 12 | - https://orcid.org/0000-0001-5208-3432 13 | 14 | classes: 15 | adenocarcinoma: MONDO:0004970 16 | owl_thing: owl:Thing 17 | 18 | relations: 19 | disease has location: RO:0004026 20 | 21 | annotationProperties: 22 | exact_synonym: oio:hasExactSynonym 23 | related_synonym: oio:hasRelatedSynonym 24 | 25 | vars: 26 | location: owl_thing 27 | 28 | name: 29 | text: '%s adenocarcinoma' 30 | vars: 31 | - location 32 | 33 | annotations: 34 | - annotationProperty: exact_synonym 35 | text: '%s adenocarcinoma' 36 | vars: 37 | - location 38 | - annotationProperty: related_synonym 39 | text: adenocarcinoma of %s 40 | vars: 41 | - location 42 | 43 | def: 44 | text: A carcinoma that arises from glandular epithelial cells of the %s 45 | vars: 46 | - location 47 | 48 | equivalentTo: 49 | text: '''adenocarcinoma'' and (''disease has location'' some %s)' 50 | vars: 51 | - location 52 | -------------------------------------------------------------------------------- /tests/resources/dosdp/adenoma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: adenoma disease has location X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/adenoma.yaml 4 | 5 | description: ' 6 | 7 | Adenomas are neoplasms arising from epithelium. This is a design pattern for classes representing adenomas based on their location. This may be the site of origin, but it can also represent a secondary site for metastatized cancer. We use the generic `disease has location` relation, which is generalized over primary and secondary sites. 8 | Examples: [pituitary gland adenoma](http://purl.obolibrary.org/obo/MONDO_0006373), 9 | [breast adenoma](http://purl.obolibrary.org/obo/MONDO_0002058)' 10 | 11 | contributors: 12 | - https://orcid.org/0000-0002-6601-2165 13 | - https://orcid.org/0000-0001-5208-3432 14 | 15 | classes: 16 | adenoma: MONDO:0004972 17 | owl_thing: owl:Thing 18 | 19 | relations: 20 | disease has location: RO:0004026 21 | 22 | annotationProperties: 23 | exact_synonym: oio:hasExactSynonym 24 | related_synonym: oio:hasRelatedSynonym 25 | 26 | vars: 27 | location: owl_thing 28 | 29 | name: 30 | text: '%s adenoma' 31 | vars: 32 | - location 33 | 34 | annotations: 35 | - annotationProperty: exact_synonym 36 | text: '%s adenoma' 37 | vars: 38 | - location 39 | - annotationProperty: related_synonym 40 | text: adenoma of %s 41 | vars: 42 | - location 43 | 44 | def: 45 | text: A adenoma that involves the %s. 46 | vars: 47 | - location 48 | 49 | equivalentTo: 50 | text: '''adenoma'' and (''disease has location'' some %s)' 51 | vars: 52 | - location 53 | -------------------------------------------------------------------------------- /tests/resources/dosdp/adenosquamous_carcinoma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: adenosquamous carcinoma disease has location X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/adenosquamous_carcinoma.yaml 4 | 5 | description: 'An adenosquamous carcinoma is a carcinoma composed of malignant glandular cells and malignant squamous cells. This is a design pattern for classes representing adenosquamous carcinomas based on their location. This may be the site of origin, but it can also represent a secondary site for metastatized cancer. We use the generic ''disease has location'' relation, which generalized over primary and secondary sites. 6 | 7 | Examples: [adenosquamous breast carcinoma](http://purl.obolibrary.org/obo/MONDO_0003548), 8 | [Bartholin gland adenosquamous carcinoma] (http://purl.obolibrary.org/obo/MONDO_0003555), 9 | [gastric adenosquamous carcinoma](http://purl.obolibrary.org/obo/MONDO_0006034)' 10 | 11 | contributors: 12 | - https://orcid.org/0000-0002-6601-2165 13 | - https://orcid.org/0000-0001-5208-3432 14 | 15 | classes: 16 | adenosquamous carcinoma: MONDO:0006074 17 | multicellular anatomical structure: UBERON:0010000 18 | 19 | relations: 20 | disease has location: RO:0004026 21 | 22 | annotationProperties: 23 | exact_synonym: oio:hasExactSynonym 24 | related_synonym: oio:hasRelatedSynonym 25 | 26 | vars: 27 | location: '''multicellular anatomical structure''' 28 | 29 | name: 30 | text: '%s adenosquamous carcinoma' 31 | vars: 32 | - location 33 | 34 | annotations: 35 | - annotationProperty: exact_synonym 36 | text: adenosquamous %s carcinoma 37 | vars: 38 | - location 39 | 40 | def: 41 | text: Any carcinoma that that involves the %s and is characterized by the presence 42 | of glandular and squamous malignant epithelial components. 43 | vars: 44 | - location 45 | 46 | equivalentTo: 47 | text: '''adenosquamous carcinoma'' and (''disease has location'' some %s)' 48 | vars: 49 | - location 50 | -------------------------------------------------------------------------------- /tests/resources/dosdp/adult.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: adult 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/adult.yaml 4 | 5 | description: 'An instance of a disease that has an onset of signs or symptoms of disease between the age of 16 years or later (adult onset). 6 | 7 | Examples: [adult brain stem neoplasm](http://purl.obolibrary.org/obo/MONDO_0024797), 8 | [adult-onset myasthenia gravis](http://purl.obolibrary.org/obo/MONDO_0018324)' 9 | 10 | contributors: 11 | - https://orcid.org/0000-0002-6601-2165 12 | - https://orcid.org/0000-0001-5208-3432 13 | 14 | classes: 15 | adult: HP:0003581 16 | disease: MONDO:0000001 17 | 18 | relations: 19 | has modifier: RO:0002573 20 | 21 | annotationProperties: 22 | exact_synonym: oio:hasExactSynonym 23 | related_synonym: oio:hasRelatedSynonym 24 | 25 | vars: 26 | disease: '''disease''' 27 | 28 | name: 29 | text: adult %s 30 | vars: 31 | - disease 32 | 33 | annotations: 34 | - annotationProperty: exact_synonym 35 | text: '%s of adults' 36 | vars: 37 | - disease 38 | 39 | def: 40 | text: A %s that occurs in an adult. 41 | vars: 42 | - disease 43 | 44 | equivalentTo: 45 | text: '%s and ''has modifier'' some ''adult''' 46 | vars: 47 | - disease 48 | -------------------------------------------------------------------------------- /tests/resources/dosdp/allergic_form_of_disease.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: allergic_form_of_disease 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/allergic_form_of_disease.yaml 4 | 5 | description: ' 6 | 7 | An etiological pattern that extends an etiology-generic disease to an allergic form 8 | (i.e. caused by pathological type I hypersensitivity reaction). The [allergy.yaml](https://github.com/monarch-initiative/mondo/blob/master/src/patterns/dosdp-patterns/allergy.yaml) 9 | pattern is to refine an existing disease by trigger. 10 | 11 | Examples: [allergic respiratory disease](http://purl.obolibrary.org/obo/MONDO_0000771), 12 | [atopic eczema](http://purl.obolibrary.org/obo/MONDO_0004980), [allergic otitis 13 | media](http://purl.obolibrary.org/obo/MONDO_0021202)' 14 | 15 | contributors: 16 | - https://orcid.org/0000-0002-6601-2165 17 | - https://orcid.org/0000-0001-5208-3432 18 | 19 | classes: 20 | disease: MONDO:0000001 21 | type I hypersensitivity: GO:0016068 22 | 23 | relations: 24 | disease has basis in disruption of: RO:0004021 25 | 26 | annotationProperties: 27 | exact_synonym: oio:hasExactSynonym 28 | related_synonym: oio:hasRelatedSynonym 29 | 30 | vars: 31 | disease: '''disease''' 32 | 33 | name: 34 | text: allergic %s 35 | vars: 36 | - disease 37 | 38 | annotations: 39 | - annotationProperty: exact_synonym 40 | text: allergic form of %s 41 | vars: 42 | - disease 43 | 44 | def: 45 | text: A %s with a basis in a pathological type I hypersensitivity reaction. 46 | vars: 47 | - disease 48 | 49 | equivalentTo: 50 | text: '%s and ''disease has basis in disruption of'' some ''type I hypersensitivity''' 51 | vars: 52 | - disease 53 | -------------------------------------------------------------------------------- /tests/resources/dosdp/allergy.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: allergy 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/allergy.yaml 4 | 5 | description: ' 6 | 7 | Allergy classified according to allergic trigger. This pattern is to refine an existing 8 | disease by trigger, the [allergic_form_of_disease.yaml](https://github.com/monarch-initiative/mondo/blob/master/src/patterns/dosdp-patterns/allergic_form_of_disease.yaml) 9 | pattern is for a generic disease. 10 | 11 | Examples: [egg allergy](http://purl.obolibrary.org/obo/MONDO_0005741), [peach allergy](http://purl.obolibrary.org/obo/MONDO_0000785), 12 | [gluten allergy](http://purl.obolibrary.org/obo/MONDO_0000606)' 13 | 14 | contributors: 15 | - https://orcid.org/0000-0002-6601-2165 16 | - https://orcid.org/0000-0001-5208-3432 17 | 18 | classes: 19 | allergic disease: MONDO:0005271 20 | owl_thing: owl:Thing 21 | 22 | relations: 23 | realized in response to stimulus: RO:0004028 24 | 25 | annotationProperties: 26 | exact_synonym: oio:hasExactSynonym 27 | related_synonym: oio:hasRelatedSynonym 28 | 29 | vars: 30 | substance: owl_thing 31 | 32 | name: 33 | text: '%s allergic disease' 34 | vars: 35 | - substance 36 | 37 | annotations: 38 | - annotationProperty: exact_synonym 39 | text: allergy of %s 40 | vars: 41 | - substance 42 | 43 | def: 44 | text: A allergic disease involving a %s. 45 | vars: 46 | - substance 47 | 48 | equivalentTo: 49 | text: '''allergic disease'' and ''realized in response to stimulus'' some %s' 50 | vars: 51 | - substance 52 | -------------------------------------------------------------------------------- /tests/resources/dosdp/autoimmune.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: autoimmune 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/autoimmune.yaml 4 | 5 | description: 'An instance of a disease that is brought about or caused by autoimmunity. 6 | 7 | Examples: [autoimmune cardiomyopathy](http://purl.obolibrary.org/obo/MONDO_0030701), 8 | [autoimmune pancreatitis](http://purl.obolibrary.org/obo/MONDO_0015175)' 9 | 10 | contributors: 11 | - https://orcid.org/0000-0002-6601-2165 12 | 13 | classes: 14 | disease: MONDO:0000001 15 | autoimmunity: HP:0002960 16 | 17 | relations: 18 | disease arises from feature: RO:0004022 19 | 20 | annotationProperties: 21 | exact_synonym: oio:hasExactSynonym 22 | related_synonym: oio:hasRelatedSynonym 23 | 24 | vars: 25 | disease: '''disease''' 26 | 27 | name: 28 | text: autoimmune %s 29 | vars: 30 | - disease 31 | 32 | def: 33 | text: An autoimmune form of %s. 34 | vars: 35 | - disease 36 | 37 | equivalentTo: 38 | text: '%s and ''disease arises from feature'' some ''autoimmunity''' 39 | vars: 40 | - disease 41 | -------------------------------------------------------------------------------- /tests/resources/dosdp/autoimmune_inflammation.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: autoimmune_inflammation 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/autoimmune_inflammation.yaml 4 | 5 | description: 'An instance of an autoimmune disease that is described by inflammation in a specific anatomical entity. 6 | 7 | Example: [autoimmune thyroid disease](http://purl.obolibrary.org/obo/MONDO_0005623)' 8 | 9 | contributors: 10 | - https://orcid.org/0000-0002-6601-2165 11 | 12 | classes: 13 | autoimmune disease: MONDO:0007179 14 | anatomical structure: UBERON:0000061 15 | 16 | relations: 17 | disease has inflammation site: RO:0004027 18 | 19 | annotationProperties: 20 | exact_synonym: oio:hasExactSynonym 21 | related_synonym: oio:hasRelatedSynonym 22 | 23 | vars: 24 | location: '''anatomical structure''' 25 | 26 | name: 27 | text: autoimmune %s inflammation 28 | vars: 29 | - location 30 | 31 | def: 32 | text: An autoimmune inflammatory disease involving a pathogenic inflammatory response 33 | in the %s. 34 | vars: 35 | - location 36 | 37 | equivalentTo: 38 | text: '''autoimmune disease'' and ''disease has inflammation site'' some %s' 39 | vars: 40 | - location 41 | -------------------------------------------------------------------------------- /tests/resources/dosdp/autosomal_dominant.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: autosomal_dominant 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/autosomal_dominant.yaml 4 | 5 | description: 'This pattern is applied to autosomal dominant forms of an inherited disease. 6 | 7 | Examples: [autosomal dominant cerebellar ataxia](http://purl.obolibrary.org/obo/MONDO_0020380), 8 | [autosomal dominant osteopetrosis](http://purl.obolibrary.org/obo/MONDO_0020645)' 9 | 10 | contributors: 11 | - https://orcid.org/0000-0002-6601-2165 12 | - https://orcid.org/0000-0001-5208-3432 13 | 14 | classes: 15 | autosomal dominant inheritance: HP:0000006 16 | disease: MONDO:0000001 17 | 18 | relations: 19 | has modifier: RO:0002573 20 | 21 | annotationProperties: 22 | exact_synonym: oio:hasExactSynonym 23 | related_synonym: oio:hasRelatedSynonym 24 | 25 | vars: 26 | disease: '''disease''' 27 | 28 | name: 29 | text: autosomal dominant %s 30 | vars: 31 | - disease 32 | 33 | annotations: 34 | - annotationProperty: exact_synonym 35 | text: '%s, autosomal dominant' 36 | vars: 37 | - disease 38 | 39 | def: 40 | text: Autosomal dominant form of %s. 41 | vars: 42 | - disease 43 | 44 | equivalentTo: 45 | text: '%s and ''has modifier'' some ''autosomal dominant inheritance''' 46 | vars: 47 | - disease 48 | -------------------------------------------------------------------------------- /tests/resources/dosdp/autosomal_recessive.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: autosomal_recessive 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/autosomal_recessive.yaml 4 | 5 | description: 'This pattern is applied to autosomal recessive forms of an inherited disease. 6 | 7 | Examples: [autosomal recessive brachyolmia](http://purl.obolibrary.org/obo/MONDO_0018662), 8 | [autosomal recessive sideroblastic anemia](http://purl.obolibrary.org/obo/MONDO_0016828)' 9 | 10 | contributors: 11 | - https://orcid.org/0000-0002-6601-2165 12 | - https://orcid.org/0000-0001-5208-3432 13 | 14 | classes: 15 | autosomal recessive inheritance: HP:0000007 16 | disease: MONDO:0000001 17 | 18 | relations: 19 | has modifier: RO:0002573 20 | 21 | annotationProperties: 22 | exact_synonym: oio:hasExactSynonym 23 | related_synonym: oio:hasRelatedSynonym 24 | 25 | vars: 26 | disease: '''disease''' 27 | 28 | name: 29 | text: autosomal recessive %s 30 | vars: 31 | - disease 32 | 33 | annotations: 34 | - annotationProperty: exact_synonym 35 | text: '%s, autosomal recessive' 36 | vars: 37 | - disease 38 | 39 | def: 40 | text: Autosomal recessive form of %s. 41 | vars: 42 | - disease 43 | 44 | equivalentTo: 45 | text: '%s and ''has modifier'' some ''autosomal recessive inheritance''' 46 | vars: 47 | - disease 48 | -------------------------------------------------------------------------------- /tests/resources/dosdp/basis_in_disruption_of_process.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: basis_in_disruption_of_process 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/basis_in_disruption_of_process.yaml 4 | 5 | description: ' 6 | 7 | A pattern for generic groupings of diseases based around the molecular basis for 8 | the disease in terms of a GO molecular function or cellular process. 9 | 10 | For example: DNA repair or RAS signaling' 11 | 12 | contributors: 13 | - https://orcid.org/0000-0002-6601-2165 14 | 15 | classes: 16 | disease: MONDO:0000001 17 | process: BFO:0000015 18 | 19 | relations: 20 | disease has basis in disruption of: RO:0004021 21 | 22 | annotationProperties: 23 | exact_synonym: oio:hasExactSynonym 24 | related_synonym: oio:hasRelatedSynonym 25 | 26 | vars: 27 | process: '''process''' 28 | 29 | name: 30 | text: '%s disease' 31 | vars: 32 | - process 33 | 34 | annotations: 35 | - annotationProperty: related_synonym 36 | text: disorder of %s 37 | vars: 38 | - process 39 | 40 | def: 41 | text: A disease that has its basis in the disruption of %s. 42 | vars: 43 | - process 44 | 45 | equivalentTo: 46 | text: '''disease'' and ''disease has basis in disruption of'' some %s' 47 | vars: 48 | - process 49 | -------------------------------------------------------------------------------- /tests/resources/dosdp/benign.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: benign 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/benign.yaml 4 | 5 | description: ' 6 | 7 | This is a design pattern for classes representing benign neoplasms, extending a 8 | generic neoplasm class. For example, a benign adrenal gland pheochromocytoma, defined 9 | as being the benign form of the more general adrenal gland pheochromocytoma. 10 | 11 | TODO: encode alternate way of representing' 12 | 13 | contributors: 14 | - https://orcid.org/0000-0002-6601-2165 15 | 16 | classes: 17 | neoplasm: MONDO:0005070 18 | neoplastic, non-malignant: PATO:0002096 19 | 20 | relations: 21 | has modifier: RO:0002573 22 | 23 | annotationProperties: 24 | exact_synonym: oio:hasExactSynonym 25 | related_synonym: oio:hasRelatedSynonym 26 | 27 | vars: 28 | neoplasm: '''neoplasm''' 29 | 30 | name: 31 | text: benign %s 32 | vars: 33 | - neoplasm 34 | 35 | annotations: 36 | - annotationProperty: exact_synonym 37 | text: '%s, benign' 38 | vars: 39 | - neoplasm 40 | 41 | def: 42 | text: A form of %s without malignant characteristics. 43 | vars: 44 | - neoplasm 45 | 46 | equivalentTo: 47 | text: '%s and ''has modifier'' some ''neoplastic, non-malignant''' 48 | vars: 49 | - neoplasm 50 | -------------------------------------------------------------------------------- /tests/resources/dosdp/benign_neoplasm.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: benign_neoplasm 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/benign_neoplasm.yaml 4 | 5 | description: ' 6 | 7 | Neoplasms are benign or malignant tissue growths resulting from uncontrolled cell 8 | proliferation cell types. 9 | 10 | This is a design pattern for classes representing *benign* neoplasms based on their 11 | location. 12 | 13 | See also: benign.yaml TODO: choose one over another' 14 | 15 | contributors: 16 | - https://orcid.org/0000-0002-6601-2165 17 | 18 | classes: 19 | benign neoplasm: MONDO:0005165 20 | owl_thing: owl:Thing 21 | 22 | relations: 23 | disease has location: RO:0004026 24 | 25 | annotationProperties: 26 | exact_synonym: oio:hasExactSynonym 27 | related_synonym: oio:hasRelatedSynonym 28 | 29 | vars: 30 | location: owl_thing 31 | 32 | name: 33 | text: benign %s neoplasm 34 | vars: 35 | - location 36 | 37 | annotations: 38 | - annotationProperty: exact_synonym 39 | text: '%s benign neoplasm' 40 | vars: 41 | - location 42 | - annotationProperty: exact_synonym 43 | text: '%s benign tumor' 44 | vars: 45 | - location 46 | - annotationProperty: exact_synonym 47 | text: benign neoplasm of %s 48 | vars: 49 | - location 50 | - annotationProperty: exact_synonym 51 | text: benign %s tumor 52 | vars: 53 | - location 54 | - annotationProperty: exact_synonym 55 | text: '%s neoplasm, benign' 56 | vars: 57 | - location 58 | 59 | def: 60 | text: A benign neoplasm involving a %s. 61 | vars: 62 | - location 63 | 64 | equivalentTo: 65 | text: '''benign neoplasm'' and ''disease has location'' some %s' 66 | vars: 67 | - location 68 | -------------------------------------------------------------------------------- /tests/resources/dosdp/cancer.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: cancer 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/cancer.yaml 4 | 5 | description: ' 6 | 7 | Cancers are malignant neoplasms arising from a variety of different cell types. 8 | 9 | This is a design pattern for classes representing cancers based on their location. 10 | This may be the site of origin, but it can also represent a secondary site for metastatized 11 | cancer. 12 | 13 | We use the generic ''disease has location'' relation, which generalized over primary 14 | and secondary sites.' 15 | 16 | contributors: 17 | - https://orcid.org/0000-0002-6601-2165 18 | 19 | classes: 20 | cancer: MONDO:0004992 21 | owl_thing: owl:Thing 22 | 23 | relations: 24 | disease has location: RO:0004026 25 | 26 | annotationProperties: 27 | exact_synonym: oio:hasExactSynonym 28 | related_synonym: oio:hasRelatedSynonym 29 | 30 | vars: 31 | location: owl_thing 32 | 33 | name: 34 | text: '%s cancer' 35 | vars: 36 | - location 37 | 38 | annotations: 39 | - annotationProperty: exact_synonym 40 | text: malignant %s neoplasm 41 | vars: 42 | - location 43 | - annotationProperty: exact_synonym 44 | text: malignant neoplasm of %s 45 | vars: 46 | - location 47 | - annotationProperty: exact_synonym 48 | text: cancer of %s 49 | vars: 50 | - location 51 | 52 | def: 53 | text: A cancer involving a %s. 54 | vars: 55 | - location 56 | 57 | equivalentTo: 58 | text: '''cancer'' and ''disease has location'' some %s' 59 | vars: 60 | - location 61 | -------------------------------------------------------------------------------- /tests/resources/dosdp/carcinoma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: carcinoma 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/carcinoma.yaml 4 | 5 | description: ' 6 | 7 | Carcinomas are malignant neoplasms arising from epithelial cells. 8 | 9 | This is a Design pattern for classes representing carcinomas based on their location. 10 | This may be the site of origin, but it can also represent a secondary site for metastatized 11 | cancer. 12 | 13 | We use the generic ''disease has location'' relation, which generalized over primary 14 | and secondary sites.' 15 | 16 | contributors: 17 | - https://orcid.org/0000-0002-6601-2165 18 | 19 | classes: 20 | carcinoma: MONDO:0004993 21 | owl_thing: owl:Thing 22 | 23 | relations: 24 | disease has location: RO:0004026 25 | 26 | annotationProperties: 27 | exact_synonym: oio:hasExactSynonym 28 | related_synonym: oio:hasRelatedSynonym 29 | 30 | vars: 31 | location: owl_thing 32 | 33 | name: 34 | text: '%s carcinoma' 35 | vars: 36 | - location 37 | 38 | annotations: 39 | - annotationProperty: exact_synonym 40 | text: carcinoma of %s 41 | vars: 42 | - location 43 | 44 | def: 45 | text: A carcinoma involving a %s. 46 | vars: 47 | - location 48 | 49 | equivalentTo: 50 | text: '''carcinoma'' and ''disease has location'' some %s' 51 | vars: 52 | - location 53 | -------------------------------------------------------------------------------- /tests/resources/dosdp/carcinoma_in_situ.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: carcinoma_in_situ 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/carcinoma_in_situ.yaml 4 | 5 | description: 'This is a Design pattern for classes representing in situ carcinomas based on their location. 6 | 7 | Examples: [breast carcinoma in situ](http://purl.obolibrary.org/obo/MONDO_0004658), 8 | [liver carcinoma in situ](http://purl.obolibrary.org/obo/MONDO_0004715)' 9 | 10 | contributors: 11 | - https://orcid.org/0000-0002-6601-2165 12 | - https://orcid.org/0000-0001-5208-3432 13 | 14 | classes: 15 | carcinoma in situ: MONDO:0004647 16 | owl_thing: owl:Thing 17 | 18 | relations: 19 | disease has location: RO:0004026 20 | 21 | annotationProperties: 22 | exact_synonym: oio:hasExactSynonym 23 | related_synonym: oio:hasRelatedSynonym 24 | 25 | vars: 26 | location: owl_thing 27 | 28 | name: 29 | text: '%s carcinoma in situ' 30 | vars: 31 | - location 32 | 33 | annotations: 34 | - annotationProperty: exact_synonym 35 | text: carcinoma in situ of %s 36 | vars: 37 | - location 38 | - annotationProperty: exact_synonym 39 | text: non-invasic %s carcinoma 40 | vars: 41 | - location 42 | - annotationProperty: exact_synonym 43 | text: stage 0 %s carcinoma 44 | vars: 45 | - location 46 | 47 | def: 48 | text: A carcinoma in situ involving a %s. 49 | vars: 50 | - location 51 | 52 | equivalentTo: 53 | text: '''carcinoma in situ'' and ''disease has location'' some %s' 54 | vars: 55 | - location 56 | -------------------------------------------------------------------------------- /tests/resources/dosdp/childhood.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: childhood 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/childhood.yaml 4 | 5 | description: 'An instance of a disease that has an onset of signs or symptoms of disease 6 | between the age of 1 to 5 years (childhood onset). 7 | 8 | Examples: [childhood astrocytic tumor](http://purl.obolibrary.org/obo/MONDO_0002505), 9 | [childhood malignant melanoma](http://purl.obolibrary.org/obo/MONDO_0042494)' 10 | 11 | contributors: 12 | - https://orcid.org/0000-0002-6601-2165 13 | - https://orcid.org/0000-0001-5208-3432 14 | 15 | classes: 16 | childhood: HP:0011463 17 | disease: MONDO:0000001 18 | 19 | relations: 20 | has modifier: RO:0002573 21 | 22 | annotationProperties: 23 | exact_synonym: oio:hasExactSynonym 24 | related_synonym: oio:hasRelatedSynonym 25 | 26 | vars: 27 | disease: '''disease''' 28 | 29 | name: 30 | text: childhood %s 31 | vars: 32 | - disease 33 | 34 | annotations: 35 | - annotationProperty: exact_synonym 36 | text: '%s of childhood' 37 | vars: 38 | - disease 39 | - annotationProperty: related_synonym 40 | text: pediatric %s 41 | vars: 42 | - disease 43 | 44 | def: 45 | text: A %s that occurs during childhood. 46 | vars: 47 | - disease 48 | 49 | equivalentTo: 50 | text: '%s and ''has modifier'' some ''childhood''' 51 | vars: 52 | - disease 53 | -------------------------------------------------------------------------------- /tests/resources/dosdp/chronic.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: chronic 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/chronic.yaml 4 | 5 | description: 'This pattern is applied to diseases that are described as having an chronic duration, i.e. a disease having a slow progressive course of indefinite duration. 6 | 7 | Examples: [chronic bronchitis](http://purl.obolibrary.org/obo/MONDO_0005607), 8 | [chronic hepatitis B virus infection](http://purl.obolibrary.org/obo/MONDO_0005366)' 9 | 10 | contributors: 11 | - https://orcid.org/0000-0002-6601-2165 12 | - https://orcid.org/0000-0001-5208-3432 13 | 14 | classes: 15 | chronic: PATO:0001863 16 | disease: MONDO:0000001 17 | 18 | relations: 19 | has modifier: RO:0002573 20 | 21 | annotationProperties: 22 | exact_synonym: oio:hasExactSynonym 23 | related_synonym: oio:hasRelatedSynonym 24 | 25 | vars: 26 | disease: '''disease''' 27 | 28 | name: 29 | text: chronic %s 30 | vars: 31 | - disease 32 | 33 | annotations: 34 | - annotationProperty: exact_synonym 35 | text: '%s, chronic' 36 | vars: 37 | - disease 38 | 39 | def: 40 | text: Chronic form of %s. 41 | vars: 42 | - disease 43 | 44 | equivalentTo: 45 | text: '%s and ''has modifier'' some ''chronic''' 46 | vars: 47 | - disease 48 | -------------------------------------------------------------------------------- /tests/resources/dosdp/congenital.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: congenital 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/congenital.yaml 4 | 5 | description: 'An instance of a disease in which the disease is present at birth, regardless of cause. 6 | 7 | Examples: [congenital agammaglobulinemia](http://purl.obolibrary.org/obo/MONDO_0001902), 8 | [congenital nystagmus](http://purl.obolibrary.org/obo/MONDO_0005712)' 9 | 10 | contributors: 11 | - https://orcid.org/0000-0002-6601-2165 12 | - https://orcid.org/0000-0001-5208-3432 13 | 14 | classes: 15 | congenital: MONDO:0021140 16 | disease: MONDO:0000001 17 | 18 | relations: 19 | has modifier: RO:0002573 20 | 21 | annotationProperties: 22 | exact_synonym: oio:hasExactSynonym 23 | related_synonym: oio:hasRelatedSynonym 24 | 25 | vars: 26 | disease: '''disease''' 27 | 28 | name: 29 | text: congenital %s 30 | vars: 31 | - disease 32 | 33 | annotations: 34 | - annotationProperty: exact_synonym 35 | text: congenital %s 36 | vars: 37 | - disease 38 | 39 | def: 40 | text: An instance of %s that is present from birth. 41 | vars: 42 | - disease 43 | 44 | equivalentTo: 45 | text: '%s and ''has modifier'' some ''congenital''' 46 | vars: 47 | - disease 48 | -------------------------------------------------------------------------------- /tests/resources/dosdp/consequence_of_infectious_disease.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: consequence_of_infectious_disease 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/consequence_of_infectious_disease.yaml 4 | 5 | description: 'This pattern is applied to a disease that is caused by an infectious agent. 6 | 7 | Examples: [hepatitis C induced liver cirrhosis](http://purl.obolibrary.org/obo/MONDO_0005448), 8 | [rubella encephalitis](http://purl.obolibrary.org/obo/MONDO_0020648)' 9 | 10 | contributors: 11 | - https://orcid.org/0000-0002-6601-2165 12 | - https://orcid.org/0000-0001-5208-3432 13 | 14 | classes: 15 | disease: MONDO:0000001 16 | infectious disease: MONDO:0005550 17 | 18 | relations: 19 | disease arises from feature: RO:0004022 20 | 21 | annotationProperties: 22 | exact_synonym: oio:hasExactSynonym 23 | related_synonym: oio:hasRelatedSynonym 24 | 25 | vars: 26 | parent: disease 27 | cause: '''infectious disease''' 28 | 29 | name: 30 | text: '%s %s' 31 | vars: 32 | - cause 33 | - parent 34 | 35 | def: 36 | text: A %s that arises as a consequence of %s. 37 | vars: 38 | - parent 39 | - cause 40 | 41 | equivalentTo: 42 | text: '%s and ''disease arises from feature'' some %s' 43 | vars: 44 | - parent 45 | - cause 46 | -------------------------------------------------------------------------------- /tests/resources/dosdp/dependence_on_substance.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: dependence_on_substance 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/dependence_on_substance.yaml 4 | 5 | description: 'Dependence on a substance that specifies the environmental stimulus such as alcohol, cocaine, etc. Example: [dependence on cocaine](http://purl.obolibrary.org/obo/MONDO_0005186).' 6 | 7 | contributors: 8 | - https://orcid.org/0000-0002-6601-2165 9 | - https://orcid.org/0000-0001-5208-3432 10 | - https://orcid.org/0000-0002-7463-6306 11 | 12 | classes: 13 | substance dependence: MONDO:0004938 14 | chemical: CHEBI:24431 15 | 16 | relations: 17 | realized in response to stimulus: RO:0004028 18 | 19 | annotationProperties: 20 | exact_synonym: oio:hasExactSynonym 21 | 22 | vars: 23 | stimulus: '''chemical''' 24 | 25 | name: 26 | text: 'dependence on %s' 27 | vars: 28 | - stimulus 29 | 30 | annotations: 31 | - annotationProperty: exact_synonym 32 | text: '%s dependence' 33 | vars: 34 | - stimulus 35 | 36 | 37 | def: 38 | text: A substance dependence on %s. 39 | vars: 40 | - stimulus 41 | 42 | equivalentTo: 43 | text: '''substance dependence'' and ''realized in response to stimulus'' some %s' 44 | vars: 45 | - stimulus 46 | -------------------------------------------------------------------------------- /tests/resources/dosdp/disease_by_dysfunctional_structure.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: disease_by_dysfunctional_structure 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/disease_by_dysfunctional_structure.yaml 4 | 5 | description: ' 6 | 7 | Diseases classified by a perturbation in an anatomical structure (such as a subcellular 8 | component, or an organ)' 9 | 10 | contributors: 11 | - https://orcid.org/0000-0002-6601-2165 12 | 13 | classes: 14 | disease: MONDO:0000001 15 | anatomical structure: UBERON:0000061 16 | 17 | relations: 18 | disease has basis in dysfunction of: RO:0004020 19 | 20 | annotationProperties: 21 | exact_synonym: oio:hasExactSynonym 22 | related_synonym: oio:hasRelatedSynonym 23 | 24 | vars: 25 | structure: '''anatomical structure''' 26 | 27 | name: 28 | text: '%s disease' 29 | vars: 30 | - structure 31 | 32 | annotations: 33 | - annotationProperty: exact_synonym 34 | text: disease of %s 35 | vars: 36 | - structure 37 | 38 | def: 39 | text: Any disease in which the causes of the disease is a perturbation of the %s 40 | leading to its dysfunction. 41 | vars: 42 | - structure 43 | 44 | equivalentTo: 45 | text: '''disease'' and ''disease has basis in dysfunction of'' some %s' 46 | vars: 47 | - structure 48 | -------------------------------------------------------------------------------- /tests/resources/dosdp/disease_series_by_gene.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: disease_series_by_gene 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/disease_series_by_gene.yaml 4 | 5 | description: 'This pattern is for diseases that are caused by a single mutation in 6 | a single gene, that have gene-based names, such as new disease terms that are requested 7 | by ClinGen, like MED12-related intellectual disability syndrome. Examples: [MED12-related 8 | intellectual disability syndrome](http://purl.obolibrary.org/obo/MONDO_0100000), 9 | [TTN-related myopathy](http://purl.obolibrary.org/obo/MONDO_0100175), [MYPN-related 10 | myopathy](http://purl.obolibrary.org/obo/MONDO_0015023)' 11 | 12 | contributors: 13 | - https://orcid.org/0000-0002-6601-2165 14 | - https://orcid.org/0000-0001-5208-3432 15 | 16 | classes: 17 | disease: MONDO:0000001 18 | gene: SO:0001217 19 | 20 | relations: 21 | disease has basis in dysfunction of: RO:0004020 22 | 23 | annotationProperties: 24 | exact_synonym: oio:hasExactSynonym 25 | related_synonym: oio:hasRelatedSynonym 26 | 27 | vars: 28 | disease: '''disease''' 29 | gene: '''gene''' 30 | 31 | name: 32 | text: '%s caused by mutation in %s' 33 | vars: 34 | - disease 35 | - gene 36 | 37 | annotations: 38 | - annotationProperty: exact_synonym 39 | text: '%s %s' 40 | vars: 41 | - gene 42 | - disease 43 | - annotationProperty: exact_synonym 44 | text: '%s related %s' 45 | vars: 46 | - gene 47 | - disease 48 | 49 | def: 50 | text: Any %s in which the cause of the disease is a mutation in the %s gene. 51 | vars: 52 | - disease 53 | - gene 54 | 55 | equivalentTo: 56 | text: '%s and ''disease has basis in dysfunction of'' some %s' 57 | vars: 58 | - disease 59 | - gene 60 | -------------------------------------------------------------------------------- /tests/resources/dosdp/disease_series_by_gene_and_inheritance.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: disease_series_by_gene_and_inheritance 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/disease_series_by_gene.yaml 4 | 5 | description: "This pattern is for diseases that are caused by a single mutation in\ 6 | \ a single gene, that have gene-based names, and are inherited by a specific mechanism,\ 7 | \ succh as autosomal dominant and autosomal recessive. \nExamples: [Growth hormone\ 8 | \ insensitivity syndrome with immune dysregulation](https://omim.org/phenotypicSeries/PS245590),\ 9 | \ Growth hormone insensitivity with immune dysregulation 1, autosomal recessive\ 10 | \ and Growth hormone insensitivity with immune dysregulation 2, autosomal dominant" 11 | 12 | contributors: 13 | - https://orcid.org/0000-0002-6601-2165 14 | - https://orcid.org/0000-0001-5208-3432 15 | - https://orcid.org/0000-0002-7356-1779 16 | 17 | classes: 18 | disease: MONDO:0000001 19 | gene: SO:0000704 20 | mode of inheritance: HP:0000005 21 | 22 | relations: 23 | disease has basis in dysfunction of: RO:0004020 24 | has modifier: RO:0002573 25 | 26 | annotationProperties: 27 | exact_synonym: oio:hasExactSynonym 28 | related_synonym: oio:hasRelatedSynonym 29 | 30 | vars: 31 | disease: '''disease''' 32 | gene: '''gene''' 33 | mode_of_inheritance: '''mode of inheritance''' 34 | 35 | name: 36 | text: '%s caused by mutation in %s, %s' 37 | vars: 38 | - disease 39 | - gene 40 | - mode_of_inheritance 41 | 42 | annotations: 43 | - annotationProperty: exact_synonym 44 | text: '%s %s, %s' 45 | vars: 46 | - gene 47 | - disease 48 | - mode_of_inheritance 49 | - annotationProperty: exact_synonym 50 | text: '%s related %s, %s' 51 | vars: 52 | - gene 53 | - disease 54 | - mode_of_inheritance 55 | 56 | def: 57 | text: Any %s in which the cause of the disease is a mutation in the %s gene, and 58 | has %s. 59 | vars: 60 | - disease 61 | - gene 62 | - mode_of_inheritance 63 | 64 | equivalentTo: 65 | text: '%s and ''disease has basis in dysfunction of'' some %s and ''has modifier'' 66 | some %s' 67 | vars: 68 | - disease 69 | - gene 70 | - mode_of_inheritance 71 | -------------------------------------------------------------------------------- /tests/resources/dosdp/disrupts_process.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: disease or disorder disease caused by disruption of X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/disrupts_process.yaml 4 | 5 | description: 'A disease that disrupts a process, like immune system function, or early 6 | development. 7 | 8 | Examples: [type III hypersensitivity disease](http://purl.obolibrary.org/obo/MONDO_0007004), 9 | [type IV hypersensitivity disease](http://purl.obolibrary.org/obo/MONDO_0002459), 10 | [neural tube closure defect](http://purl.obolibrary.org/obo/MONDO_0017059) (55 total)' 11 | 12 | contributors: 13 | - https://orcid.org/0000-0002-6601-2165 14 | 15 | classes: 16 | disease or disorder: MONDO:0000001 17 | owl_thing: owl:Thing 18 | 19 | relations: 20 | disease caused by disruption of: RO:0004021 21 | 22 | annotationProperties: 23 | exact_synonym: oio:hasExactSynonym 24 | related_synonym: oio:hasRelatedSynonym 25 | 26 | vars: 27 | process: owl_thing 28 | 29 | name: 30 | text: '%s disease' 31 | vars: 32 | - process 33 | 34 | annotations: 35 | - annotationProperty: exact_synonym 36 | text: disorder of %s 37 | vars: 38 | - process 39 | 40 | def: 41 | text: A disease that has its basis in the disruption of %s. 42 | vars: 43 | - process 44 | 45 | equivalentTo: 46 | text: '''disease or disorder'' and (''disease caused by disruption of'' some %s)' 47 | vars: 48 | - process 49 | -------------------------------------------------------------------------------- /tests/resources/dosdp/environmental_stimulus.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: environmental_stimulus 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/environmental_stimulus.yaml 4 | 5 | description: 'A disease that is caused by exposure to an environmental stimulus, like 6 | the sun or pesticides. Examples: [carbon monoxide-induced parkinsonism](http://purl.obolibrary.org/obo/MONDO_0017639), 7 | [cocaine intoxication](http://purl.obolibrary.org/obo/MONDO_0019544)' 8 | 9 | contributors: 10 | - https://orcid.org/0000-0002-6601-2165 11 | - https://orcid.org/0000-0001-5208-3432 12 | 13 | classes: 14 | disease: MONDO:0000001 15 | material entity: BFO:0000040 16 | 17 | relations: 18 | realized in response to stimulus: RO:0004028 19 | 20 | annotationProperties: 21 | exact_synonym: oio:hasExactSynonym 22 | related_synonym: oio:hasRelatedSynonym 23 | 24 | vars: 25 | disease: '''disease''' 26 | stimulus: '''material entity''' 27 | 28 | name: 29 | text: '%s from %s' 30 | vars: 31 | - disease 32 | - stimulus 33 | 34 | annotations: 35 | - annotationProperty: exact_synonym 36 | text: '%s %s' 37 | vars: 38 | - stimulus 39 | - disease 40 | 41 | def: 42 | text: A %s that is caused by exposure to %s. 43 | vars: 44 | - disease 45 | - stimulus 46 | 47 | equivalentTo: 48 | text: '%s and ''realized in response to stimulus'' some %s' 49 | vars: 50 | - disease 51 | - stimulus 52 | -------------------------------------------------------------------------------- /tests/resources/dosdp/genetic.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: genetic 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/genetic.yaml 4 | 5 | description: TBD. 6 | 7 | contributors: 8 | - https://orcid.org/0000-0002-6601-2165 9 | - https://orcid.org/0000-0001-5208-3432 10 | 11 | classes: 12 | genetic: MONDO:0021150 13 | disease: MONDO:0000001 14 | 15 | relations: 16 | has modifier: RO:0002573 17 | 18 | annotationProperties: 19 | exact_synonym: oio:hasExactSynonym 20 | related_synonym: oio:hasRelatedSynonym 21 | 22 | vars: 23 | disease: '''disease''' 24 | 25 | name: 26 | text: genetic %s 27 | vars: 28 | - disease 29 | 30 | annotations: 31 | - annotationProperty: exact_synonym 32 | text: genetic %s 33 | vars: 34 | - disease 35 | 36 | def: 37 | text: An instance of %s that is caused by a genetic modification in an individual. 38 | vars: 39 | - disease 40 | 41 | equivalentTo: 42 | text: '%s and ''has modifier'' some ''genetic''' 43 | vars: 44 | - disease 45 | -------------------------------------------------------------------------------- /tests/resources/dosdp/hemangioma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: hemangioma disease has location X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/hemangioma.yaml 4 | 5 | description: 'A hemangioma (a benign vascular lesion characterized by the formation 6 | of capillary-sized or cavernous vascular channels) that is located in a specific 7 | anatomical site. 8 | 9 | Examples: [skin hemangioma](http://purl.obolibrary.org/obo/MONDO_0003110), [breast 10 | hemangioma](http://purl.obolibrary.org/obo/MONDO_0003126), [gastric hemangioma](http://purl.obolibrary.org/obo/MONDO_0002414) 11 | (20 total)' 12 | 13 | contributors: 14 | - https://orcid.org/0000-0002-6601-2165 15 | - https://orcid.org/0000-0001-5208-3432 16 | 17 | classes: 18 | hemangioma: MONDO:0006500 19 | anatomical entity: UBERON:0001062 20 | 21 | relations: 22 | disease has location: RO:0004026 23 | 24 | annotationProperties: 25 | exact_synonym: oio:hasExactSynonym 26 | related_synonym: oio:hasRelatedSynonym 27 | 28 | vars: 29 | location: '''anatomical entity''' 30 | 31 | name: 32 | text: hemangioma of %s 33 | vars: 34 | - location 35 | 36 | annotations: 37 | - annotationProperty: exact_synonym 38 | text: '%s hemangioma' 39 | vars: 40 | - location 41 | - annotationProperty: related_synonym 42 | text: angioma of %s 43 | vars: 44 | - location 45 | 46 | def: 47 | text: A hemangioma that involves the %s. 48 | vars: 49 | - location 50 | 51 | equivalentTo: 52 | text: '''hemangioma'' and (''disease has location'' some %s)' 53 | vars: 54 | - location 55 | -------------------------------------------------------------------------------- /tests/resources/dosdp/hereditary.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: hereditary 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/hereditary.yaml 4 | 5 | description: ' 6 | 7 | Pattern for extending a etiology-generic disease class to a hereditary form. Here 8 | hereditary means that etiology is largely genetic, and that the disease is passed 9 | down or potentially able to be passed down via inheritance (i.e is germline).' 10 | 11 | contributors: 12 | - https://orcid.org/0000-0002-6601-2165 13 | - https://orcid.org/0000-0001-5208-3432 14 | 15 | classes: 16 | hereditary: MONDO:0021152 17 | disease: MONDO:0000001 18 | 19 | relations: 20 | has modifier: RO:0002573 21 | 22 | annotationProperties: 23 | exact_synonym: oio:hasExactSynonym 24 | 25 | vars: 26 | disease: '''disease''' 27 | 28 | name: 29 | text: hereditary %s 30 | vars: 31 | - disease 32 | 33 | annotations: 34 | - annotationProperty: exact_synonym 35 | text: hereditary %s 36 | vars: 37 | - disease 38 | 39 | def: 40 | text: An instance of %s that is caused by an inherited genomic modification in an 41 | individual. 42 | vars: 43 | - disease 44 | 45 | equivalentTo: 46 | text: '%s and ''has modifier'' some ''hereditary''' 47 | vars: 48 | - disease 49 | -------------------------------------------------------------------------------- /tests/resources/dosdp/idiopathic.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: idiopathic 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/idiopathic.yaml 4 | 5 | description: 'This pattern is applied to diseases that are described as being idiopathic, i.e. having an uncertain or unknown cause. 6 | 7 | Examples: [idiopathic aplastic anemia](http://purl.obolibrary.org/obo/MONDO_0012197), 8 | [idiopathic avascular necrosis](http://purl.obolibrary.org/obo/MONDO_0018380)' 9 | 10 | contributors: 11 | - https://orcid.org/0000-0002-4142-7153 12 | 13 | classes: 14 | idiopathic: MONDO:0700005 15 | disease: MONDO:0000001 16 | 17 | relations: 18 | has modifier: RO:0002573 19 | 20 | annotationProperties: 21 | exact_synonym: oio:hasExactSynonym 22 | related_synonym: oio:hasRelatedSynonym 23 | 24 | vars: 25 | disease: "'disease'" 26 | 27 | name: 28 | text: idiopathic %s 29 | vars: 30 | - disease 31 | 32 | annotations: 33 | - annotationProperty: exact_synonym 34 | text: '%s, idiopathic' 35 | vars: 36 | - disease 37 | 38 | def: 39 | text: Idiopathic form of %s. 40 | vars: 41 | - disease 42 | 43 | equivalentTo: 44 | text: '%s and ''has modifier'' some ''idiopathic''' 45 | vars: 46 | - disease 47 | -------------------------------------------------------------------------------- /tests/resources/dosdp/inborn_metabolic.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: inborn_metabolic 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/inborn_metabolic.yaml 4 | 5 | description: An acquired metabolic disease that causes disruption of a process. 6 | 7 | contributors: 8 | - https://orcid.org/0000-0002-6601-2165 9 | - https://orcid.org/0000-0001-5208-3432 10 | 11 | classes: 12 | ieom: MONDO:0019052 13 | process: BFO:0000015 14 | 15 | relations: 16 | disease has basis in disruption of: RO:0004021 17 | 18 | annotationProperties: 19 | exact_synonym: oio:hasExactSynonym 20 | related_synonym: oio:hasRelatedSynonym 21 | 22 | vars: 23 | process: '''process''' 24 | 25 | name: 26 | text: inborn %s disorder 27 | vars: 28 | - process 29 | 30 | annotations: 31 | - annotationProperty: related_synonym 32 | text: rare inborn error of %s 33 | vars: 34 | - process 35 | - annotationProperty: exact_synonym 36 | text: inborn error of %s 37 | vars: 38 | - process 39 | 40 | def: 41 | text: An acquired metabolic disease that is has its basis in the disruption of %s. 42 | vars: 43 | - process 44 | 45 | equivalentTo: 46 | text: '''ieom'' and ''disease has basis in disruption of'' some %s' 47 | vars: 48 | - process 49 | -------------------------------------------------------------------------------- /tests/resources/dosdp/inborn_metabolic_disrupts.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: inborn errors of metabolism disease caused by disruption of X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/inborn_metabolic_disrupts.yaml 4 | 5 | description: "This pattern is used for inborn errors of metabolism that cause disruption\ 6 | \ of a specific biological process, such as enzyme activity or ion transport. \n\ 7 | Examples: ['5-oxoprolinase deficiency (disease)'](http://purl.obolibrary.org/obo/MONDO_0009825),\ 8 | \ [inborn disorder of methionine cycle and sulfur amino acid metabolism](http://purl.obolibrary.org/obo/MONDO_0019222),\ 9 | \ [inborn aminoacylase deficiency](http://purl.obolibrary.org/obo/MONDO_0017686)\ 10 | \ (51 total)" 11 | 12 | contributors: 13 | - https://orcid.org/0000-0002-6601-2165 14 | - https://orcid.org/0000-0001-5208-3432 15 | 16 | classes: 17 | inborn errors of metabolism: MONDO:0019052 18 | owl_thing: owl:Thing 19 | 20 | relations: 21 | disease caused by disruption of: RO:0004021 22 | 23 | annotationProperties: 24 | exact_synonym: oio:hasExactSynonym 25 | related_synonym: oio:hasRelatedSynonym 26 | 27 | vars: 28 | process: '''owl_thing''' 29 | 30 | name: 31 | text: inborn disorder of %s 32 | vars: 33 | - process 34 | 35 | annotations: 36 | - annotationProperty: exact_synonym 37 | text: inborn error of %s 38 | vars: 39 | - process 40 | - annotationProperty: related_synonym 41 | text: rare inborn error of %s 42 | vars: 43 | - process 44 | 45 | def: 46 | text: An acquired metabolic disease that is has its basis in the disruption of %s. 47 | vars: 48 | - process 49 | 50 | equivalentTo: 51 | text: '''inborn errors of metabolism'' and (''disease caused by disruption of'' some %s)' 52 | vars: 53 | - process 54 | -------------------------------------------------------------------------------- /tests/resources/dosdp/infantile.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: infantile 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/infantile.yaml 4 | 5 | description: 'An instance of a disease that has an onset of signs or symptoms of disease 6 | within the first 12 months of life (infantile onset). 7 | 8 | Examples: [infant botulism](http://purl.obolibrary.org/obo/MONDO_0015804), [infantile 9 | glycine encephalopathy](http://purl.obolibrary.org/obo/MONDO_0017354)' 10 | 11 | contributors: 12 | - https://orcid.org/0000-0002-6601-2165 13 | - https://orcid.org/0000-0001-5208-3432 14 | 15 | classes: 16 | infantile: HP:0003593 17 | disease: MONDO:0000001 18 | 19 | relations: 20 | has modifier: RO:0002573 21 | 22 | annotationProperties: 23 | exact_synonym: oio:hasExactSynonym 24 | related_synonym: oio:hasRelatedSynonym 25 | 26 | vars: 27 | disease: '''disease''' 28 | 29 | name: 30 | text: infantile %s 31 | vars: 32 | - disease 33 | 34 | annotations: 35 | - annotationProperty: exact_synonym 36 | text: infantile onset %s 37 | vars: 38 | - disease 39 | - annotationProperty: exact_synonym 40 | text: '%s of infancy' 41 | vars: 42 | - disease 43 | 44 | def: 45 | text: A %s that occurs between 28 days to one year of life.. 46 | vars: 47 | - disease 48 | 49 | equivalentTo: 50 | text: '%s and ''has modifier'' some ''infantile''' 51 | vars: 52 | - disease 53 | -------------------------------------------------------------------------------- /tests/resources/dosdp/infectious_disease_by_agent.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: infectious_disease_by_agent 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/infectious_disease_by_agent.yaml 4 | 5 | description: 'Infectious diseases can be classified by the infectioos agent, such 6 | as bacteria, coronavirus, etc, that causes the disease. 7 | 8 | Examples: [COVID-19](http://purl.obolibrary.org/obo/MONDO_0100096), [cholera](http://purl.obolibrary.org/obo/MONDO_0015766)' 9 | 10 | contributors: 11 | - https://orcid.org/0000-0002-6601-2165 12 | - https://orcid.org/0000-0001-5208-3432 13 | 14 | classes: 15 | disease: MONDO:0000001 16 | organism: NCBITaxon:1 17 | infectious disease: MONDO:0005550 18 | 19 | relations: 20 | disease has infectious agent: RO:0014001 21 | 22 | annotationProperties: 23 | exact_synonym: oio:hasExactSynonym 24 | related_synonym: oio:hasRelatedSynonym 25 | 26 | vars: 27 | agent: '''organism''' 28 | 29 | name: 30 | text: '%s infectious disease' 31 | vars: 32 | - agent 33 | 34 | annotations: 35 | - annotationProperty: exact_synonym 36 | text: infection due to %s 37 | vars: 38 | - agent 39 | - annotationProperty: exact_synonym 40 | text: '%s infection' 41 | vars: 42 | - agent 43 | 44 | def: 45 | text: A disease caused by infection with %s. 46 | vars: 47 | - agent 48 | 49 | equivalentTo: 50 | text: '''infectious disease'' and ''disease has infectious agent'' some %s' 51 | vars: 52 | - agent 53 | -------------------------------------------------------------------------------- /tests/resources/dosdp/infectious_inflammation.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: infectious_inflammation 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/infectious_inflammation.yaml 4 | 5 | description: ' 6 | 7 | This combines the [infectious disease by agent pattern](https://github.com/monarch-initiative/mondo/blob/master/src/patterns/dosdp-patterns/infectious_disease_by_agent.yaml) 8 | and the [inflammatory disease by site](https://github.com/monarch-initiative/mondo/blob/master/src/patterns/dosdp-patterns/inflammatory_disease_by_site.yaml) 9 | pattern. 10 | 11 | Examples: [bacterial endocarditis (disease)](http://purl.obolibrary.org/obo/MONDO_0006669), 12 | [fungal gastritis](http://purl.obolibrary.org/obo/MONDO_0002843)' 13 | 14 | contributors: 15 | - https://orcid.org/0000-0002-6601-2165 16 | - https://orcid.org/0000-0001-5208-3432 17 | 18 | classes: 19 | disease: MONDO:0000001 20 | organism: NCBITaxon:1 21 | anatomical structure: UBERON:0000061 22 | infectious disease: MONDO:0005550 23 | 24 | relations: 25 | disease has inflammation site: RO:0004027 26 | realized in response to stimulus: RO:0004028 27 | 28 | annotationProperties: 29 | exact_synonym: oio:hasExactSynonym 30 | related_synonym: oio:hasRelatedSynonym 31 | 32 | vars: 33 | location: '''anatomical structure''' 34 | agent: '''organism''' 35 | 36 | name: 37 | text: inflammation of %s due to %s 38 | vars: 39 | - location 40 | - agent 41 | 42 | annotations: 43 | - annotationProperty: exact_synonym 44 | text: '%s %s inflammation' 45 | vars: 46 | - location 47 | - agent 48 | 49 | def: 50 | text: An inflammatory disease involving a pathogenic inflammatory response in the 51 | %s caused by infection with %s. 52 | vars: 53 | - location 54 | - agent 55 | 56 | equivalentTo: 57 | text: '''infectious disease'' and ''disease has inflammation site'' some %s and 58 | ''realized in response to stimulus'' some %s' 59 | vars: 60 | - location 61 | - agent 62 | -------------------------------------------------------------------------------- /tests/resources/dosdp/inflammatory_disease_by_site.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: inflammatory_disease_by_site 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/inflammatory_disease_by_site.yaml 4 | 5 | description: ' 6 | 7 | Inflammatory diseases can be classified by the location in which the pathological 8 | inflammatory process occurs. 9 | 10 | For inflammatory diseases caused by infection, this may be the site of infection. 11 | 12 | Examples: [''Achilles bursitis''](http://purl.obolibrary.org/obo/MONDO_0001594), 13 | [blepharitis](http://purl.obolibrary.org/obo/MONDO_0004785), [epiglottitis](http://purl.obolibrary.org/obo/MONDO_0005753)' 14 | 15 | contributors: 16 | - https://orcid.org/0000-0002-6601-2165 17 | - https://orcid.org/0000-0001-5208-3432 18 | 19 | classes: 20 | disease: MONDO:0000001 21 | anatomical structure: UBERON:0000061 22 | 23 | relations: 24 | disease has inflammation site: RO:0004027 25 | 26 | annotationProperties: 27 | exact_synonym: oio:hasExactSynonym 28 | related_synonym: oio:hasRelatedSynonym 29 | 30 | vars: 31 | location: '''anatomical structure''' 32 | 33 | name: 34 | text: inflammation of %s 35 | vars: 36 | - location 37 | 38 | annotations: 39 | - annotationProperty: exact_synonym 40 | text: '%sitis' 41 | vars: 42 | - location 43 | - annotationProperty: exact_synonym 44 | text: '%s inflammation' 45 | vars: 46 | - location 47 | 48 | def: 49 | text: An inflammatory disease involving a pathogenic inflammatory response in the 50 | %s. 51 | vars: 52 | - location 53 | 54 | equivalentTo: 55 | text: '''disease'' and ''disease has inflammation site'' some %s' 56 | vars: 57 | - location 58 | -------------------------------------------------------------------------------- /tests/resources/dosdp/inherited_susceptibility.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: inherited_susceptibility 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/inherited_susceptibility.yaml 4 | 5 | description: 'This pattern should be used for children of MONDO_0020573''inherited 6 | disease susceptibility'', including OMIM phenotypic series (OMIMPS) for which the 7 | subclasses are susceptibilities. Note, this pattern should not have an asserted 8 | causative gene as logical axiom (and no single causative gene in text definition), 9 | in those cases, the susceptibility_by_gene pattern should be used instead. The children 10 | should have asserted causative genes in the text definitions and in the logical 11 | axioms. This pattern is a superclass of the susceptibility_by_gene pattern. 12 | 13 | Examples: [''microvascular complications of diabetes, susceptibility''](http://purl.obolibrary.org/obo/MONDO_0000065), 14 | [''epilepsy, idiopathic generalized''](http://purl.obolibrary.org/obo/MONDO_0005579), 15 | [''aspergillosis, susceptibility to''](http://purl.obolibrary.org/obo/MONDO_0013562).' 16 | 17 | contributors: 18 | - https://orcid.org/0000-0002-6601-2165 19 | - https://orcid.org/0000-0001-5208-3432 20 | 21 | classes: 22 | disease or disorder: MONDO:0000001 23 | inherited disease susceptibility: MONDO:0020573 24 | 25 | relations: 26 | predisposes towards: http://purl.obolibrary.org/obo/mondo#predisposes_towards 27 | 28 | annotationProperties: 29 | exact_synonym: oio:hasExactSynonym 30 | related_synonym: oio:hasRelatedSynonym 31 | 32 | vars: 33 | disease: '''disease or disorder''' 34 | 35 | name: 36 | text: '%s susceptibility' 37 | vars: 38 | - disease 39 | 40 | annotations: 41 | - annotationProperty: exact_synonym 42 | text: '%s, susceptibility' 43 | vars: 44 | - disease 45 | - annotationProperty: exact_synonym 46 | text: '%s, susceptibility to' 47 | vars: 48 | - disease 49 | 50 | def: 51 | text: An inherited susceptibility or predisposition to developing %s. 52 | vars: 53 | - disease 54 | 55 | equivalentTo: 56 | text: ('inherited disease susceptibility' and ('predisposes towards' some %s)) 57 | vars: 58 | - disease 59 | -------------------------------------------------------------------------------- /tests/resources/dosdp/isolated.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: isolated 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/isolated.yaml 4 | 5 | description: 'Some diseases exist in both isolated and syndromic forms. For example, 6 | aniridia ([MONDO_0019172 aniridia](http://purl.obolibrary.org/obo/MONDO_0019172), 7 | [MONDO_0020148''syndromic aniridia''](http://purl.obolibrary.org/obo/MONDO_0020148) 8 | and [MONDO_0007119 ''isolated aniridia''](http://purl.obolibrary.org/obo/MONDO_0007119). 9 | Use this pattern to define the isolated form of a disease when a term exists for 10 | the isolated/syndromic-neutral version. In general, this pattern should be used 11 | in parallel with syndromic. E.g. if you make a term ''syndromic disease, you should 12 | also have ''isolated disease'' [see pattern here(https://github.com/monarch-initiative/mondo/blob/master/src/patterns/dosdp-patterns/syndromic.yaml). Note 13 | that the isolated and syndromic forms will be inferred to be disjoint due to the 14 | GCI pattern. 15 | 16 | Examples: [''isolated aniridia''](http://purl.obolibrary.org/obo/MONDO_0007119), 17 | [''isolated dystonia''](http://purl.obolibrary.org/obo/MONDO_0015494), [''isolated 18 | focal palmoplantar keratoderma''](http://purl.obolibrary.org/obo/MONDO_0017673)' 19 | 20 | contributors: 21 | - https://orcid.org/0000-0002-6601-2165 22 | - https://orcid.org/0000-0001-5208-3432 23 | 24 | classes: 25 | isolated: MONDO:0021128 26 | disease: MONDO:0000001 27 | 28 | relations: 29 | has modifier: RO:0002573 30 | 31 | annotationProperties: 32 | exact_synonym: oio:hasExactSynonym 33 | related_synonym: oio:hasRelatedSynonym 34 | 35 | vars: 36 | disease: '''disease''' 37 | 38 | name: 39 | text: isolated %s 40 | vars: 41 | - disease 42 | 43 | annotations: 44 | - annotationProperty: exact_synonym 45 | text: nonsyndromic %s 46 | vars: 47 | - disease 48 | 49 | def: 50 | text: A %s that is not part of a larger syndrome. 51 | vars: 52 | - disease 53 | 54 | equivalentTo: 55 | text: '%s and ''has modifier'' some ''isolated''' 56 | vars: 57 | - disease 58 | -------------------------------------------------------------------------------- /tests/resources/dosdp/juvenile.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: juvenile 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/juvenile.yaml 4 | 5 | description: 'An instance of a disease that has an onset of signs or symptoms of disease 6 | between the age of 5 and 15 years (juvenile onset). 7 | 8 | Examples: [juvenile-onset Parkinson disease](http://purl.obolibrary.org/obo/MONDO_0000828), 9 | [''juvenile idiopathic scoliosis''](http://purl.obolibrary.org/obo/MONDO_0100076)' 10 | 11 | contributors: 12 | - https://orcid.org/0000-0002-6601-2165 13 | - https://orcid.org/0000-0001-5208-3432 14 | 15 | classes: 16 | juvenile: HP:0003621 17 | disease: MONDO:0000001 18 | 19 | relations: 20 | has modifier: RO:0002573 21 | 22 | annotationProperties: 23 | exact_synonym: oio:hasExactSynonym 24 | related_synonym: oio:hasRelatedSynonym 25 | 26 | vars: 27 | disease: '''disease''' 28 | 29 | name: 30 | text: juvenile %s 31 | vars: 32 | - disease 33 | 34 | annotations: 35 | - annotationProperty: exact_synonym 36 | text: juvenile %s 37 | vars: 38 | - disease 39 | 40 | def: 41 | text: An instance of %s that has a juvenile onset. 42 | vars: 43 | - disease 44 | 45 | equivalentTo: 46 | text: '%s and ''has modifier'' some ''juvenile''' 47 | vars: 48 | - disease 49 | -------------------------------------------------------------------------------- /tests/resources/dosdp/leiomyoma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: leiomyoma disease has location X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/leiomyoma.yaml 4 | 5 | description: 'A leiomyoma (a well-circumscribed benign smooth muscle neoplasm characterized 6 | by the presence of spindle cells with cigar-shaped nuclei, interlacing fascicles, 7 | and a whorled pattern) that is located in a specific anatomical entity. 8 | 9 | Examples: [leiomyoma cutis](http://purl.obolibrary.org/obo/MONDO_0003291), [ureter 10 | leiomyoma](http://purl.obolibrary.org/obo/MONDO_0001399), [urethra leiomyoma](http://purl.obolibrary.org/obo/MONDO_0002222) 11 | (30 total)' 12 | 13 | contributors: 14 | - https://orcid.org/0000-0002-6601-2165 15 | - https://orcid.org/0000-0001-5208-3432 16 | 17 | classes: 18 | leiomyoma: MONDO:0001572 19 | anatomical entity: UBERON:0001062 20 | 21 | relations: 22 | disease has location: RO:0004026 23 | 24 | annotationProperties: 25 | exact_synonym: oio:hasExactSynonym 26 | related_synonym: oio:hasRelatedSynonym 27 | 28 | vars: 29 | location: '''anatomical entity''' 30 | 31 | name: 32 | text: '%s leiomyoma' 33 | vars: 34 | - location 35 | 36 | annotations: 37 | - annotationProperty: exact_synonym 38 | text: '%s leiomyoma' 39 | vars: 40 | - location 41 | 42 | def: 43 | text: A benign smooth muscle neoplasm arising from the %s. It is characterized by 44 | the presence of spindle cells with cigar-shaped nuclei, interlacing fascicles, 45 | and a whorled pattern. 46 | vars: 47 | - location 48 | 49 | equivalentTo: 50 | text: '''leiomyoma'' and (''disease has location'' some %s)' 51 | vars: 52 | - location 53 | -------------------------------------------------------------------------------- /tests/resources/dosdp/leiomyosarcoma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: leiomyosarcoma disease has location X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/leiomyosarcoma.yaml 4 | 5 | description: 'An uncommon, aggressive malignant smooth muscle neoplasm, usually occurring 6 | in post-menopausal women that is characterized by a proliferation of neoplastic 7 | spindle cells that is located in a specific anatomical location. 8 | 9 | Examples: [leiomyosarcoma of the cervix uteri](http://purl.obolibrary.org/obo/MONDO_0016283), 10 | [cutaneous leiomyosarcoma (disease)](http://purl.obolibrary.org/obo/MONDO_0003362), 11 | [breast leiomyosarcoma](http://purl.obolibrary.org/obo/MONDO_0003371) (29 total)' 12 | 13 | contributors: 14 | - https://orcid.org/0000-0002-6601-2165 15 | 16 | classes: 17 | leiomyosarcoma: MONDO:0005058 18 | owl_thing: owl:Thing 19 | 20 | relations: 21 | disease has location: RO:0004026 22 | 23 | annotationProperties: 24 | exact_synonym: oio:hasExactSynonym 25 | related_synonym: oio:hasRelatedSynonym 26 | 27 | vars: 28 | location: owl_thing 29 | 30 | name: 31 | text: '%s leiomyosarcoma' 32 | vars: 33 | - location 34 | 35 | annotations: 36 | - annotationProperty: exact_synonym 37 | text: '%s leiomyosarcoma' 38 | vars: 39 | - location 40 | 41 | def: 42 | text: An aggressive malignant smooth muscle neoplasm, arising from the %s. It is 43 | characterized by a proliferation of neoplastic spindle cells. 44 | vars: 45 | - location 46 | 47 | equivalentTo: 48 | text: '''leiomyosarcoma'' and (''disease has location'' some %s)' 49 | vars: 50 | - location 51 | -------------------------------------------------------------------------------- /tests/resources/dosdp/lipoma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: lipoma disease has location X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/lipoma.yaml 4 | 5 | description: 'A benign, usually painless, well-circumscribed lipomatous tumor composed 6 | of adipose tissue that is located in a specific anatomical location. 7 | 8 | Examples: [skin lipoma](http://purl.obolibrary.org/obo/MONDO_0000964), [colorectal 9 | lipoma](http://purl.obolibrary.org/obo/MONDO_0003885), [tendon sheath lipoma](http://purl.obolibrary.org/obo/MONDO_0004076) 10 | (28 total)' 11 | 12 | contributors: 13 | - https://orcid.org/0000-0002-6601-2165 14 | - https://orcid.org/0000-0001-5208-3432 15 | 16 | classes: 17 | lipoma: MONDO:0005106 18 | owl_thing: owl:Thing 19 | 20 | relations: 21 | disease has location: RO:0004026 22 | 23 | annotationProperties: 24 | exact_synonym: oio:hasExactSynonym 25 | related_synonym: oio:hasRelatedSynonym 26 | 27 | vars: 28 | location: owl_thing 29 | 30 | name: 31 | text: '%s lipoma' 32 | vars: 33 | - location 34 | 35 | annotations: 36 | - annotationProperty: exact_synonym 37 | text: '%s lipoma' 38 | vars: 39 | - location 40 | 41 | def: 42 | text: A benign adipose tissue neoplasm of the %s. 43 | vars: 44 | - location 45 | 46 | equivalentTo: 47 | text: '''lipoma'' and (''disease has location'' some %s)' 48 | vars: 49 | - location 50 | -------------------------------------------------------------------------------- /tests/resources/dosdp/location.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: location 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/location.yaml 4 | 5 | description: 'A disease that is located in a specific anatomical site. 6 | 7 | Examples: [''abdominal cystic lymphangioma''](http://purl.obolibrary.org/obo/MONDO_0021726), 8 | [''articular cartilage disease''](http://purl.obolibrary.org/obo/MONDO_0003816), 9 | [''urethral disease''](http://purl.obolibrary.org/obo/MONDO_0004184)' 10 | 11 | contributors: 12 | - https://orcid.org/0000-0002-6601-2165 13 | - https://orcid.org/0000-0001-5208-3432 14 | 15 | classes: 16 | disease: MONDO:0000001 17 | anatomical entity: UBERON:0001062 18 | cell: CL:0000000 19 | 20 | relations: 21 | disease has location: RO:0004026 22 | 23 | annotationProperties: 24 | exact_synonym: oio:hasExactSynonym 25 | related_synonym: oio:hasRelatedSynonym 26 | 27 | vars: 28 | disease: '''disease''' 29 | location: '''anatomical entity'' or ''cell''' 30 | 31 | name: 32 | text: '%s of %s' 33 | vars: 34 | - disease 35 | - location 36 | 37 | annotations: 38 | - annotationProperty: exact_synonym 39 | text: '%s %s' 40 | vars: 41 | - location 42 | - disease 43 | 44 | def: 45 | text: A %s that involves the %s. 46 | vars: 47 | - disease 48 | - location 49 | 50 | equivalentTo: 51 | text: '%s and ''disease has location'' some %s' 52 | vars: 53 | - disease 54 | - location 55 | -------------------------------------------------------------------------------- /tests/resources/dosdp/location_top.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: location_top 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/location_top.yaml 4 | 5 | description: TBD. 6 | 7 | contributors: 8 | - https://orcid.org/0000-0002-6601-2165 9 | 10 | classes: 11 | disease: MONDO:0000001 12 | owl_thing: owl:Thing 13 | 14 | relations: 15 | disease has location: RO:0004026 16 | 17 | annotationProperties: 18 | exact_synonym: oio:hasExactSynonym 19 | related_synonym: oio:hasRelatedSynonym 20 | 21 | vars: 22 | location: owl_thing 23 | 24 | name: 25 | text: '%s disease' 26 | vars: 27 | - location 28 | 29 | annotations: 30 | - annotationProperty: related_synonym 31 | text: disorder of %s 32 | vars: 33 | - location 34 | - annotationProperty: exact_synonym 35 | text: disease of %s 36 | vars: 37 | - location 38 | 39 | def: 40 | text: A disease involving the %s. 41 | vars: 42 | - location 43 | 44 | equivalentTo: 45 | text: '''disease'' and ''disease has location'' some %s' 46 | vars: 47 | - location 48 | -------------------------------------------------------------------------------- /tests/resources/dosdp/lymphoma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: lymphoma disease has location X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/lymphoma.yaml 4 | 5 | description: 'A malignant (clonal) proliferation of B- lymphocytes or T- lymphocytes 6 | which involves the lymph nodes, bone marrow and/or extranodal sites. This category 7 | includes Non-Hodgkin lymphomas and Hodgkin lymphomas. 8 | 9 | Examples: [marginal zone lymphoma](http://purl.obolibrary.org/obo/MONDO_0017604), 10 | [ureteral lymphoma](http://purl.obolibrary.org/obo/MONDO_0001977), [colorectal lymphoma](http://purl.obolibrary.org/obo/MONDO_0024656) 11 | (37 total)' 12 | 13 | contributors: 14 | - https://orcid.org/0000-0002-6601-2165 15 | - https://orcid.org/0000-0001-5208-3432 16 | 17 | classes: 18 | lymphoma: MONDO:0005062 19 | owl_thing: owl:Thing 20 | 21 | relations: 22 | disease has location: RO:0004026 23 | 24 | annotationProperties: 25 | exact_synonym: oio:hasExactSynonym 26 | related_synonym: oio:hasRelatedSynonym 27 | 28 | vars: 29 | location: owl_thing 30 | 31 | name: 32 | text: '%s lymphoma' 33 | vars: 34 | - location 35 | 36 | annotations: 37 | - annotationProperty: exact_synonym 38 | text: '%s lymphoma' 39 | vars: 40 | - location 41 | 42 | def: 43 | text: A lymphoma that involves the %s. 44 | vars: 45 | - location 46 | 47 | equivalentTo: 48 | text: '''lymphoma'' and (''disease has location'' some %s)' 49 | vars: 50 | - location 51 | -------------------------------------------------------------------------------- /tests/resources/dosdp/malignant.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: malignant 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/malignant.yaml 4 | 5 | description: 'This is a design pattern for classes representing malignant neoplasms, extending a 6 | generic neoplasm class. 7 | 8 | Examples: [malignant carotid body paraganglioma](http://purl.obolibrary.org/obo/MONDO_0004650), 9 | [malignant germ cell tumor](http://purl.obolibrary.org/obo/MONDO_0006290)' 10 | 11 | contributors: 12 | - https://orcid.org/0000-0002-6601-2165 13 | 14 | classes: 15 | neoplasm: MONDO:0005070 16 | malignant: PATO:0002097 17 | owl_thing: owl:Thing 18 | 19 | relations: 20 | has modifier: RO:0002573 21 | 22 | annotationProperties: 23 | exact_synonym: oio:hasExactSynonym 24 | related_synonym: oio:hasRelatedSynonym 25 | 26 | vars: 27 | neoplasm: owl_thing 28 | 29 | name: 30 | text: malignant %s 31 | vars: 32 | - neoplasm 33 | 34 | annotations: 35 | - annotationProperty: exact_synonym 36 | text: '%s, malignant' 37 | vars: 38 | - neoplasm 39 | 40 | def: 41 | text: A malignant form of %s. 42 | vars: 43 | - neoplasm 44 | 45 | equivalentTo: 46 | text: '%s and ''has modifier'' some ''malignant''' 47 | vars: 48 | - neoplasm 49 | -------------------------------------------------------------------------------- /tests/resources/dosdp/melanoma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: melanoma disease has location X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/melanoma.yaml 4 | 5 | description: ' 6 | Melanomas are malignant, usually aggressive tumor composed of atypical, neoplastic melanocytes. 7 | This is a design pattern for classes representing melanomas based on their location. 8 | This may be the site of origin, but it can also represent a secondary site for metastatized 9 | cancer. 10 | We use the generic ''disease has location'' relation, which generalized over primary 11 | and secondary sites. 12 | 13 | Examples: [cutaneous melanoma](http://purl.obolibrary.org/obo/MONDO_0005012), [malignant 14 | breast melanoma](http://purl.obolibrary.org/obo/MONDO_0002975), [malignant melanoma 15 | of the mucosa](http://purl.obolibrary.org/obo/MONDO_0015694) (22 total)' 16 | 17 | contributors: 18 | - https://orcid.org/0000-0002-6601-2165 19 | 20 | classes: 21 | melanoma: MONDO:0005105 22 | owl_thing: owl:Thing 23 | 24 | relations: 25 | disease has location: RO:0004026 26 | 27 | annotationProperties: 28 | exact_synonym: oio:hasExactSynonym 29 | related_synonym: oio:hasRelatedSynonym 30 | 31 | vars: 32 | location: owl_thing 33 | 34 | name: 35 | text: '%s melanoma' 36 | vars: 37 | - location 38 | 39 | annotations: 40 | - annotationProperty: exact_synonym 41 | text: '%s melanoma' 42 | vars: 43 | - location 44 | 45 | def: 46 | text: A melanoma that involves the %s. 47 | vars: 48 | - location 49 | 50 | equivalentTo: 51 | text: '''melanoma'' and (''disease has location'' some %s)' 52 | vars: 53 | - location 54 | -------------------------------------------------------------------------------- /tests/resources/dosdp/meningioma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: meningioma disease has location X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/meningioma.yaml 4 | 5 | description: 'A meningioma is a slow growing tumor attached to the dura mater. 6 | This is a design pattern for classes representing meningiomas based on their location. 7 | This may be the site of origin, but it can also represent a secondary site for metastatized 8 | cancer. 9 | We use the generic ''disease has location'' relation, which generalized over primary 10 | and secondary sites. 11 | 12 | Examples: [skin meningioma](http://purl.obolibrary.org/obo/MONDO_0004429), [brain 13 | meningioma](http://purl.obolibrary.org/obo/MONDO_0000642), [choroid plexus meningioma](http://purl.obolibrary.org/obo/MONDO_0003053) 14 | (26 total)' 15 | 16 | contributors: 17 | - https://orcid.org/0000-0002-6601-2165 18 | 19 | classes: 20 | meningioma: MONDO:0016642 21 | anatomical entity: UBERON:0001062 22 | 23 | relations: 24 | disease has location: RO:0004026 25 | 26 | annotationProperties: 27 | exact_synonym: oio:hasExactSynonym 28 | related_synonym: oio:hasRelatedSynonym 29 | 30 | vars: 31 | location: '''anatomical entity''' 32 | 33 | name: 34 | text: '%s meningioma' 35 | vars: 36 | - location 37 | 38 | annotations: 39 | - annotationProperty: exact_synonym 40 | text: '%s meningioma' 41 | vars: 42 | - location 43 | 44 | def: 45 | text: A meningioma that affects the %s. 46 | vars: 47 | - location 48 | 49 | equivalentTo: 50 | text: '''meningioma'' and (''disease has location'' some %s)' 51 | vars: 52 | - location 53 | -------------------------------------------------------------------------------- /tests/resources/dosdp/mitochondrial_subtype.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: mitochondriaal_subtype 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/mitochondrial_subtype.yaml 4 | 5 | description: A disease that is classified as a mitochondrial subtype, due to a defect 6 | in a mitochondrial gene, such as MONDO:0100134 'mitochondrial complex I deficiency, 7 | mitochondrial type'. 8 | 9 | contributors: 10 | - https://orcid.org/0000-0002-6601-2165 11 | 12 | classes: 13 | mt_gene: SO:0000088 14 | disease: MONDO:0000001 15 | 16 | relations: 17 | disease has basis in dysfunction of: RO:0004020 18 | 19 | annotationProperties: 20 | exact_synonym: oio:hasExactSynonym 21 | related_synonym: oio:hasRelatedSynonym 22 | 23 | vars: 24 | disease: '''disease''' 25 | 26 | name: 27 | text: '%s, mitochondrial type' 28 | vars: 29 | - disease 30 | 31 | def: 32 | text: A %s that has a defect in a mitochondrial gene. 33 | vars: 34 | - disease 35 | 36 | equivalentTo: 37 | text: '%s and ''disease has basis in dysfunction of'' some ''mt_gene''' 38 | vars: 39 | - disease 40 | -------------------------------------------------------------------------------- /tests/resources/dosdp/mucoepidermoid_carcinoma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: mucoepidermoid carcinoma disease has location X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/mucoepidermoid_carcinoma.yaml 4 | 5 | description: 'Mucoepidermoid carcinomas are carcinomas morphologically characterized the presence of cuboidal mucous cells, goblet-like mucous cells, squamoid cells, cystic changes, and a fibrotic stromal formation. 6 | 7 | This is a design pattern for classes representing mucoepidermoid carcinomas based on their location. 8 | This may be the site of origin, but it can also represent a secondary site for metastatized 9 | cancer. 10 | 11 | We use the generic ''disease has location'' relation, which generalized over primary 12 | and secondary sites. 13 | 14 | Examples: [cutaneous mucoepidermoid carcinoma](http://purl.obolibrary.org/obo/MONDO_0003091), 15 | [oral cavity mucoepidermoid carcinoma](http://purl.obolibrary.org/obo/MONDO_0044964), 16 | [mucoepidermoid breast carcinoma](http://purl.obolibrary.org/obo/MONDO_0003087) 17 | (18 total)' 18 | 19 | contributors: 20 | - https://orcid.org/0000-0002-6601-2165 21 | - https://orcid.org/0000-0001-5208-3432 22 | 23 | classes: 24 | mucoepidermoid carcinoma: MONDO:0003036 25 | anatomical entity: UBERON:0001062 26 | 27 | relations: 28 | disease has location: RO:0004026 29 | 30 | annotationProperties: 31 | exact_synonym: oio:hasExactSynonym 32 | related_synonym: oio:hasRelatedSynonym 33 | 34 | vars: 35 | location: '''anatomical entity''' 36 | 37 | name: 38 | text: '%s mucoepidermoid carcinoma' 39 | vars: 40 | - location 41 | 42 | annotations: 43 | - annotationProperty: exact_synonym 44 | text: '%s mucoepidermoid carcinoma' 45 | vars: 46 | - location 47 | 48 | def: 49 | text: A mucoepidermoid carcinoma that involves the %s. 50 | vars: 51 | - location 52 | 53 | equivalentTo: 54 | text: '''mucoepidermoid carcinoma'' and (''disease has location'' some %s)' 55 | vars: 56 | - location 57 | -------------------------------------------------------------------------------- /tests/resources/dosdp/neoplasm.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: neoplasm 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/neoplasm.yaml 4 | 5 | description: ' 6 | 7 | Neoplasms are benign or malignant tissue growths resulting from uncontrolled cell 8 | proliferation cell types. 9 | 10 | This is a design pattern for classes representing neoplasms based on their location. 11 | This may be the site of origin, but it can also represent a secondary site for malignant 12 | neoplasms that have metastasized. 13 | 14 | We use the generic ''disease has location'' relation, which generalized over primary 15 | and secondary sites. 16 | 17 | Note that tumor is typically a synonym for neoplasm, although this can be context 18 | dependent. For NETs, NCIT uses the nomenclature ''tumor'' to indicate ''well differentiated, 19 | low or intermediate grade tumor''. This can also be called carcinoid, see https://www.cancer.org/cancer/gastrointestinal-carcinoid-tumor/about/what-is-gastrointestinal-carcinoid.html 20 | We attempt to spell this out in our labels.' 21 | 22 | contributors: 23 | - https://orcid.org/0000-0002-6601-2165 24 | 25 | classes: 26 | neoplasm: MONDO:0005070 27 | owl_thing: owl:Thing 28 | 29 | relations: 30 | disease has location: RO:0004026 31 | 32 | annotationProperties: 33 | exact_synonym: oio:hasExactSynonym 34 | related_synonym: oio:hasRelatedSynonym 35 | 36 | vars: 37 | location: owl_thing 38 | 39 | name: 40 | text: '%s neoplasm' 41 | vars: 42 | - location 43 | 44 | annotations: 45 | - annotationProperty: exact_synonym 46 | text: neoplasm of %s 47 | vars: 48 | - location 49 | - annotationProperty: exact_synonym 50 | text: '%s tumor' 51 | vars: 52 | - location 53 | - annotationProperty: exact_synonym 54 | text: tumor of %s 55 | vars: 56 | - location 57 | 58 | def: 59 | text: A neoplasm involving a %s. 60 | vars: 61 | - location 62 | 63 | equivalentTo: 64 | text: '''neoplasm'' and ''disease has location'' some %s' 65 | vars: 66 | - location 67 | -------------------------------------------------------------------------------- /tests/resources/dosdp/neoplasm_by_origin.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: neoplasm 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/neoplasm_by_origin.yaml 4 | 5 | description: TBD. 6 | 7 | contributors: 8 | - https://orcid.org/0000-0002-6601-2165 9 | 10 | classes: 11 | neoplasm: MONDO:0005070 12 | owl_thing: owl:Thing 13 | 14 | relations: 15 | disease arises from structure: RO:0004022 16 | 17 | annotationProperties: 18 | exact_synonym: oio:hasExactSynonym 19 | related_synonym: oio:hasRelatedSynonym 20 | 21 | vars: 22 | structure: owl_thing 23 | 24 | name: 25 | text: '%s neoplasm' 26 | vars: 27 | - structure 28 | 29 | annotations: 30 | - annotationProperty: exact_synonym 31 | text: malignant %s neoplasm 32 | vars: 33 | - structure 34 | - annotationProperty: exact_synonym 35 | text: neoplasm of %s 36 | vars: 37 | - structure 38 | 39 | def: 40 | text: A neoplasm involving a %s. 41 | vars: 42 | - structure 43 | 44 | equivalentTo: 45 | text: '''neoplasm'' and ''disease arises from structure'' some %s' 46 | vars: 47 | - structure 48 | -------------------------------------------------------------------------------- /tests/resources/dosdp/neuroendocrine_neoplasm_grade1.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: neoendocrine_neoplasm_grade1 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/neuroendocrine_neoplasm_grade1.yaml 4 | 5 | description: 'We follow NCIT in making carcinoid tumor a synonym for neuroendocrine neoplasm G1 (G1 NET). 6 | 7 | Examples: [carcinoid tumor (disease)](http://purl.obolibrary.org/obo/MONDO_0005369)' 8 | 9 | contributors: 10 | - https://orcid.org/0000-0002-6601-2165 11 | - https://orcid.org/0000-0001-5208-3432 12 | 13 | classes: 14 | neuroendocrine neoplasm: MONDO:0019496 15 | grade 1: MONDO:0024491 16 | owl_thing: owl:Thing 17 | 18 | relations: 19 | disease has location: RO:0004026 20 | has modifier: RO:0002573 21 | 22 | annotationProperties: 23 | exact_synonym: oio:hasExactSynonym 24 | related_synonym: oio:hasRelatedSynonym 25 | 26 | vars: 27 | location: owl_thing 28 | 29 | name: 30 | text: '%s neuroendocrine neoplasm G1' 31 | vars: 32 | - location 33 | 34 | annotations: 35 | - annotationProperty: exact_synonym 36 | text: grade 1 neuroendocrine neoplasm of %s 37 | vars: 38 | - location 39 | - annotationProperty: exact_synonym 40 | text: '%s neuroendocrine tumor, well differentiated, low grade' 41 | vars: 42 | - location 43 | - annotationProperty: exact_synonym 44 | text: '%s NET G1' 45 | vars: 46 | - location 47 | - annotationProperty: related_synonym 48 | text: '%s carcinoid tumor' 49 | vars: 50 | - location 51 | 52 | def: 53 | text: A well differentiated, low grade tumor with neuroendocrine differentiation 54 | that arises from the %s. 55 | vars: 56 | - location 57 | 58 | equivalentTo: 59 | text: '''neuroendocrine neoplasm'' and ''disease has location'' some %s and ''has 60 | modifier'' some ''grade 1''' 61 | vars: 62 | - location 63 | -------------------------------------------------------------------------------- /tests/resources/dosdp/nuclear_subtype.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: nuclear_subtype 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/nuclear_subtype.yaml 4 | 5 | description: A disease that is classified as a nuclear subtype, due to a defect in 6 | a nuclear gene, such as MONDO:0009640 'mitochondrial complex I deficiency, nuclear 7 | type'. 8 | 9 | contributors: 10 | - https://orcid.org/0000-0002-6601-2165 11 | 12 | classes: 13 | nuclear_gene: SO:0000087 14 | disease: MONDO:0000001 15 | 16 | relations: 17 | disease has basis in dysfunction of: RO:0004020 18 | 19 | annotationProperties: 20 | exact_synonym: oio:hasExactSynonym 21 | related_synonym: oio:hasRelatedSynonym 22 | 23 | vars: 24 | disease: '''disease''' 25 | 26 | name: 27 | text: '%s, nuclear type' 28 | vars: 29 | - disease 30 | 31 | def: 32 | text: A %s that has a defect in a nuclear gene. 33 | vars: 34 | - disease 35 | 36 | equivalentTo: 37 | text: '%s and ''disease has basis in dysfunction of'' some ''nuclear_gene''' 38 | vars: 39 | - disease 40 | -------------------------------------------------------------------------------- /tests/resources/dosdp/poisoning.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: poisoning 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/poisoning.yaml 4 | 5 | description: 'A disease that is caused by exposure to an environmental stimulus that causes poisoning. Examples: [colchicine poisoning](http://purl.obolibrary.org/obo/MONDO_0017859), 6 | [cocaine intoxication](http://purl.obolibrary.org/obo/MONDO_0019544)' 7 | 8 | contributors: 9 | - https://orcid.org/0000-0002-6601-2165 10 | - https://orcid.org/0000-0001-5208-3432 11 | - https://orcid.org/0000-0002-7463-6306 12 | 13 | classes: 14 | poisoning: MONDO:0029000 15 | material entity: BFO:0000040 16 | 17 | relations: 18 | realized in response to stimulus: RO:0004028 19 | 20 | annotationProperties: 21 | exact_synonym: oio:hasExactSynonym 22 | related_synonym: oio:hasRelatedSynonym 23 | 24 | vars: 25 | stimulus: '''material entity''' 26 | 27 | name: 28 | text: 'poisoning from %s' 29 | vars: 30 | - stimulus 31 | 32 | annotations: 33 | - annotationProperty: exact_synonym 34 | text: '%s poisoning' 35 | vars: 36 | - stimulus 37 | 38 | def: 39 | text: A poisoning that is caused by exposure to %s. 40 | vars: 41 | - stimulus 42 | 43 | equivalentTo: 44 | text: '''poisoning'' and ''realized in response to stimulus'' some %s' 45 | vars: 46 | - stimulus 47 | -------------------------------------------------------------------------------- /tests/resources/dosdp/postinfectious_disease.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: postinfectious_disease 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/postinfectious_disease.yaml 4 | 5 | description: 'A design pattern for conditions such as post-herpetic neuralgia or postinfectious 6 | encephalitis, where the disease is secondary to the initial infection. 7 | 8 | TODO: write better guidelines on what constitutes a secondary disease vs primary. 9 | * We do not use this pattern for AIDS-HIV for example, instead representing this 10 | is using SubClassOf. * We draw a distinction between infectious and postinfectious 11 | encepahlitis. * we do not use this pattern for chickenpox, but we do for shingles ' 12 | 13 | contributors: 14 | - https://orcid.org/0000-0002-6601-2165 15 | 16 | classes: 17 | disease: MONDO:0000001 18 | infectious disease: MONDO:0005550 19 | organism: NCBITaxon:1 20 | 21 | relations: 22 | disease arises from feature: RO:0004022 23 | 24 | annotationProperties: 25 | exact_synonym: oio:hasExactSynonym 26 | related_synonym: oio:hasRelatedSynonym 27 | 28 | vars: 29 | disease: '''organism''' 30 | feature: '''infectious disease''' 31 | 32 | name: 33 | text: postinfectious %s arising from %s 34 | vars: 35 | - disease 36 | - feature 37 | 38 | annotations: 39 | - annotationProperty: exact_synonym 40 | text: post-%s %s 41 | vars: 42 | - feature 43 | - disease 44 | - annotationProperty: related_synonym 45 | text: '%s secondary to %s' 46 | vars: 47 | - disease 48 | - feature 49 | 50 | def: 51 | text: A post-infectious form of %s that arises as a result on an initial %s. 52 | vars: 53 | - disease 54 | - feature 55 | 56 | equivalentTo: 57 | text: '%s and ''disease arises from feature'' some %s' 58 | vars: 59 | - disease 60 | - feature 61 | -------------------------------------------------------------------------------- /tests/resources/dosdp/primary_infectious.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: primary infectious 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/primary_infectious.yaml 4 | 5 | description: ' 6 | 7 | Pattern for extending a disease class to a primary infectious form, a characteristic 8 | of an infectious disease in which the disease affects an immunologically normal 9 | host. Example: MONDO_0000308 ''primary systemic mycosis''.' 10 | 11 | contributors: 12 | - https://orcid.org/0000-0002-6601-2165 13 | 14 | classes: 15 | primary infectious: MONDO:0045036 16 | disease: MONDO:0000001 17 | 18 | relations: 19 | has modifier: RO:0002573 20 | 21 | annotationProperties: 22 | exact_synonym: oio:hasExactSynonym 23 | related_synonym: oio:hasRelatedSynonym 24 | 25 | vars: 26 | disease: '''disease''' 27 | 28 | name: 29 | text: primary %s 30 | vars: 31 | - disease 32 | 33 | def: 34 | text: A %s that arises from infection in an immunologically normal host. 35 | vars: 36 | - disease 37 | 38 | equivalentTo: 39 | text: '%s and ''has modifier'' some ''primary infectious''' 40 | vars: 41 | - disease 42 | -------------------------------------------------------------------------------- /tests/resources/dosdp/rare.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: rare 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/rare.yaml 4 | 5 | description: TBD. 6 | 7 | contributors: 8 | - https://orcid.org/0000-0002-6601-2165 9 | 10 | classes: 11 | rare: MONDO:0021136 12 | disease: MONDO:0000001 13 | 14 | relations: 15 | has modifier: RO:0002573 16 | 17 | annotationProperties: 18 | exact_synonym: oio:hasExactSynonym 19 | related_synonym: oio:hasRelatedSynonym 20 | 21 | vars: 22 | disease: '''disease''' 23 | 24 | name: 25 | text: rare %s 26 | vars: 27 | - disease 28 | 29 | annotations: 30 | - annotationProperty: exact_synonym 31 | text: rare %s 32 | vars: 33 | - disease 34 | 35 | def: 36 | text: Any of the forms of %s that have a rare incidence. 37 | vars: 38 | - disease 39 | 40 | equivalentTo: 41 | text: '%s and ''has modifier'' some ''rare''' 42 | vars: 43 | - disease 44 | -------------------------------------------------------------------------------- /tests/resources/dosdp/rare_genetic.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: rare_genetic 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/rare_genetic.yaml 4 | 5 | description: TBD. 6 | 7 | contributors: 8 | - https://orcid.org/0000-0002-6601-2165 9 | 10 | classes: 11 | genetic: MONDO:0021150 12 | rare: MONDO:0021136 13 | disease: MONDO:0000001 14 | 15 | relations: 16 | has modifier: RO:0002573 17 | 18 | annotationProperties: 19 | exact_synonym: oio:hasExactSynonym 20 | related_synonym: oio:hasRelatedSynonym 21 | 22 | vars: 23 | disease: '''disease''' 24 | 25 | name: 26 | text: rare genetic %s 27 | vars: 28 | - disease 29 | 30 | annotations: 31 | - annotationProperty: exact_synonym 32 | text: rare inborn %s 33 | vars: 34 | - disease 35 | - annotationProperty: exact_synonym 36 | text: rare constitutional %s 37 | vars: 38 | - disease 39 | 40 | def: 41 | text: A form of %s that is both rare and genetic. 42 | vars: 43 | - disease 44 | 45 | equivalentTo: 46 | text: '%s and ''has modifier'' some ''genetic'' and ''has modifier'' some ''rare''' 47 | vars: 48 | - disease 49 | -------------------------------------------------------------------------------- /tests/resources/dosdp/realized_in_response_to_environmental_exposure.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: disease realized in response to environmental exposure 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/realized_in_response_to_evironmental_exposure.yaml 4 | 5 | description: 'This pattern is used for a disease, where the cause of the disease is 6 | an exposure to an environmental stimulus (using ECTO exposure terms). Note that this pattern does not include infectious disease or classes that would include an organism, virus or viroid. Rather it includes exposures to chemicals (includng drugs), or mixtures. 7 | 8 | Examples: [chemically-induced disorder](http://purl.obolibrary.org/obo/MONDO_0029001), 9 | [alcohol amnestic disorder](http://purl.obolibrary.org/obo/MONDO_0021702), [alcoholic 10 | polyneuropathy](http://purl.obolibrary.org/obo/MONDO_0006645) (26 total)' 11 | 12 | contributors: 13 | - https://orcid.org/0000-0002-6601-2165 14 | - https://orcid.org/0000-0001-5208-3432 15 | 16 | classes: 17 | disease: MONDO:0000001 18 | exposure event: ExO:0000002 19 | 20 | relations: 21 | realized in response to: RO:0009501 22 | 23 | annotationProperties: 24 | exact_synonym: oio:hasExactSynonym 25 | related_synonym: oio:hasRelatedSynonym 26 | 27 | vars: 28 | disease: '''disease''' 29 | exposure: '''exposure event''' 30 | 31 | name: 32 | text: '%s realized in response to %s' 33 | vars: 34 | - disease 35 | - exposure 36 | 37 | def: 38 | text: Any %s that is realized in response to a %s 39 | vars: 40 | - disease 41 | - exposure 42 | 43 | equivalentTo: 44 | text: '%s and (''realized in response to'' some %s)' 45 | vars: 46 | - disease 47 | - exposure 48 | -------------------------------------------------------------------------------- /tests/resources/dosdp/refractory.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: refractory 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/refractory.yaml 4 | 5 | description: TBD. 6 | 7 | contributors: 8 | - https://orcid.org/0000-0002-6601-2165 9 | 10 | classes: 11 | refractory: HP:0031375 12 | disease: MONDO:0000001 13 | 14 | relations: 15 | has modifier: RO:0002573 16 | 17 | annotationProperties: 18 | exact_synonym: oio:hasExactSynonym 19 | related_synonym: oio:hasRelatedSynonym 20 | 21 | vars: 22 | disease: disease 23 | 24 | name: 25 | text: refractory %s 26 | vars: 27 | - disease 28 | 29 | annotations: 30 | - annotationProperty: exact_synonym 31 | text: '%s, refractory' 32 | vars: 33 | - disease 34 | 35 | def: 36 | text: A %s that is difficult to treat or cure. 37 | vars: 38 | - disease 39 | 40 | equivalentTo: 41 | text: '%s and ''has modifier'' some ''refractory''' 42 | vars: 43 | - disease 44 | -------------------------------------------------------------------------------- /tests/resources/dosdp/rhabdomyosarcoma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: rhabdomyosarcoma disease has location X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/rhabdomyosarcoma.yaml 4 | 5 | description: 'This is auto-generated. Add your description here 6 | 7 | Examples: [rhabdomyosarcoma of the cervix uteri](http://purl.obolibrary.org/obo/MONDO_0016282), 8 | [breast rhabdomyosarcoma](http://purl.obolibrary.org/obo/MONDO_0002859), [testis 9 | rhabdomyosarcoma](http://purl.obolibrary.org/obo/MONDO_0002860) (15 total)' 10 | 11 | contributors: 12 | - https://orcid.org/0000-0002-6601-2165 13 | 14 | classes: 15 | rhabdomyosarcoma: MONDO:0005212 16 | owl_thing: owl:Thing 17 | 18 | relations: 19 | disease has location: RO:0004026 20 | 21 | annotationProperties: 22 | exact_synonym: oio:hasExactSynonym 23 | related_synonym: oio:hasRelatedSynonym 24 | 25 | vars: 26 | location: owl_thing 27 | 28 | name: 29 | text: '%s rhabdomyosarcoma' 30 | vars: 31 | - location 32 | 33 | annotations: 34 | - annotationProperty: exact_synonym 35 | text: '%s rhabdomyosarcoma' 36 | vars: 37 | - location 38 | - annotationProperty: related_synonym 39 | text: rhabdomyosarcoma of the %s 40 | vars: 41 | - location 42 | 43 | def: 44 | text: A malignant mesenchymal tumor with skeletal muscle differentiation affecting 45 | the %s. 46 | vars: 47 | - location 48 | 49 | equivalentTo: 50 | text: '''rhabdomyosarcoma'' and (''disease has location'' some %s)' 51 | vars: 52 | - location 53 | -------------------------------------------------------------------------------- /tests/resources/dosdp/sarcoma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: sarcoma 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/sarcoma.yaml 4 | 5 | description: ' 6 | 7 | Sarcomas are malignant neoplasms arising from soft tissue or bone. 8 | 9 | This is a design pattern for classes representing sarcomas based on their location. 10 | This may be the site of origin, but it can also represent a secondary site for metastatized 11 | sarcma. 12 | 13 | We use the generic ''disease has location'' relation, which generalized over primary 14 | and secondary sites.' 15 | 16 | contributors: 17 | - https://orcid.org/0000-0002-6601-2165 18 | 19 | classes: 20 | sarcoma: MONDO:0005089 21 | owl_thing: owl:Thing 22 | 23 | relations: 24 | disease has location: RO:0004026 25 | 26 | annotationProperties: 27 | exact_synonym: oio:hasExactSynonym 28 | related_synonym: oio:hasRelatedSynonym 29 | 30 | vars: 31 | location: owl_thing 32 | 33 | name: 34 | text: '%s sarcoma' 35 | vars: 36 | - location 37 | 38 | annotations: 39 | - annotationProperty: exact_synonym 40 | text: sarcoma of %s 41 | vars: 42 | - location 43 | 44 | def: 45 | text: A sarcoma involving a %s. 46 | vars: 47 | - location 48 | 49 | equivalentTo: 50 | text: '''sarcoma'' and ''disease has location'' some %s' 51 | vars: 52 | - location 53 | -------------------------------------------------------------------------------- /tests/resources/dosdp/small_cell_carcinoma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: small cell carcinoma disease has location X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/small_cell_carcinoma.yaml 4 | 5 | description: 'This is auto-generated. Add your description here 6 | 7 | Examples: [cervical small cell carcinoma](http://purl.obolibrary.org/obo/MONDO_0006142), 8 | [pancreatic small cell neuroendocrine carcinoma](http://purl.obolibrary.org/obo/MONDO_0006348), 9 | [ureter small cell carcinoma](http://purl.obolibrary.org/obo/MONDO_0006482) (16 10 | total)' 11 | 12 | contributors: 13 | - https://orcid.org/0000-0002-6601-2165 14 | 15 | classes: 16 | small cell carcinoma: MONDO:0000402 17 | owl_thing: owl:Thing 18 | 19 | relations: 20 | disease has location: RO:0004026 21 | 22 | annotationProperties: 23 | exact_synonym: oio:hasExactSynonym 24 | related_synonym: oio:hasRelatedSynonym 25 | 26 | vars: 27 | location: owl_thing 28 | 29 | name: 30 | text: '%s small cell carcinoma' 31 | vars: 32 | - location 33 | 34 | annotations: 35 | - annotationProperty: exact_synonym 36 | text: '%s small cell carcinoma' 37 | vars: 38 | - location 39 | - annotationProperty: related_synonym 40 | text: small cell cancer of the %s 41 | vars: 42 | - location 43 | 44 | def: 45 | text: An aggressive, high-grade and poorly differentiated carcinoma with neuroendocrine 46 | differentiation that arises from the %s. It is characterized by the presence of 47 | malignant small cells. 48 | vars: 49 | - location 50 | 51 | equivalentTo: 52 | text: '''small cell carcinoma'' and (''disease has location'' some %s)' 53 | vars: 54 | - location 55 | -------------------------------------------------------------------------------- /tests/resources/dosdp/specific_disease_by_disrupted_process.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: X disease disrupts X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/X_disease_disrupts_X 4 | 5 | description: 'This is auto-generated. Add your description here 6 | 7 | Examples: [disease of catalytic activity](http://purl.obolibrary.org/obo/MONDO_0044976), 8 | [disease of transporter activity](http://purl.obolibrary.org/obo/MONDO_0044975), 9 | [phagocytic cell dysfunction](http://purl.obolibrary.org/obo/MONDO_0024627) (49 10 | total)' 11 | 12 | contributors: 13 | - https://orcid.org/0000-0002-6601-2165 14 | - https://orcid.org/0000-0001-5208-3432 15 | 16 | classes: 17 | owl_thing: owl:Thing 18 | disease: MONDO:0000001 19 | 20 | relations: 21 | disease disrupts: RO:0004024 22 | 23 | annotationProperties: 24 | exact_synonym: oio:hasExactSynonym 25 | related_synonym: oio:hasRelatedSynonym 26 | 27 | vars: 28 | disease: '''disease''' 29 | process: '''owl_thing''' 30 | 31 | name: 32 | text: '%s %s' 33 | vars: 34 | - process 35 | - disease 36 | 37 | annotations: 38 | - annotationProperty: exact_synonym 39 | text: '%s %s' 40 | vars: 41 | - process 42 | - disease 43 | 44 | def: 45 | text: Any %s that disrupts %s 46 | vars: 47 | - disease 48 | - process 49 | 50 | equivalentTo: 51 | text: '%s and (''disease disrupts'' some %s)' 52 | vars: 53 | - disease 54 | - process 55 | -------------------------------------------------------------------------------- /tests/resources/dosdp/specific_disease_by_dysfunctional_structure.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: X disease has basis in dysfunction of X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/specific_disease_by_dysfunctional_structure.yaml 4 | 5 | description: 'This is auto-generated. Add your description here 6 | 7 | Examples: [collagenopathy type 2 alpha 1](http://purl.obolibrary.org/obo/MONDO_0022800), 8 | [hemoglobinopathy](http://purl.obolibrary.org/obo/MONDO_0044348), [blood platelet 9 | disease](http://purl.obolibrary.org/obo/MONDO_0002245) (2195 total)' 10 | 11 | contributors: 12 | - https://orcid.org/0000-0002-6601-2165 13 | 14 | classes: 15 | owl_thing: owl:Thing 16 | disease: MONDO:0000001 17 | 18 | relations: 19 | disease has basis in dysfunction of: RO:0004020 20 | 21 | annotationProperties: 22 | exact_synonym: oio:hasExactSynonym 23 | related_synonym: oio:hasRelatedSynonym 24 | 25 | vars: 26 | disease: '''disease''' 27 | structure: '''owl_thing''' 28 | 29 | name: 30 | text: '%s %s' 31 | vars: 32 | - structure 33 | - disease 34 | 35 | def: 36 | text: Any %s in which the causes of the disease is a perturbation of the %s leading 37 | to its dysfunction. 38 | vars: 39 | - disease 40 | - structure 41 | 42 | equivalentTo: 43 | text: '%s and (''disease has basis in dysfunction of'' some %s)' 44 | vars: 45 | - disease 46 | - structure 47 | -------------------------------------------------------------------------------- /tests/resources/dosdp/specific_infectious_disease_by_agent.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: specific_inflammatory_disease_by_site 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/specific_infectious_disease_by_agent.yaml 4 | 5 | description: ' 6 | 7 | as for inflammatory_disease_by_site, but refining a specific disease' 8 | 9 | contributors: 10 | - https://orcid.org/0000-0002-6601-2165 11 | 12 | classes: 13 | disease: MONDO:0000001 14 | organism: NCBITaxon:1 15 | 16 | relations: 17 | realized in response to stimulus: RO:0004028 18 | 19 | annotationProperties: 20 | exact_synonym: oio:hasExactSynonym 21 | related_synonym: oio:hasRelatedSynonym 22 | 23 | vars: 24 | disease: '''disease''' 25 | agent: '''organism''' 26 | 27 | name: 28 | text: '%s %s' 29 | vars: 30 | - agent 31 | - disease 32 | 33 | annotations: 34 | - annotationProperty: exact_synonym 35 | text: '%s caused %s' 36 | vars: 37 | - agent 38 | - disease 39 | 40 | def: 41 | text: An %s caused by infection with %s. 42 | vars: 43 | - disease 44 | - agent 45 | 46 | equivalentTo: 47 | text: '%s and ''realized in response to stimulus'' some %s' 48 | vars: 49 | - disease 50 | - agent 51 | -------------------------------------------------------------------------------- /tests/resources/dosdp/specific_infectious_disease_by_location.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: specific_infectious_disease_by_location 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/specific_infectious_disease_by_location.yaml 4 | 5 | description: ' 6 | 7 | TODO' 8 | 9 | contributors: 10 | - https://orcid.org/0000-0002-6601-2165 11 | 12 | classes: 13 | disease: MONDO:0000001 14 | anatomical structure: UBERON:0000061 15 | 16 | relations: 17 | disease has inflammation site: RO:0004027 18 | 19 | annotationProperties: 20 | exact_synonym: oio:hasExactSynonym 21 | related_synonym: oio:hasRelatedSynonym 22 | 23 | vars: 24 | disease: '''disease''' 25 | location: '''anatomical structure''' 26 | 27 | name: 28 | text: '%s %s' 29 | vars: 30 | - location 31 | - disease 32 | 33 | def: 34 | text: An %s involving a pathogenic inflammatory response in the %s. 35 | vars: 36 | - disease 37 | - location 38 | 39 | equivalentTo: 40 | text: '%s and ''disease has inflammation site'' some %s' 41 | vars: 42 | - disease 43 | - location 44 | -------------------------------------------------------------------------------- /tests/resources/dosdp/specific_inflammatory_disease_by_site.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: specific_inflammatory_disease_by_site 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/specific_inflammatory_disease_by_site.yaml 4 | 5 | description: ' 6 | 7 | as for inflammatory_disease_by_site, but refining a specific disease' 8 | 9 | contributors: 10 | - https://orcid.org/0000-0002-6601-2165 11 | 12 | classes: 13 | disease: MONDO:0000001 14 | anatomical structure: UBERON:0000061 15 | 16 | relations: 17 | disease has inflammation site: RO:0004027 18 | 19 | annotationProperties: 20 | exact_synonym: oio:hasExactSynonym 21 | related_synonym: oio:hasRelatedSynonym 22 | 23 | vars: 24 | disease: '''disease''' 25 | location: '''anatomical structure''' 26 | 27 | name: 28 | text: '%s %s' 29 | vars: 30 | - location 31 | - disease 32 | 33 | annotations: 34 | - annotationProperty: exact_synonym 35 | text: '%s %sitis' 36 | vars: 37 | - disease 38 | - location 39 | 40 | def: 41 | text: An %s involving a pathogenic inflammatory response in the %s. 42 | vars: 43 | - disease 44 | - location 45 | 46 | equivalentTo: 47 | text: '%s and ''disease has inflammation site'' some %s' 48 | vars: 49 | - disease 50 | - location 51 | -------------------------------------------------------------------------------- /tests/resources/dosdp/squamous_cell_carcinoma.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: squamous cell carcinoma disease has location X 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/squamous_cell_carcinoma.yaml 4 | 5 | description: 'This is auto-generated. Add your description here 6 | 7 | Examples: [cervical squamous cell carcinoma](http://purl.obolibrary.org/obo/MONDO_0006143), 8 | [skin squamous cell carcinoma](http://purl.obolibrary.org/obo/MONDO_0002529), [ureter 9 | squamous cell carcinoma](http://purl.obolibrary.org/obo/MONDO_0003502) (63 total)' 10 | 11 | contributors: 12 | - https://orcid.org/0000-0002-6601-2165 13 | 14 | classes: 15 | squamous cell carcinoma: MONDO:0005096 16 | owl_thing: owl:Thing 17 | 18 | relations: 19 | disease has location: RO:0004026 20 | 21 | annotationProperties: 22 | exact_synonym: oio:hasExactSynonym 23 | related_synonym: oio:hasRelatedSynonym 24 | 25 | vars: 26 | location: owl_thing 27 | 28 | name: 29 | text: '%s squamous cell carcinoma' 30 | vars: 31 | - location 32 | 33 | annotations: 34 | - annotationProperty: exact_synonym 35 | text: '%s squamous cell carcinoma' 36 | vars: 37 | - location 38 | 39 | def: 40 | text: A squamous cell carcinoma that involves the %s. 41 | vars: 42 | - location 43 | 44 | equivalentTo: 45 | text: '''squamous cell carcinoma'' and (''disease has location'' some %s)' 46 | vars: 47 | - location 48 | -------------------------------------------------------------------------------- /tests/resources/dosdp/substance_abuse.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: substance_abuse 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/substance_abuse.yaml 4 | 5 | description: 'A substance abuse that specifies a specific environmental stimulus such as alcohol, cocaine, etc. Examples: [alcohol abuse](http://purl.obolibrary.org/obo/MONDO_0002046), 6 | [cocaine abuse](http://purl.obolibrary.org/obo/MONDO_0004456)' 7 | 8 | contributors: 9 | - https://orcid.org/0000-0002-6601-2165 10 | - https://orcid.org/0000-0001-5208-3432 11 | - https://orcid.org/0000-0002-7463-6306 12 | 13 | classes: 14 | substance abuse: MONDO:0002491 15 | material entity: BFO:0000040 16 | 17 | relations: 18 | realized in response to stimulus: RO:0004028 19 | 20 | annotationProperties: 21 | exact_synonym: oio:hasExactSynonym 22 | 23 | vars: 24 | stimulus: '''material entity''' 25 | 26 | name: 27 | text: '%s abuse' 28 | vars: 29 | - stimulus 30 | 31 | annotations: 32 | - annotationProperty: exact_synonym 33 | text: 'abuse of %s' 34 | vars: 35 | - stimulus 36 | 37 | def: 38 | text: The abuse or overuse of %s. 39 | vars: 40 | - stimulus 41 | 42 | equivalentTo: 43 | text: '''substance abuse'' and ''realized in response to stimulus'' some %s' 44 | vars: 45 | - stimulus 46 | -------------------------------------------------------------------------------- /tests/resources/dosdp/susceptibility_by_gene.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: susceptibility_by_gene 2 | 3 | pattern_iri: 'http://purl.obolibrary.org/obo/mondo/patterns/susceptibility_by_gene.yaml 4 | 5 | Examples - [autism, susceptibility to, X-linked 5](http://purl.obolibrary.org/obo/MONDO_0010449), 6 | [bulimia nervosa, susceptibility to, 2](http://purl.obolibrary.org/obo/MONDO_0012461), 7 | [nephrolithiasis susceptibility caused by SLC26A1](http://purl.obolibrary.org/obo/MONDO_0020722)''' 8 | 9 | description: This pattern should be used for terms in which a gene dysfunction causes 10 | a predisposition or susceptibility towards developing a specific disease. This pattern 11 | is a sub-pattern of [inherited_susceptibility.yaml](https://github.com/monarch-initiative/mondo/blob/master/src/patterns/dosdp-patterns/inherited_susceptibility.yaml) 12 | 13 | contributors: 14 | - https://orcid.org/0000-0002-6601-2165 15 | - https://orcid.org/0000-0001-5208-3432 16 | 17 | classes: 18 | disease or disorder: MONDO:0000001 19 | inherited disease susceptibility: MONDO:0020573 20 | gene: SO:0000704 21 | 22 | relations: 23 | disease has basis in dysfunction of: RO:0004020 24 | predisposes towards: http://purl.obolibrary.org/obo/mondo#predisposes_towards 25 | 26 | annotationProperties: 27 | exact_synonym: oio:hasExactSynonym 28 | related_synonym: oio:hasRelatedSynonym 29 | 30 | vars: 31 | gene: '''gene''' 32 | disease: '''disease or disorder''' 33 | 34 | name: 35 | text: '%s susceptibility, %s form' 36 | vars: 37 | - disease 38 | - gene 39 | 40 | annotations: 41 | - annotationProperty: exact_synonym 42 | text: '%s susceptibility caused by %s' 43 | vars: 44 | - disease 45 | - gene 46 | 47 | def: 48 | text: A susceptibility or predisposition to %s in which the cause of the disease 49 | is a mutation in the %s gene. 50 | vars: 51 | - disease 52 | - gene 53 | 54 | equivalentTo: 55 | text: ('inherited disease susceptibility' and ('disease has basis in dysfunction 56 | of' some %s) and ('predisposes towards' some %s)) 57 | vars: 58 | - gene 59 | - disease 60 | -------------------------------------------------------------------------------- /tests/resources/dosdp/syndromic.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: syndromic 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/syndromic.yaml 4 | 5 | description: "Some diseases exist in both isolated and syndromic forms. For example,\ 6 | \ aniridia ([MONDO_0019172 aniridia](http://purl.obolibrary.org/obo/MONDO_0019172),\ 7 | \ [MONDO_0020148'syndromic aniridia'](http://purl.obolibrary.org/obo/MONDO_0020148)\ 8 | \ and [MONDO_0007119 'isolated aniridia'](http://purl.obolibrary.org/obo/MONDO_0007119).\ 9 | \ Use this pattern to define the syndromic form of a disease when a term exists\ 10 | \ for the isolated/syndromic-neutral version. In general, this pattern should be\ 11 | \ used in parallel with isolated. E.g. if you make a term 'syndromic disease, you\ 12 | \ should also have 'isolated disease' [see pattern here(https://github.com/monarch-initiative/mondo/blob/master/src/patterns/dosdp-patterns/isolated.yaml).\ 13 | \ \nNote that the isolated and syndromic forms will be inferred to be disjoint due\ 14 | \ to the GCI pattern." 15 | 16 | contributors: 17 | - https://orcid.org/0000-0002-6601-2165 18 | - https://orcid.org/0000-0001-5208-3432 19 | 20 | classes: 21 | syndromic: MONDO:0021127 22 | disease or disorder: MONDO:0000001 23 | 24 | relations: 25 | has modifier: RO:0002573 26 | 27 | annotationProperties: 28 | exact_synonym: oio:hasExactSynonym 29 | related_synonym: oio:hasRelatedSynonym 30 | 31 | vars: 32 | disease: '''disease or disorder''' 33 | 34 | name: 35 | text: syndromic %s 36 | vars: 37 | - disease 38 | 39 | annotations: 40 | - annotationProperty: exact_synonym 41 | text: syndromic %s 42 | vars: 43 | - disease 44 | - annotationProperty: related_synonym 45 | text: syndrome associated with %s 46 | vars: 47 | - disease 48 | 49 | def: 50 | text: A %s that is part of a larger syndrome. 51 | vars: 52 | - disease 53 | 54 | equivalentTo: 55 | text: '%s and ''has modifier'' some ''syndromic''' 56 | vars: 57 | - disease 58 | -------------------------------------------------------------------------------- /tests/resources/dosdp/vectorBorneDisease.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: vectorBorneDisease 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/vectorBorneDisease.yaml 4 | 5 | description: 'An infectious disease where a pathogen is carried and transmitted by 6 | another organism that acts as disease vector. Examples: MONDO_0020601 ''mosquito-borne 7 | viral encephalitis'', MONDO_0017572 ''tick-borne encephalitis''' 8 | 9 | contributors: 10 | - https://orcid.org/0000-0002-6601-2165 11 | 12 | classes: 13 | infectious disease: MONDO:0005550 14 | organism: OBI:0100026 15 | 16 | relations: 17 | transmitted by: RO:0002451 18 | 19 | annotationProperties: 20 | exact_synonym: oio:hasExactSynonym 21 | related_synonym: oio:hasRelatedSynonym 22 | 23 | vars: 24 | infectious_disease: '''infectious disease''' 25 | vector: '''organism''' 26 | 27 | name: 28 | text: '%s transmitted by %s' 29 | vars: 30 | - infectious_disease 31 | - vector 32 | 33 | def: 34 | text: '%s-borne %s.' 35 | vars: 36 | - vector 37 | - infectious_disease 38 | 39 | equivalentTo: 40 | text: (%s and ('transmitted by' some %s)) 41 | vars: 42 | - infectious_disease 43 | - vector 44 | -------------------------------------------------------------------------------- /tests/resources/dosdp/x_linked.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: x_linked 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/x_linked.yaml 4 | 5 | description: TBD. 6 | 7 | contributors: 8 | - https://orcid.org/0000-0002-6601-2165 9 | 10 | classes: 11 | x_linked_inheritance: HP:0001417 12 | disease: MONDO:0000001 13 | 14 | relations: 15 | has modifier: RO:0002573 16 | 17 | annotationProperties: 18 | exact_synonym: oio:hasExactSynonym 19 | related_synonym: oio:hasRelatedSynonym 20 | 21 | vars: 22 | disease: '''disease''' 23 | 24 | name: 25 | text: X-linked %s 26 | vars: 27 | - disease 28 | 29 | annotations: 30 | - annotationProperty: exact_synonym 31 | text: '%s, X-linked' 32 | vars: 33 | - disease 34 | 35 | def: 36 | text: X-linked form of %s. 37 | vars: 38 | - disease 39 | 40 | equivalentTo: 41 | text: '%s and ''has modifier'' some ''x_linked_inheritance''' 42 | vars: 43 | - disease 44 | -------------------------------------------------------------------------------- /tests/resources/dosdp/y_linked.yaml: -------------------------------------------------------------------------------- 1 | pattern_name: y_linked 2 | 3 | pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/y_linked.yaml 4 | 5 | description: TBD. 6 | 7 | contributors: 8 | - https://orcid.org/0000-0002-6601-2165 9 | 10 | classes: 11 | y_linked_inheritance: HP:0001450 12 | disease: MONDO:0000001 13 | 14 | relations: 15 | has modifier: RO:0002573 16 | 17 | annotationProperties: 18 | exact_synonym: oio:hasExactSynonym 19 | related_synonym: oio:hasRelatedSynonym 20 | 21 | vars: 22 | disease: '''disease''' 23 | 24 | name: 25 | text: Y-linked %s 26 | vars: 27 | - disease 28 | 29 | annotations: 30 | - annotationProperty: exact_synonym 31 | text: '%s, Y-linked' 32 | vars: 33 | - disease 34 | 35 | def: 36 | text: Y-linked form of %s. 37 | vars: 38 | - disease 39 | 40 | equivalentTo: 41 | text: '%s and ''has modifier'' some ''y_linked_inheritance''' 42 | vars: 43 | - disease 44 | -------------------------------------------------------------------------------- /tests/resources/foaf_snippet.ttl: -------------------------------------------------------------------------------- 1 | @prefix foaf: . 2 | @prefix owl: . 3 | @prefix rdfs: . 4 | @prefix rdf: . 5 | 6 | foaf:knows rdf:type owl:ObjectProperty ; 7 | rdfs:domain foaf:Person ; 8 | rdfs:range foaf:Person ; 9 | rdfs:comment "A person known by this person (indicating some level of reciprocated interaction between the parties)." ; 10 | rdfs:isDefinedBy ; 11 | rdfs:label "knows" . 12 | 13 | foaf:Person rdf:type owl:Class ; 14 | rdfs:subClassOf , 15 | foaf:Agent ; 16 | owl:disjointWith foaf:Project ; 17 | rdfs:comment "A person." ; 18 | rdfs:isDefinedBy ; 19 | rdfs:label "Person" . 20 | -------------------------------------------------------------------------------- /tests/resources/hca/module/biomaterial/familial_relationship.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "Information about other organisms that this organism is related to.", 4 | "additionalProperties": false, 5 | "title": "Familial relationship", 6 | "name": "familial_relationship", 7 | "type": "object", 8 | "properties": { 9 | "describedBy": { 10 | "description": "The URL reference to the schema.", 11 | "type": "string", 12 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/biomaterial/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/familial_relationship" 13 | }, 14 | "schema_version": { 15 | "description": "The version number of the schema in major.minor.patch format.", 16 | "type": "string", 17 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 18 | "example": "4.6.1" 19 | }, 20 | "parent": { 21 | "description": "The individual's parent.", 22 | "type": "string", 23 | "user_friendly": "Parent", 24 | "guidelines": "Enter the ID of the parent of this individual." 25 | }, 26 | "child": { 27 | "description": "The individual's child.", 28 | "type": "string", 29 | "user_friendly": "Child", 30 | "guidelines": "Enter the ID of the child of this individual." 31 | }, 32 | "sibling": { 33 | "description": "The individual's sibling.", 34 | "type": "string", 35 | "user_friendly": "Sibling", 36 | "guidelines": "Enter the ID of the sibling of this individual." 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tests/resources/hca/module/biomaterial/human_specific.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "Information specific to a donor that is a human (Homo sapiens).", 4 | "additionalProperties": false, 5 | "title": "Human-specific", 6 | "name": "human_specific", 7 | "type": "object", 8 | "properties": { 9 | "describedBy": { 10 | "description": "The URL reference to the schema.", 11 | "type": "string", 12 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/biomaterial/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/human_specific" 13 | }, 14 | "schema_version": { 15 | "description": "The version number of the schema in major.minor.patch format.", 16 | "type": "string", 17 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 18 | "example": "4.6.1" 19 | }, 20 | "body_mass_index": { 21 | "description": "The body mass index of the donor.", 22 | "type": "number", 23 | "maximum": 100, 24 | "minimum": 5, 25 | "example": 36.4, 26 | "user_friendly": "Body mass index" 27 | }, 28 | "ethnicity": { 29 | "description": "Ethnicity of the donor.", 30 | "type": "array", 31 | "items": { 32 | "$ref": "module/ontology/ethnicity_ontology.json" 33 | }, 34 | "user_friendly": "Ethnicity", 35 | "guidelines": "Enter one or more ethnicities, separated by a comma." 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tests/resources/hca/module/biomaterial/mouse_specific.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "Information specific to an organism that is a mouse (Mus musculus).", 4 | "additionalProperties": false, 5 | "title": "Mouse-specific", 6 | "name": "mouse_specific", 7 | "type": "object", 8 | "properties": { 9 | "describedBy": { 10 | "description": "The URL reference to the schema.", 11 | "type": "string", 12 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/biomaterial/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/mouse_specific" 13 | }, 14 | "schema_version": { 15 | "description": "The version number of the schema in major.minor.patch format.", 16 | "type": "string", 17 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 18 | "example": "4.6.1" 19 | }, 20 | "strain": { 21 | "description": "The name of the mouse strain.", 22 | "type": "array", 23 | "items": { 24 | "$ref": "module/ontology/strain_ontology.json" 25 | }, 26 | "user_friendly": "Mouse strain" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/resources/hca/module/biomaterial/timecourse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "Information relating to a timecourse.", 4 | "additionalProperties": false, 5 | "required": [ 6 | "value", 7 | "unit" 8 | ], 9 | "title": "Timecourse", 10 | "name": "timecourse", 11 | "type": "object", 12 | "properties": { 13 | "describedBy": { 14 | "description": "The URL reference to the schema.", 15 | "type": "string", 16 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/biomaterial/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/timecourse" 17 | }, 18 | "schema_version": { 19 | "description": "The version number of the schema in major.minor.patch format.", 20 | "type": "string", 21 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 22 | "example": "4.6.1" 23 | }, 24 | "value": { 25 | "description": "The numerical value in Timecourse unit associated with a time interval used in the experiment.", 26 | "pattern": "^[0-9]+\\.?[0-9]*-?[0-9]*\\.?[0-9]*$", 27 | "type": "string", 28 | "example": "2; 5.5-10.5", 29 | "user_friendly": "Timecourse value", 30 | "guidelines": "Enter either a single value or a range of values. Indicate a range using a hyphen." 31 | }, 32 | "unit": { 33 | "description": "The unit in which the Timecourse value is expressed.", 34 | "type": "object", 35 | "$ref": "module/ontology/time_unit_ontology.json", 36 | "user_friendly": "Timecourse unit" 37 | }, 38 | "relevance": { 39 | "description": "Relevance of the Timecourse value/unit to the experiment.", 40 | "type": "string", 41 | "example": "Collection after tumor cells injected into the mammary gland; Time tissue underwent liberase digestion", 42 | "user_friendly": "Timecourse relevance" 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /tests/resources/hca/module/ontology/file_format_ontology.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "A term that may be associated with a file format-related ontology term.", 4 | "additionalProperties": false, 5 | "required": [ 6 | "text" 7 | ], 8 | "title": "File format ontology", 9 | "name": "file_format_ontology", 10 | "type": "object", 11 | "properties": { 12 | "describedBy": { 13 | "description": "The URL reference to the schema.", 14 | "type": "string", 15 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/ontology/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/file_format" 16 | }, 17 | "schema_version": { 18 | "description": "The version number of the schema in major.minor.patch format.", 19 | "type": "string", 20 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 21 | "example": "4.6.1" 22 | }, 23 | "text": { 24 | "description": "The name of the file format.", 25 | "type": "string", 26 | "example": "FASTQ; JSON", 27 | "user_friendly": "File format" 28 | }, 29 | "ontology": { 30 | "description": "An ontology term identifier in the form prefix:accession.", 31 | "type": "string", 32 | "graph_restriction": { 33 | "ontologies" : ["obo:edam"], 34 | "classes": ["format:1915"], 35 | "relations": ["rdfs:subClassOf"], 36 | "direct": false, 37 | "include_self": false 38 | }, 39 | "example": "format:1930; format:3464", 40 | "user_friendly": "File format ontology ID" 41 | }, 42 | "ontology_label": { 43 | "description": "The preferred label for the ontology term referred to in the ontology field. This may differ from the user-supplied value in the text field.", 44 | "type": "string", 45 | "example": "FASTQ; JSON", 46 | "user_friendly": "File format ontology label" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /tests/resources/hca/module/ontology/instrument_ontology.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "A term that may be associated with a instrument-related ontology term.", 4 | "additionalProperties": false, 5 | "required": [ 6 | "text" 7 | ], 8 | "title": "Instrument ontology", 9 | "name": "instrument_ontology", 10 | "type": "object", 11 | "properties": { 12 | "describedBy": { 13 | "description": "The URL reference to the schema.", 14 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/ontology/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/instrument_ontology", 15 | "type": "string" 16 | }, 17 | "schema_version": { 18 | "description": "Version number in major.minor.patch format.", 19 | "type": "string", 20 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 21 | "example": "4.6.1" 22 | }, 23 | "text": { 24 | "description": "The full name of the instrument used.", 25 | "type": "string", 26 | "user_friendly": "Instrument", 27 | "example": "Illumina HiSeq 2500; ONT MinION" 28 | }, 29 | "ontology": { 30 | "description": "An ontology term identifier in the form prefix:accession.", 31 | "type": "string", 32 | "graph_restriction": { 33 | "ontologies" : ["obo:efo"], 34 | "classes": ["EFO:0000548"], 35 | "relations": ["rdfs:subClassOf"], 36 | "direct": false, 37 | "include_self": false 38 | }, 39 | "user_friendly": "Instrument ontology ID", 40 | "example": "EFO:0008565; EFO:0008632" 41 | }, 42 | "ontology_label": { 43 | "description": "The preferred label for the ontology term referred to in the ontology field. This may differ from the user-supplied value in the text field.", 44 | "type": "string", 45 | "user_friendly": "Instrument ontology label", 46 | "example": "Illumina HiSeq 2500; ONT MinION" 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /tests/resources/hca/module/ontology/length_unit_ontology.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "A term that may be associated with a cell type-related ontology term.", 4 | "additionalProperties": false, 5 | "required": [ 6 | "text" 7 | ], 8 | "title": "Length unit ontology", 9 | "name": "length_unit_ontology", 10 | "type": "object", 11 | "properties": { 12 | "describedBy": { 13 | "description": "The URL reference to the schema.", 14 | "type": "string", 15 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/ontology/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/length_unit_ontology" 16 | }, 17 | "schema_version": { 18 | "description": "The version number of the schema in major.minor.patch format.", 19 | "type": "string", 20 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 21 | "example": "4.6.1" 22 | }, 23 | "text": { 24 | "description": "The name of a length unit being used.", 25 | "type": "string", 26 | "user_friendly": "Length unit", 27 | "example": "micrometer; meter" 28 | }, 29 | "ontology": { 30 | "description": "An ontology term identifier in the form prefix:accession.", 31 | "type": "string", 32 | "graph_restriction": { 33 | "ontologies" : ["obo:efo", "obo:uo"], 34 | "classes": ["UO:0000001"], 35 | "relations": ["rdfs:subClassOf"], 36 | "direct": false, 37 | "include_self": false 38 | }, 39 | "user_friendly": "Length unit ontology ID", 40 | "example": "UO:0000017; UO:0000008" 41 | }, 42 | "ontology_label": { 43 | "description": "The preferred label for the ontology term referred to in the ontology field. This may differ from the user-supplied value in the text field.", 44 | "type": "string", 45 | "user_friendly": "Length unit ontology label", 46 | "example": "micrometer; meter" 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /tests/resources/hca/module/ontology/mass_unit_ontology.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "A term that may be associated with a cell type-related ontology term.", 4 | "additionalProperties": false, 5 | "required": [ 6 | "text" 7 | ], 8 | "title": "Mass unit ontology", 9 | "name": "mass_unit_ontology", 10 | "type": "object", 11 | "properties": { 12 | "describedBy": { 13 | "description": "The URL reference to the schema.", 14 | "type": "string", 15 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/ontology/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/mass_unit_ontology" 16 | }, 17 | "schema_version": { 18 | "description": "The version number of the schema in major.minor.patch format.", 19 | "type": "string", 20 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 21 | "example": "4.6.1" 22 | }, 23 | "text": { 24 | "description": "The name of a mass unit being used.", 25 | "type": "string", 26 | "user_friendly": "Mass unit", 27 | "example": "kilogram; microgram" 28 | }, 29 | "ontology": { 30 | "description": "An ontology term identifier in the form prefix:accession.", 31 | "type": "string", 32 | "graph_restriction": { 33 | "ontologies" : ["obo:efo", "obo:uo"], 34 | "classes": ["UO:0000002"], 35 | "relations": ["rdfs:subClassOf"], 36 | "direct": false, 37 | "include_self": false 38 | }, 39 | "user_friendly": "Mass unit ontology ID", 40 | "example": "UO:0000009; UO:0000023" 41 | }, 42 | "ontology_label": { 43 | "description": "The preferred label for the ontology term referred to in the ontology field. This may differ from the user-supplied value in the text field.", 44 | "type": "string", 45 | "user_friendly": "Mass unit ontology label", 46 | "example": "kilogram; microgram" 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /tests/resources/hca/module/ontology/organ_ontology.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "A term that may be associated with an anatomy-related ontology term.", 4 | "additionalProperties": false, 5 | "required": [ 6 | "text" 7 | ], 8 | "title": "Organ ontology", 9 | "name": "organ_ontology", 10 | "type": "object", 11 | "properties": { 12 | "describedBy": { 13 | "description": "The URL reference to the schema.", 14 | "type": "string", 15 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/ontology/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/organ_ontology" 16 | }, 17 | "schema_version": { 18 | "description": "The version number of the schema in major.minor.patch format.", 19 | "type": "string", 20 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 21 | "example": "4.6.1" 22 | }, 23 | "text": { 24 | "description": "The text for the term as the user provides it.", 25 | "type": "string", 26 | "user_friendly": "Organ", 27 | "example": "heart; immune system" 28 | }, 29 | "ontology": { 30 | "description": "An ontology term identifier in the form prefix:accession.", 31 | "type": "string", 32 | "graph_restriction": { 33 | "ontologies" : ["obo:hcao", "obo:uberon"], 34 | "classes": ["UBERON:0000465"], 35 | "relations": ["rdfs:subClassOf"], 36 | "direct": false, 37 | "include_self": true 38 | }, 39 | "user_friendly": "Organ ontology ID", 40 | "example": "UBERON:0000948; UBERON:0002405" 41 | }, 42 | "ontology_label": { 43 | "description": "The preferred label for the ontology term referred to in the ontology field. This may differ from the user-supplied value in the text field.", 44 | "type": "string", 45 | "user_friendly": "Organ ontology label", 46 | "example": "heart; immune system" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /tests/resources/hca/module/ontology/strain_ontology.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "A term that may be associated with a strain-related ontology term.", 4 | "additionalProperties": false, 5 | "required": [ 6 | "text" 7 | ], 8 | "title": "Strain ontology", 9 | "name": "strain_ontology", 10 | "type": "object", 11 | "properties": { 12 | "describedBy": { 13 | "description": "The URL reference to the schema.", 14 | "type": "string", 15 | "pattern": "^(http|https)://schema.(.*?)humancellatlas.org/module/ontology/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/strain_ontology" 16 | }, 17 | "schema_version": { 18 | "description": "The version number of the schema in major.minor.patch format.", 19 | "type": "string", 20 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 21 | "example": "4.6.1" 22 | }, 23 | "text": { 24 | "description": "The name of the strain to which the organism belongs.", 25 | "type": "string", 26 | "example": "C57BL/6; BALB/c", 27 | "user_friendly": "Strain" 28 | }, 29 | "ontology": { 30 | "description": "An ontology term identifier in the form prefix:accession.", 31 | "type": "string", 32 | "graph_restriction": { 33 | "ontologies" : ["obo:efo", "obo:NCBITaxon"], 34 | "classes": ["NCBITaxon:10090"], 35 | "relations": ["rdfs:subClassOf"], 36 | "direct": false, 37 | "include_self": true 38 | }, 39 | "example": "EFO:0004472; EFO:0000602", 40 | "user_friendly": "Strain ontology ID" 41 | }, 42 | "ontology_label": { 43 | "description": "The preferred label for the ontology term referred to in the ontology field. This may differ from the user-supplied value in the text field.", 44 | "type": "string", 45 | "example": "C57BL/6; BALB/c", 46 | "user_friendly": "Strain ontology label" 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /tests/resources/hca/module/ontology/time_unit_ontology.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "A term that may be associated with a time unit-related ontology term.", 4 | "additionalProperties": false, 5 | "required": [ 6 | "text" 7 | ], 8 | "title": "Time unit ontology", 9 | "name": "time_unit_ontology", 10 | "type": "object", 11 | "properties": { 12 | "describedBy": { 13 | "description": "The URL reference to the schema.", 14 | "type": "string", 15 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/ontology/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/time_unit_ontology" 16 | }, 17 | "schema_version": { 18 | "description": "The version number of the schema in major.minor.patch format.", 19 | "type": "string", 20 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 21 | "example": "4.6.1" 22 | }, 23 | "text": { 24 | "description": "The name of a time unit being used.", 25 | "type": "string", 26 | "example": "second; week", 27 | "user_friendly": "Time unit" 28 | }, 29 | "ontology": { 30 | "description": "An ontology term identifier in the form prefix:accession.", 31 | "type": "string", 32 | "graph_restriction": { 33 | "ontologies" : ["obo:efo", "obo:uo"], 34 | "classes": ["UO:0000003", "UO:0000149"], 35 | "relations": ["rdfs:subClassOf"], 36 | "direct": false, 37 | "include_self": false 38 | }, 39 | "example": "UO:0000010; UO:0000034", 40 | "user_friendly": "Time unit ontology ID" 41 | }, 42 | "ontology_label": { 43 | "description": "The preferred label for the ontology term referred to in the ontology field. This may differ from the user-supplied value in the text field.", 44 | "type": "string", 45 | "example": "second; week", 46 | "user_friendly": "Time unit ontology label" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /tests/resources/hca/module/process/sequencing/S10x.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "Information specific to 10x experiments.", 4 | "additionalProperties": false, 5 | "title": "S10x", 6 | "name": "S10x", 7 | "type": "object", 8 | "properties": { 9 | "describedBy": { 10 | "description": "The URL reference to the schema.", 11 | "type": "string", 12 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/process/sequencing/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/10x" 13 | }, 14 | "schema_version": { 15 | "description": "The version number of the schema in major.minor.patch format.", 16 | "type": "string", 17 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 18 | "example": "4.6.1" 19 | }, 20 | "fastq_method": { 21 | "description": "Method used for the generation of fastq files from bcl files.", 22 | "type": "string", 23 | "example": "Cellranger mkfastq; bcl2fastq2", 24 | "user_friendly": "Fastq creation method" 25 | }, 26 | "fastq_method_version": { 27 | "description": "Version of the program used for fastq generation.", 28 | "type": "string", 29 | "example": "Cellranger 2.1.1; v2.20", 30 | "user_friendly": "Fastq creation method version" 31 | }, 32 | "pooled_channels": { 33 | "description": "The number of channels pooled within a sequencing lane.", 34 | "type": "number", 35 | "example": 4, 36 | "user_friendly": "Pooled channels" 37 | }, 38 | "drop_uniformity": { 39 | "description": "Whether drop uniformity was achieved as a result of visual inspection of emulsion after a 10x run.", 40 | "type": "boolean", 41 | "example": "Should be one of: yes, or no.", 42 | "user_friendly": "Drop uniformity" 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /tests/resources/hca/module/process/sequencing/insdc_experiment.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "Information relating to an INSDC experiment.", 4 | "additionalProperties": false, 5 | "required": [ 6 | "insdc_experiment_accession" 7 | ], 8 | "title": "INSDC experiment", 9 | "name": "insdc_experiment", 10 | "type": "object", 11 | "properties": { 12 | "describedBy": { 13 | "description": "The URL reference to the schema.", 14 | "type": "string", 15 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/process/sequencing/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/insdc_experiment" 16 | }, 17 | "schema_version": { 18 | "description": "The version number of the schema in major.minor.patch format.", 19 | "type": "string", 20 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 21 | "example": "4.6.1" 22 | }, 23 | "insdc_experiment_accession": { 24 | "description": "An International Nucleotide Sequence Database Collaboration (INSDC) experiment accession.", 25 | "pattern": "^[D|E|S]RX[0-9]+$", 26 | "type": "string", 27 | "user_friendly": "INSDC experiment accession", 28 | "example": "SRX0000000", 29 | "guidelines": "Enter accession if experiment has been archived. Accession can be from the DDBJ, NCBI, or EMBL-EBI and must start with DRX, SRX, or ERX, respecitvely." 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /tests/resources/hca/module/project/funder.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "Information about the project funding source.", 4 | "additionalProperties": false, 5 | "required": [ 6 | "grant_id", 7 | "organization" 8 | ], 9 | "title": "Funder", 10 | "name": "funder", 11 | "type": "object", 12 | "properties": { 13 | "describedBy": { 14 | "description": "The URL reference to the schema.", 15 | "type": "string", 16 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/project/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/funder" 17 | }, 18 | "schema_version": { 19 | "description": "The version number of the schema in major.minor.patch format.", 20 | "type": "string", 21 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 22 | "example": "4.6.1" 23 | }, 24 | "grant_title": { 25 | "description": "The name of the grant funding the project.", 26 | "type": "string", 27 | "example": "Study of single cells in the human body.", 28 | "user_friendly": "Grant title", 29 | "guidelines": "Enter a title of approximately 30 words." 30 | }, 31 | "grant_id": { 32 | "description": "The unique grant identifier or reference.", 33 | "type": "string", 34 | "example": "BB/P0000001/1", 35 | "user_friendly": "Grant ID" 36 | }, 37 | "organization": { 38 | "description": "The name of the funding organization.", 39 | "type": "string", 40 | "example": "Biotechnology and Biological Sciences Research Council (BBSRC); California Institute of Regenerative Medicine (CIRM)", 41 | "user_friendly": "Funding organization" 42 | } 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /tests/resources/hca/system/license.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "Information about the project license.", 4 | "additionalProperties": false, 5 | "title": "License", 6 | "name": "license", 7 | "type": "object", 8 | "properties": { 9 | "describedBy": { 10 | "description": "The URL reference to the schema.", 11 | "type": "string", 12 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/system/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/license" 13 | }, 14 | "schema_version": { 15 | "description": "The version number of the schema in major.minor.patch format.", 16 | "type": "string", 17 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 18 | "example": "4.6.1" 19 | }, 20 | "identifier": { 21 | "type": "string", 22 | "description": "Identifier of the license under which this dataset is made available.", 23 | "example": "CC-BY", 24 | "user_friendly": "License identifier" 25 | }, 26 | "full_name": { 27 | "type": "string", 28 | "description": "Full name of the license under which this dataset is made available.", 29 | "example": "Attribution 4.0 International (CC BY 4.0)", 30 | "user_friendly": "License description" 31 | }, 32 | "url": { 33 | "type": "string", 34 | "description": "URL of the license under which this data is available.", 35 | "example": "https://creativecommons.org/licenses/by/4.0/", 36 | "user_friendly": "License URL" 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tests/resources/hca/type/file/analysis_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "A file analysis results produced by a secondary analysis pipeline.", 4 | "additionalProperties": false, 5 | "required": [ 6 | "describedBy", 7 | "schema_type", 8 | "file_core" 9 | ], 10 | "title": "Analysis file", 11 | "name": "analysis_file", 12 | "type": "object", 13 | "properties": { 14 | "describedBy": { 15 | "description": "The URL reference to the schema.", 16 | "type": "string", 17 | "pattern": "^(http|https)://schema.(.*?)humancellatlas.org/type/file/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/analysis_file" 18 | }, 19 | "schema_version": { 20 | "description": "The version number of the schema in major.minor.patch format.", 21 | "type": "string", 22 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 23 | "example": "4.6.1" 24 | }, 25 | "schema_type": { 26 | "description": "The type of the metadata schema entity.", 27 | "type": "string", 28 | "enum": [ 29 | "file" 30 | ] 31 | }, 32 | "provenance" : { 33 | "description": "Provenance information provided by the system.", 34 | "type": "object", 35 | "$ref": "system/provenance.json" 36 | }, 37 | "file_core" : { 38 | "description": "Core file-level information.", 39 | "type": "object", 40 | "$ref": "core/file/file_core.json", 41 | "user_friendly": "File core" 42 | }, 43 | "matrix_cell_count": { 44 | "description": "Number of cells analyzed in a matrix file.", 45 | "type": "integer", 46 | "maximum": 1000000000, 47 | "minimum": 0, 48 | "example": "1; 2100", 49 | "user_friendly": "Matrix cell count", 50 | "guidelines": "If the analysis file is a matrix containing cells, enter the exact number of cells in the matrix." 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /tests/resources/hca/type/file/image_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "Information about an image file generated by an imaging experiment.", 4 | "additionalProperties": false, 5 | "required": [ 6 | "describedBy", 7 | "schema_type", 8 | "file_core" 9 | ], 10 | "title": "Image file", 11 | "name": "image_file", 12 | "type": "object", 13 | "properties": { 14 | "describedBy": { 15 | "description": "The URL reference to the schema.", 16 | "type": "string", 17 | "pattern": "^(http|https)://schema.(.*?)humancellatlas.org/type/file/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/image_file" 18 | }, 19 | "schema_version": { 20 | "description": "The version number of the schema in major.minor.patch format.", 21 | "type": "string", 22 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 23 | "example": "4.6.1" 24 | }, 25 | "schema_type": { 26 | "description": "The type of the metadata schema entity.", 27 | "type": "string", 28 | "enum": [ 29 | "file" 30 | ] 31 | }, 32 | "provenance" : { 33 | "description": "Provenance information provided by the system.", 34 | "type": "object", 35 | "$ref": "system/provenance.json" 36 | }, 37 | "file_core" : { 38 | "description": "Core file-level information.", 39 | "type": "object", 40 | "$ref": "core/file/file_core.json", 41 | "user_friendly": "File core" 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /tests/resources/hca/type/file/supplementary_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "Supplementary files belonging to a project.", 4 | "additionalProperties": false, 5 | "required": [ 6 | "describedBy", 7 | "schema_type", 8 | "file_core" 9 | ], 10 | "title": "Supplementary file", 11 | "name": "supplementary_file", 12 | "type": "object", 13 | "properties": { 14 | "describedBy": { 15 | "description": "The URL reference to the schema.", 16 | "type": "string", 17 | "pattern": "^(http|https)://schema.(.*?)humancellatlas.org/type/file/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/supplementary_file" 18 | }, 19 | "schema_version": { 20 | "description": "The version number of the schema in major.minor.patch format.", 21 | "type": "string", 22 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 23 | "example": "4.6.1" 24 | }, 25 | "schema_type": { 26 | "description": "The type of the metadata schema entity.", 27 | "type": "string", 28 | "enum": [ 29 | "file" 30 | ] 31 | }, 32 | "provenance" : { 33 | "description": "Provenance information provided by the system.", 34 | "type": "object", 35 | "$ref": "system/provenance.json" 36 | }, 37 | "file_core" : { 38 | "description": "Core file-level information.", 39 | "type": "object", 40 | "$ref": "core/file/file_core.json", 41 | "user_friendly": "File core" 42 | }, 43 | "file_description" : { 44 | "description": "A short description of the file contents.", 45 | "type": "string", 46 | "example": "Protocol for FACS enrichment; Image of spleen sample collection location", 47 | "user_friendly": "File description", 48 | "guidelines": "File description could include information about how the file was generated." 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /tests/resources/hca/type/protocol/protocol.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "description": "Information about the protocol.", 4 | "additionalProperties": false, 5 | "required": [ 6 | "describedBy", 7 | "schema_type", 8 | "protocol_core" 9 | ], 10 | "title": "Protocol", 11 | "name": "protocol", 12 | "type": "object", 13 | "properties": { 14 | "describedBy": { 15 | "description": "The URL reference to the schema.", 16 | "type": "string", 17 | "pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/type/protocol/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/protocol" 18 | }, 19 | "schema_version": { 20 | "description": "The version number of the schema in major.minor.patch format.", 21 | "type": "string", 22 | "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", 23 | "example": "4.6.1" 24 | }, 25 | "schema_type": { 26 | "description": "The type of the metadata schema entity.", 27 | "type": "string", 28 | "enum": [ 29 | "protocol" 30 | ] 31 | }, 32 | "provenance" : { 33 | "description": "Provenance information provided by the system.", 34 | "type": "object", 35 | "$ref": "system/provenance.json" 36 | }, 37 | "protocol_core" : { 38 | "description": "Core protocol-level information.", 39 | "type": "object", 40 | "$ref": "core/protocol/protocol_core.json", 41 | "user_friendly": "Protocol core" 42 | }, 43 | "type": { 44 | "description": "The type of protocol.", 45 | "type": "object", 46 | "$ref": "module/ontology/process_type_ontology.json", 47 | "user_friendly": "Protocol type", 48 | "example": "sample enrichment" 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /tests/resources/hca/update_log.csv: -------------------------------------------------------------------------------- 1 | Schema,Change type,Change message,Version,Date 2 | -------------------------------------------------------------------------------- /tests/resources/mixs/mixs.yaml: -------------------------------------------------------------------------------- 1 | id: http://w3id.org/mixs 2 | name: MIxS 3 | description: Minimal Information about any Sequence Standard 4 | imports: 5 | - linkml:types 6 | - checklists 7 | - core 8 | - air 9 | - built_environment 10 | - host_associated 11 | - human_associated 12 | - human_gut 13 | - human_oral 14 | - human_skin 15 | - human_vaginal 16 | - hydrocarbon_resources_cores 17 | - hydrocarbon_resources_fluids_swabs 18 | - microbial_mat_biofilm 19 | - miscellaneous_natural_or_artificial_environment 20 | - plant_associated 21 | - sediment 22 | - soil 23 | - wastewater_sludge 24 | - water 25 | prefixes: 26 | linkml: https://w3id.org/linkml/ 27 | mixs.vocab: https://w3id.org/mixs/vocab/ 28 | MIXS: https://w3id.org/mixs/terms/ 29 | default_prefix: mixs.vocab 30 | slots: {} 31 | classes: {} 32 | subsets: {} 33 | -------------------------------------------------------------------------------- /tests/resources/mixs/ranges.yaml: -------------------------------------------------------------------------------- 1 | id: http://w3id.org/mixs/ranges 2 | name: ranges 3 | imports: 4 | - linkml:types 5 | prefixes: 6 | linkml: https://w3id.org/linkml/ 7 | mixs.vocab: https://w3id.org/mixs/vocab/ 8 | MIXS: https://w3id.org/mixs/terms/ 9 | default_prefix: mixs.vocab 10 | slots: {} 11 | classes: 12 | quantity value: 13 | description: used to record a measurement 14 | attributes: 15 | has unit: 16 | description: Example "m" 17 | has numeric value: 18 | range: double 19 | has raw value: 20 | string_serialization: '{has numeric value} {has unit}' 21 | subsets: {} 22 | enums: {} 23 | -------------------------------------------------------------------------------- /tests/resources/neon-in-gold.json.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkml/schema-automator/70fe4eb5421165561f051c496179ba380abe9079/tests/resources/neon-in-gold.json.gz -------------------------------------------------------------------------------- /tests/resources/phenopackets/genome.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package org.phenopackets.schema.v2.core; 4 | 5 | option java_multiple_files = true; 6 | option java_package = "org.phenopackets.schema.v2.core"; 7 | 8 | // A file in one of the HTS formats (https://samtools.github.io/hts-specs) -------------------------------------------------------------------------------- /tests/resources/phenopackets/pedigree.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package org.phenopackets.schema.v2.core; 4 | 5 | import "individual.proto"; 6 | 7 | option java_multiple_files = true; 8 | option java_package = "org.phenopackets.schema.v2.core"; 9 | 10 | // https://software.broadinstitute.org/gatk/documentation/article?id=11016 11 | message Pedigree { 12 | repeated Person persons = 1; 13 | 14 | message Person { 15 | enum AffectedStatus { 16 | MISSING = 0; 17 | UNAFFECTED = 1; 18 | AFFECTED = 2; 19 | } 20 | string family_id = 1; 21 | string individual_id = 2; 22 | string paternal_id = 3; 23 | string maternal_id = 4; 24 | Sex sex = 5; 25 | AffectedStatus affected_status = 6; 26 | } 27 | } -------------------------------------------------------------------------------- /tests/resources/phenopackets/phenotypic_feature.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package org.phenopackets.schema.v2.core; 4 | 5 | import "base.proto"; 6 | 7 | option java_multiple_files = true; 8 | option java_package = "org.phenopackets.schema.v2.core"; 9 | 10 | // An individual phenotypic feature, observed as either present or absent (negated), with possible onset, modifiers and 11 | // frequency 12 | // FHIR mapping: Condition (https://www.hl7.org/fhir/condition.html) or Observation (https://www.hl7.org/fhir/observation.html) 13 | message PhenotypicFeature { 14 | 15 | // Free-text description of the phenotype. Note this is not a acceptable place to document/describe the phenotype - 16 | // the type and onset etc... fields should be used for this purpose. 17 | string description = 1; 18 | 19 | // The primary ontology class which describes the phenotype. For example "HP:0001363" "Craniosynostosis" 20 | // FHIR mapping: Condition.identifier 21 | OntologyClass type = 2; 22 | 23 | // Flag to indicate whether the phenotype was observed or not. Default is 'false', in other words the phenotype was 24 | // observed. Therefore it is only required in cases to indicate that the phenotype was looked for, but found to be 25 | // absent. 26 | // More formally, this modifier indicates the logical negation of the OntologyClass used in the 'type' field. 27 | // *CAUTION* It is imperative to check this field for correct interpretation of the phenotype! 28 | bool excluded = 3; 29 | 30 | // Severity of the condition e.g. subclasses of HP:0012824-Severity or SNOMED:272141005-Severities 31 | // FHIR mapping: Condition.severity 32 | OntologyClass severity = 4; 33 | 34 | // subclasses of HP:0012823 ! Clinical modifier apart from Severity HP:0012824 - Severity 35 | repeated OntologyClass modifiers = 5; 36 | 37 | // the values of this will come from the HPO onset hierarchy 38 | // i.e. subclasses of HP:0003674 39 | // FHIR mapping: Condition.onset 40 | TimeElement onset = 6; 41 | 42 | TimeElement resolution = 7; 43 | 44 | // Evidences for how the phenotype was determined. 45 | repeated Evidence evidence = 8; 46 | } -------------------------------------------------------------------------------- /tests/resources/so-mini.obo: -------------------------------------------------------------------------------- 1 | [Term] 2 | id: SO:0000704 3 | name: gene 4 | def: "A region (or regions) that includes all of the sequence elements necessary to encode a functional transcript. A gene may include regulatory regions, transcribed regions and/or other functional sequence regions." [] 5 | 6 | [Term] 7 | id: SO:0001263 8 | name: ncRNA_gene 9 | def: "A gene that encodes a non-coding RNA." [] 10 | is_a: SO:0000704 11 | 12 | [Term] 13 | id: SO:0001266 14 | name: scRNA_gene 15 | def: "A gene encoding a small noncoding RNA that is generally found only in the cytoplasm." [] 16 | is_a: SO:0001263 17 | 18 | [Typedef] 19 | id: BFO:0000050 20 | def: "this is the part-of definition" [] 21 | name: part of 22 | -------------------------------------------------------------------------------- /tests/resources/test.kwalify.yaml: -------------------------------------------------------------------------------- 1 | type: map 2 | mapping: 3 | "id": 4 | type: str 5 | required: true 6 | "title": 7 | type: str 8 | required: true 9 | "preferred label": 10 | type: str 11 | required: true 12 | "type": 13 | type: str 14 | required: true 15 | enum: [blacklist, binning subset, ribbon, tag] 16 | "status": 17 | type: str 18 | required: true 19 | enum: [active, obsolete] 20 | "description": 21 | type: str 22 | required: true 23 | "taxon": 24 | - type: map 25 | mapping: 26 | "id": 27 | type: str 28 | required: true 29 | pattern: /NCBITaxon\:\d+/ 30 | "label": 31 | type: str 32 | required: true 33 | "github": 34 | - type: map 35 | mapping: 36 | "tracker": 37 | type: string 38 | required: true+ 39 | pattern: /https:\/\/github\.com\/geneontology[^\s]+/ 40 | "contact": 41 | - type: map 42 | mapping: 43 | "email": 44 | type: str 45 | required: true 46 | pattern: /[^\s]+@[^\s]+\.[^\s]+/ 47 | "label": 48 | type: str 49 | required: true 50 | "contributors": 51 | - type: map 52 | mapping: 53 | "email": 54 | type: str 55 | required: true 56 | pattern: /[^\s]+@[^\s]+\.[^\s]+/ 57 | "label": 58 | type: str 59 | required: true 60 | "orcid": 61 | type: str 62 | required: false 63 | pattern: /https:\/\/orcid.org\/\d{4}\-\d{4}\-\d{4}\-\d{4}/ 64 | "github": 65 | type: str 66 | required: false 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /tests/resources/webmap_enums.tsv: -------------------------------------------------------------------------------- 1 | Taxon FAO Engineering 2 | Aequorea.victoria Acrisols plasmid 3 | Aequorea_victoria Andosols Insertion 4 | Arabidopsis thaliana Arenosols Deletion 5 | Ashbya.gossypii Cambisols 6 | bacteriophage P1 Chernozems 7 | bacteriophage.f1 Ferralsols 8 | bacteriophage.lambda Fluvisols 9 | bacteriophage.M13 Gleysols 10 | Bacteriophage.Mu Greyzems 11 | bacteriophage.SP6 Gypsisols 12 | bacteriophage.T3 Histosols 13 | bacteriophage.T4 Kastanozems 14 | bacteriophage.T7 Lithosols 15 | Discosoma.sp Luvisols 16 | herpes.simplex.virus-1 Nitosols 17 | homo.sapiens Phaeozems 18 | Lentivirus.human-immunodeficiency-virus1 Planosols 19 | NA Podzols 20 | Nepovirus.Tobacco-ringspot-virus Podzoluvisols 21 | phage.lambda Rankers 22 | Pseudomonas plasmid pVS1 Regosols 23 | Salmonella enterica subsp. enterica serovar Typhimurium Rendzinas 24 | SARS-CoV-2 Solonchaks 25 | Simian.virus.40 Solonetz 26 | Solanum.tuberosum Vertisols 27 | Woodchuck Hepatitis Virus Yermosols 28 | -------------------------------------------------------------------------------- /tests/test_annotators/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkml/schema-automator/70fe4eb5421165561f051c496179ba380abe9079/tests/test_annotators/__init__.py -------------------------------------------------------------------------------- /tests/test_annotators/test_jsonld_annotator.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """Test the module can be imported.""" 4 | 5 | import unittest 6 | import os 7 | import json 8 | import yaml 9 | from linkml_runtime.utils.compile_python import compile_python 10 | from linkml_runtime.loaders import json_loader 11 | from linkml_runtime.loaders import yaml_loader 12 | from linkml_runtime.utils.schema_as_dict import schema_as_dict 13 | 14 | from schema_automator.annotators.jsonld_annotator import JsonLdAnnotator 15 | from schema_automator.importers.jsonschema_import_engine import JsonSchemaImportEngine 16 | from linkml_runtime.dumpers import yaml_dumper 17 | from linkml.generators.jsonschemagen import JsonSchemaGenerator 18 | from linkml.generators.pythongen import PythonGenerator 19 | 20 | from schema_automator.utils.schemautils import minify_schema 21 | from tests import INPUT_DIR, OUTPUT_DIR 22 | 23 | JSONSCHEMA = os.path.join(INPUT_DIR, 'obo_registry.schema.json') 24 | CONTEXT = os.path.join(INPUT_DIR, 'obo_registry.context.jsonld') 25 | OUTSCHEMA = os.path.join(OUTPUT_DIR, 'obo_registry.yaml') 26 | 27 | class TestJsonLdAnnotator(unittest.TestCase): 28 | 29 | def test_annotate(self): 30 | ie = JsonSchemaImportEngine() 31 | schema = ie.load(JSONSCHEMA) 32 | ann = JsonLdAnnotator() 33 | ann.annotate(schema, CONTEXT) 34 | assert 'foaf' in schema.prefixes 35 | assert schema.prefixes['foaf'].prefix_reference == 'http://xmlns.com/foaf/0.1/' 36 | assert schema.slots['title'].slot_uri == 'dce:title' 37 | sd = schema_as_dict(schema) 38 | with open(OUTSCHEMA, 'w') as stream: 39 | yaml.safe_dump(sd, stream, sort_keys=False) 40 | 41 | 42 | -------------------------------------------------------------------------------- /tests/test_annotators/test_lov_schema_annotator.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import logging 4 | import unittest 5 | import os 6 | import yaml 7 | from linkml.utils.schema_builder import SchemaBuilder 8 | from linkml_runtime.dumpers import yaml_dumper 9 | from linkml_runtime.linkml_model import SchemaDefinition, EnumDefinition, PermissibleValue 10 | from oaklib import OntologyResource 11 | from oaklib.implementations import BioPortalImplementation 12 | from oaklib.implementations.sparql.lov_implementation import LovImplementation 13 | from oaklib.selector import get_implementation_from_shorthand 14 | 15 | from schema_automator.annotators.schema_annotator import SchemaAnnotator 16 | from linkml.generators.yamlgen import YAMLGenerator 17 | from tests import INPUT_DIR, OUTPUT_DIR 18 | 19 | 20 | class LovSchemaAnnotatorTestCase(unittest.TestCase): 21 | """ 22 | Tests schema annotator using LOV. 23 | """ 24 | 25 | def setUp(self) -> None: 26 | impl = LovImplementation(OntologyResource()) 27 | self.annotator = SchemaAnnotator(impl) 28 | 29 | @unittest.skip("Currently incomplete") 30 | def test_ann(self): 31 | s = SchemaDefinition(id='test', name='test') 32 | sb = SchemaBuilder(s) 33 | sb.add_class('Person').add_slot('full_name').add_slot('phone_number') 34 | # TODO: use add_enum 35 | e = EnumDefinition('VitalStatus') 36 | s.enums[e.name] = e 37 | pv1 = PermissibleValue('LIVING') 38 | pv2 = PermissibleValue('DEAD') 39 | e.permissible_values[pv1.text] = pv1 40 | e.permissible_values[pv2.text] = pv2 41 | self.annotator.annotate_schema(s, curie_only=True) 42 | print(yaml_dumper.dumps(s)) 43 | gene = list(s.classes.values())[0] 44 | self.assertIn('SO:0000704', gene.exact_mappings) 45 | gene_type = list(s.enums.values())[0] 46 | self.assertIn('NCIT:C25284', gene_type.exact_mappings) 47 | for pv in gene_type.permissible_values.values(): 48 | self.assertIsNotNone(pv.meaning) 49 | self.assertGreater(len(pv.exact_mappings), 1) 50 | 51 | 52 | -------------------------------------------------------------------------------- /tests/test_annotators/test_schema_enricher.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import logging 4 | import os 5 | import unittest 6 | from linkml.utils.schema_builder import SchemaBuilder 7 | from linkml_runtime.dumpers import yaml_dumper 8 | from linkml_runtime.linkml_model import SchemaDefinition, EnumDefinition, PermissibleValue 9 | from oaklib.implementations import BioPortalImplementation 10 | from oaklib.selector import get_implementation_from_shorthand 11 | 12 | from schema_automator.annotators.schema_annotator import SchemaAnnotator 13 | from linkml.generators.yamlgen import YAMLGenerator 14 | from tests import INPUT_DIR, OUTPUT_DIR 15 | 16 | 17 | class SchemaEnricherTestCase(unittest.TestCase): 18 | """ 19 | Tests :ref:`SchemaAnnotator` 20 | """ 21 | 22 | def setUp(self) -> None: 23 | """ 24 | Use a fragment of the Sequence Ontology as a test case 25 | """ 26 | impl = get_implementation_from_shorthand(os.path.join(INPUT_DIR, "so-mini.obo")) 27 | self.annotator = SchemaAnnotator(impl) 28 | 29 | def test_enrich(self): 30 | sb = SchemaBuilder('test') 31 | schema = sb.schema 32 | sb.add_class('Gene', class_uri="SO:0000704").add_slot('part_of') 33 | schema.slots['part_of'].exact_mappings.append("BFO:0000050") 34 | sb.add_enum('GeneType', permissible_values=['ncRNA_gene', 'scRNA_gene']) 35 | gt = schema.enums['GeneType'] 36 | gt.permissible_values['ncRNA_gene'].meaning = 'SO:0001263' 37 | gt.permissible_values['scRNA_gene'].meaning = 'SO:0001266' 38 | s = self.annotator.enrich(schema) 39 | #print(yaml_dumper.dumps(s)) 40 | assert s.classes['Gene'].description.startswith("A region") 41 | assert s.slots['part_of'].description.startswith("this is") 42 | self.assertEqual("A gene that encodes a non-coding RNA.", 43 | gt.permissible_values['ncRNA_gene'].description) 44 | self.assertEqual("A gene encoding a small noncoding RNA that is generally found only in the cytoplasm.", 45 | gt.permissible_values['scRNA_gene'].description) 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /tests/test_cli/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkml/schema-automator/70fe4eb5421165561f051c496179ba380abe9079/tests/test_cli/__init__.py -------------------------------------------------------------------------------- /tests/test_generalizers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkml/schema-automator/70fe4eb5421165561f051c496179ba380abe9079/tests/test_generalizers/__init__.py -------------------------------------------------------------------------------- /tests/test_generalizers/test_from_robot_template.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """Test the module can be imported.""" 4 | 5 | import unittest 6 | import os 7 | from schema_automator.generalizers.csv_data_generalizer import CsvDataGeneralizer 8 | from linkml.generators.yamlgen import YAMLGenerator 9 | from linkml_runtime.utils.schemaview import SchemaView 10 | 11 | from schema_automator.utils.schemautils import write_schema 12 | from tests import INPUT_DIR, OUTPUT_DIR 13 | 14 | BIOBANK_SPECIMENS = os.path.join(INPUT_DIR, 'biobank-specimens.tsv') 15 | OUTSCHEMA = os.path.join(OUTPUT_DIR, 'biobank.yaml') 16 | OUTSCHEMA_ENHANCED = os.path.join(OUTPUT_DIR, 'biobank.enhanced.yaml') 17 | 18 | class TestRobotTemplateImport(unittest.TestCase): 19 | """tests import from a robot template """ 20 | 21 | def test_from_robot_template(self): 22 | """Test that expando can be imported.""" 23 | ie = CsvDataGeneralizer(robot=True) 24 | schema = ie.convert(BIOBANK_SPECIMENS, class_name='BiobankSpecimen', name='biobank') 25 | write_schema(schema, OUTSCHEMA) 26 | sv = SchemaView(OUTSCHEMA) 27 | s = YAMLGenerator(OUTSCHEMA).serialize() 28 | with open(OUTSCHEMA_ENHANCED, 'w') as stream: 29 | stream.write(s) 30 | for cn, c in sv.all_class().items(): 31 | print(f'C: {cn}') 32 | for s in sv.class_induced_slots(cn): 33 | print(f' S: {s.name} {s.identifier}') 34 | id_slot = sv.get_identifier_slot(cn) 35 | print(f'ID = {id_slot}') 36 | if cn == 'BiobankSpecimen': 37 | assert id_slot.name == 'Ontology ID' 38 | 39 | 40 | -------------------------------------------------------------------------------- /tests/test_generalizers/test_pandas_data_generalizer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """Test the module can be imported.""" 4 | 5 | import unittest 6 | 7 | from schema_automator.generalizers.generalizer import DEFAULT_CLASS_NAME 8 | from schema_automator.generalizers.pandas_generalizer import PandasDataGeneralizer 9 | import pandas as pd 10 | 11 | from schema_automator.utils import write_schema 12 | 13 | 14 | class TestPandasDataGeneralizer(unittest.TestCase): 15 | """Tests generalization from RDF triples """ 16 | 17 | def test_from_pandas(self): 18 | ie = PandasDataGeneralizer() 19 | expected = [ 20 | ([5, 10, 20], 'integer'), 21 | (["a", "b", "c"], 'string'), 22 | (pd.to_datetime(["2010", "2011", "2012"]), 'datetime'), 23 | ([5.5, 10, 20], 'float') 24 | ] 25 | n = 1 26 | items = {} 27 | expected_types = {} 28 | for vals, expected_type in expected: 29 | col_name = f"column{n}" 30 | items[col_name] = vals 31 | expected_types[col_name] = expected_type 32 | n += 1 33 | df = pd.DataFrame(items) 34 | schema = ie.convert(df, schema_name='my_schema') 35 | #write_schema(schema) 36 | c = schema.classes[DEFAULT_CLASS_NAME] 37 | for col_name, expected_type in expected_types.items(): 38 | self.assertEqual(expected_type, c.attributes[col_name].range) 39 | 40 | 41 | -------------------------------------------------------------------------------- /tests/test_generalizers/test_rdf_data_generalizer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """Test the module can be imported.""" 4 | 5 | import unittest 6 | import os 7 | from schema_automator.generalizers.rdf_data_generalizer import RdfDataGeneralizer 8 | from linkml.generators.yamlgen import YAMLGenerator 9 | 10 | from schema_automator.utils.schemautils import write_schema 11 | from tests import INPUT_DIR, OUTPUT_DIR 12 | 13 | PROV = os.path.join(INPUT_DIR, 'prov.ttl') 14 | DIR = os.path.join(OUTPUT_DIR, 'prov') 15 | OUTSCHEMA = os.path.join(OUTPUT_DIR, 'rdfs-from-prov.yaml') 16 | OUTSCHEMA_ENHANCED = os.path.join(OUTPUT_DIR, 'rdfs-from-prov.enhanced.yaml') 17 | 18 | class TestRdfDataGeneralizer(unittest.TestCase): 19 | """Tests generalization from RDF triples """ 20 | 21 | def test_from_rdf(self): 22 | sie = RdfDataGeneralizer() 23 | if not os.path.exists(DIR): 24 | os.makedirs(DIR) 25 | schema = sie.convert(PROV, dir=DIR, format='ttl') 26 | write_schema(schema, OUTSCHEMA) 27 | s = YAMLGenerator(OUTSCHEMA).serialize() 28 | with open(OUTSCHEMA_ENHANCED, 'w') as stream: 29 | stream.write(s) 30 | 31 | -------------------------------------------------------------------------------- /tests/test_importers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkml/schema-automator/70fe4eb5421165561f051c496179ba380abe9079/tests/test_importers/__init__.py -------------------------------------------------------------------------------- /tests/test_importers/test_cadsr_importer.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from linkml.generators import PythonGenerator, OwlSchemaGenerator 4 | from linkml_runtime import SchemaView 5 | 6 | from schema_automator.importers.cadsr_import_engine import CADSRImportEngine 7 | from schema_automator.utils import write_schema 8 | from tests import INPUT_DIR, OUTPUT_DIR 9 | 10 | IDS = ["996", "12137353", "2724331", "2721353", "2179609"] 11 | OUT = os.path.join(OUTPUT_DIR, "cadsr-cde-example.yaml") 12 | OWL_OUT = os.path.join(OUTPUT_DIR, "cadsr-cde-example.owl.ttl") 13 | 14 | 15 | def test_cadsr_import(): 16 | ie = CADSRImportEngine() 17 | paths = [os.path.join(INPUT_DIR, f"cadsr-cde-{i}.json") for i in IDS] 18 | schema = ie.convert(paths, id="https://w3id.org/linkml/cadsr", name="cadsr_schema") 19 | assert schema 20 | write_schema(schema, OUT) 21 | py_str = PythonGenerator(OUT).serialize() 22 | assert py_str 23 | _sv = SchemaView(schema) 24 | with open(OWL_OUT, "w", encoding="utf-8") as stream: 25 | owlgen = OwlSchemaGenerator(OUT, add_root_classes=True, metaclasses=False, type_objects=False) 26 | stream.write(owlgen.serialize()) 27 | 28 | 29 | def test_cadsr_to_table(): 30 | ie = CADSRImportEngine() 31 | paths = [os.path.join(INPUT_DIR, f"cadsr-cde-{i}.json") for i in IDS] 32 | rows = list(ie.as_rows(paths)) 33 | assert rows 34 | for row in rows: 35 | print(row) 36 | -------------------------------------------------------------------------------- /tests/test_importers/test_convert_shacl_owl_representation.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """Test the module can be imported.""" 4 | 5 | import unittest 6 | import os 7 | import yaml 8 | from schema_automator.importers.owl_import_engine import OwlImportEngine 9 | from linkml.generators.yamlgen import YAMLGenerator 10 | 11 | from schema_automator.utils.schemautils import write_schema 12 | from tests import INPUT_DIR, OUTPUT_DIR 13 | 14 | SHACL = os.path.join(INPUT_DIR, 'shacl.ofn') 15 | DIR = os.path.join(OUTPUT_DIR, 'shacl') 16 | OUTSCHEMA = os.path.join(OUTPUT_DIR, 'shacl-from-owl.yaml') 17 | OUTSCHEMA_ENHANCED = os.path.join(OUTPUT_DIR, 'shacl-from-owl-enhanced.yaml') 18 | 19 | class TestShaclOwlImport(unittest.TestCase): 20 | """Tests conversion of shacl metamodel (in OWL) to LinkML 21 | """ 22 | 23 | def test_convert_shacl_owl(self): 24 | oie = OwlImportEngine() 25 | schema = oie.convert(SHACL, name='shacl') 26 | write_schema(schema, OUTSCHEMA) 27 | s = YAMLGenerator(OUTSCHEMA).serialize() 28 | with open(OUTSCHEMA_ENHANCED, 'w') as stream: 29 | stream.write(s) 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests/test_importers/test_dosdp_importer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """Test the module can be imported.""" 4 | 5 | import unittest 6 | import os 7 | import yaml 8 | import glob 9 | from linkml_runtime.loaders import yaml_loader 10 | 11 | from schema_automator.metamodels.dosdp.model import Pattern 12 | from linkml.generators.owlgen import OwlSchemaGenerator 13 | 14 | from schema_automator.utils.schemautils import minify_schema 15 | from schema_automator.importers.dosdp_import_engine import DOSDPImportEngine 16 | from tests import INPUT_DIR, OUTPUT_DIR 17 | 18 | DOSDP_DIR = os.path.join(INPUT_DIR, 'dosdp') 19 | META_OWL_OUTPUT = os.path.join(OUTPUT_DIR, 'mondo_dps.owl') 20 | 21 | def load_dp(path) -> Pattern: 22 | with open(path) as stream: 23 | obj = yaml.safe_load(stream) 24 | if 'def' in obj: 25 | obj['definition'] = obj['def'] 26 | del obj['def'] 27 | return yaml_loader.load(obj, target_class=Pattern) 28 | 29 | class TestDOSDPImporter(unittest.TestCase): 30 | """Tests import from DOSDP yaml templates """ 31 | 32 | def test_dosdp_import(self): 33 | """ 34 | Test importing a folder 35 | """ 36 | ie = DOSDPImportEngine() 37 | files = glob.glob(os.path.join(DOSDP_DIR, '*.yaml')) 38 | print(f'LOADING: {files}') 39 | schema = ie.convert(files, 40 | id='https://example.org/mondo/', 41 | name='mondo', range_as_enums=False) 42 | #print(schema) 43 | sd = minify_schema(schema) 44 | model_path = os.path.join(OUTPUT_DIR, 'mondo_dps.yaml') 45 | with open(model_path, 'w') as stream: 46 | yaml.safe_dump(sd, stream, sort_keys=False) 47 | with open(META_OWL_OUTPUT, 'w') as stream: 48 | stream.write(OwlSchemaGenerator(model_path, type_objects=False, metaclasses=False).serialize()) 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /tests/test_importers/test_frictionless_importer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import unittest 4 | import os 5 | 6 | from linkml.generators.pythongen import PythonGenerator 7 | from linkml_runtime import SchemaView 8 | from linkml_runtime.dumpers import yaml_dumper 9 | 10 | from schema_automator.importers.frictionless_import_engine import FrictionlessImportEngine 11 | from schema_automator.utils import write_schema 12 | from tests import INPUT_DIR, OUTPUT_DIR 13 | 14 | C2M2 = os.path.join(INPUT_DIR, "C2M2_datapackage.json") 15 | OUT = os.path.join(OUTPUT_DIR, "C2M2.yaml") 16 | 17 | class TestFrictionlessImporter(unittest.TestCase): 18 | """Tests import from Frictionless data packages """ 19 | 20 | def setUp(self) -> None: 21 | pass 22 | 23 | def test_frictionless_import(self): 24 | """ 25 | Test importing a package 26 | """ 27 | ie = FrictionlessImportEngine() 28 | schema = ie.convert(C2M2, id="https://w3id.org/linkml/cfde", name="cfde_schema") 29 | write_schema(schema, OUT) 30 | py_str = PythonGenerator(OUT).serialize() 31 | self.assertIsNotNone(py_str) 32 | sv = SchemaView(schema) 33 | biosample = sv.get_class('biosample') 34 | slot = sv.induced_slot('anatomy', biosample.name) 35 | self.assertEqual('anatomy', slot.range) 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /tests/test_importers/test_from_owl_schemaorg.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """Test the module can be imported.""" 4 | 5 | import unittest 6 | import os 7 | import yaml 8 | from schema_automator.importers.owl_import_engine import OwlImportEngine 9 | from linkml.generators.yamlgen import YAMLGenerator 10 | from tests import INPUT_DIR, OUTPUT_DIR 11 | 12 | SDO = os.path.join(INPUT_DIR, 'schemaorg-robot.ofn') 13 | OUTSCHEMA = os.path.join(OUTPUT_DIR, 'schemaorg.yaml') 14 | OUTSCHEMA_ENHANCED = os.path.join(OUTPUT_DIR, 'schemaorg.enhanced.yaml') 15 | 16 | class TestSchemaOrgOwlImport(unittest.TestCase): 17 | """PROV """ 18 | 19 | @unittest.skip 20 | def test_from_owl(self): 21 | """Test OWL conversion.""" 22 | oie = OwlImportEngine() 23 | schema_dict = oie.convert(SDO, name='schemaorg') 24 | ys = yaml.dump(schema_dict, default_flow_style=False, sort_keys=False) 25 | #print(ys) 26 | with open(OUTSCHEMA, 'w') as stream: 27 | stream.write(ys) 28 | s = YAMLGenerator(ys).serialize() 29 | with open(OUTSCHEMA_ENHANCED, 'w') as stream: 30 | stream.write(s) 31 | 32 | 33 | -------------------------------------------------------------------------------- /tests/test_importers/test_kwalify_importer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import os 4 | from pathlib import Path 5 | 6 | import pytest 7 | from linkml.generators.pythongen import PythonGenerator 8 | from linkml_runtime import SchemaView 9 | from schema_automator.importers.kwalify_import_engine import KwalifyImportEngine 10 | from schema_automator.utils import write_schema 11 | from tests import INPUT_DIR, OUTPUT_DIR 12 | 13 | 14 | EXPECTED_TEST1 = """ 15 | status: 16 | range: MySchema_status_enum 17 | required: true 18 | description: 19 | range: string 20 | required: true 21 | taxon: 22 | range: Taxon 23 | required: false 24 | """ 25 | 26 | 27 | @pytest.mark.parametrize('test_input,schema_id, schema_name,class_name,expected', [ 28 | ("test2", None, None, None, None), 29 | ("test", None, None, None, None), 30 | ("test", None, "my_schema", None, [EXPECTED_TEST1]), 31 | ]) 32 | def test_kwalify_import(test_input, schema_id, schema_name, class_name, expected): 33 | """ 34 | Test importing kwalify 35 | """ 36 | ie = KwalifyImportEngine() 37 | in_path = Path(INPUT_DIR) / f"{test_input}.kwalify.yaml" 38 | out_path = str(Path(OUTPUT_DIR) / f"{test_input}-from-kwalify.yaml") 39 | schema = ie.convert(in_path, 40 | id=schema_id, name=schema_name, 41 | class_name=class_name) 42 | write_schema(schema, out_path) 43 | schema_str = open(out_path).read() 44 | py_str = PythonGenerator(out_path).serialize() 45 | assert py_str is not None 46 | _sv = SchemaView(schema) 47 | if expected: 48 | for e in expected: 49 | assert e in schema_str 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /tests/test_importers/test_owl_importer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """Test the module can be imported.""" 4 | 5 | import unittest 6 | import os 7 | import yaml 8 | from schema_automator.importers.owl_import_engine import OwlImportEngine 9 | from linkml.generators.yamlgen import YAMLGenerator 10 | 11 | from schema_automator.utils.schemautils import write_schema 12 | from tests import INPUT_DIR, OUTPUT_DIR 13 | 14 | PROV = os.path.join(INPUT_DIR, 'prov.ofn') 15 | DIR = os.path.join(OUTPUT_DIR, 'prov') 16 | OUTSCHEMA = os.path.join(OUTPUT_DIR, 'prov-from-owl.yaml') 17 | OUTSCHEMA_ENHANCED = os.path.join(OUTPUT_DIR, 'prov-from-owl.enhanced.yaml') 18 | 19 | class TestOwlImporter(unittest.TestCase): 20 | """Tests OWL conversion """ 21 | 22 | def test_from_owl(self): 23 | """Test OWL conversion on reproschema.""" 24 | oie = OwlImportEngine() 25 | schema = oie.convert(PROV, name='prov') 26 | write_schema(schema, OUTSCHEMA) 27 | s = YAMLGenerator(OUTSCHEMA).serialize() 28 | with open(OUTSCHEMA_ENHANCED, 'w') as stream: 29 | stream.write(s) 30 | 31 | def test_anon_individuals(self): 32 | """ 33 | Test that anonymous individuals are handled correctly 34 | """ 35 | oie = OwlImportEngine() 36 | schema = oie.convert(os.path.join(INPUT_DIR, 'test-anon-individual.ofn'), name='anon_individuals') 37 | write_schema(schema, os.path.join(OUTPUT_DIR, 'anon-individual-from-owl.yaml')) 38 | 39 | 40 | -------------------------------------------------------------------------------- /tests/test_importers/test_tabular_importer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import unittest 4 | import os 5 | from pathlib import Path 6 | 7 | import pandas as pd 8 | 9 | from schema_automator.importers.tabular_import_engine import TableImportEngine 10 | from schema_automator.utils import write_schema 11 | from tests import INPUT_DIR, OUTPUT_DIR 12 | 13 | OUT = os.path.join(OUTPUT_DIR, "BioMRLs.yaml") 14 | INPUT_HTML = os.path.join(INPUT_DIR, "BioMRLs-table.html") 15 | 16 | 17 | class TestTableImporter(unittest.TestCase): 18 | """Tests import from tables data packages """ 19 | 20 | def setUp(self) -> None: 21 | pass 22 | 23 | def test_html_import(self): 24 | """ 25 | Test importing a table from HTML via BS 26 | """ 27 | ie = TableImportEngine(parent="BioMRL", 28 | element_type="enum", 29 | columns=["permissible_value", "description"]) 30 | # this doesn't work on windows: 31 | dfs = pd.read_html(Path(f"{INPUT_HTML}").as_uri()) 32 | schema = ie.import_from_dataframe(dfs[0]) 33 | write_schema(schema, OUT) 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /tests/test_utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkml/schema-automator/70fe4eb5421165561f051c496179ba380abe9079/tests/test_utils/__init__.py --------------------------------------------------------------------------------