From 9c281275ba3738696b49ea691292a62c8680624f Mon Sep 17 00:00:00 2001 From: rctauber Date: Thu, 5 Nov 2020 11:44:02 -0800 Subject: [PATCH 1/6] First pass at VALVE --- Makefile | 15 ++++++++++++++- ontology/core.tsv | 5 ++++- ontology/external.tsv | 13 ++++++++++--- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8c6a508..74872eb 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ templates = $(foreach i,$(build_files),--template $(i)) ### Set Up -build build/validate: +build build/validate build/valve: mkdir -p $@ # We use the official development version of ROBOT for most things. @@ -115,6 +115,19 @@ build/validation_errors.tsv: src/scripts/validate_templates.py index.tsv iedb/ie build/validation_errors_strict.tsv: src/scripts/validate_templates.py index.tsv iedb/iedb.tsv $(build_files) python3 $< index.tsv iedb/iedb.tsv build $@ +VALVE_CONFIG_MASTER := $(foreach f,$(shell ls src/validation),src/validation/$(f)) +VALVE_CONFIG := $(foreach f,$(shell ls src/validation),build/valve/$(f)) +VALVE_TABLES := $(foreach f,$(shell ls ontology | grep .tsv),build/valve/$(f)) + +$(VALVE_CONFIG): $(VALVE_CONFIG_MASTER) | build/valve + cp src/validation/* build/valve + +build/valve/%.tsv: ontology/%.tsv | build/valve + cp $< $@ + +build/validation_valve.tsv: $(VALVE_CONFIG) $(VALVE_TABLES) + valve -D build/valve -o $@ -r 3 + apply_%: build/validation_%.tsv | .cogs cogs clear all cogs apply $< diff --git a/ontology/core.tsv b/ontology/core.tsv index 2a5c5dd..06dd411 100644 --- a/ontology/core.tsv +++ b/ontology/core.tsv @@ -1,6 +1,9 @@ Label IEDB Label Class Type Parent Logic Definition Definition Source Example of Usage LABEL A OBI:9991118 CLASS_TYPE C % C % A IAO:0000115 A IAO:0000119 A IAO:0000112 -MHC haplotype subclass SO:0001024 A set of MHC alleles that is frequently inherited together. IEDB The mouse H-2-k class II haplotype is expressed in C3H mice. +genetic locus subclass genetic entity +haplotype subclass genetic entity +haplotype_block subclass genetic entity +MHC haplotype subclass haplotype A set of MHC alleles that is frequently inherited together. IEDB The mouse H-2-k class II haplotype is expressed in C3H mice. MHC ligand assay subclass immune epitope assay MHC locus subclass genetic locus The region of a chromosome that codes for MHC molecules. IEDB The class II regions encoding for the DP, DQ, and DR molecules on human chromosome 6. MHC protein complex with haplotype haplotype equivalent MHC protein complex ('haplotype member of' some 'MHC haplotype') A protein complex that is a member of an MHC haplotype. IEDB The mouse H-2-Kk molecule belongs to the H-2-k haplotype. diff --git a/ontology/external.tsv b/ontology/external.tsv index 7703d0f..a65e49b 100644 --- a/ontology/external.tsv +++ b/ontology/external.tsv @@ -1,8 +1,12 @@ ID Label Editor Preferred Term IEDB Label Class Type Parent Logic Definition Definition Source Example of Usage Source Ontology ID A rdfs:label A IAO:0000111 A OBI:9991118 CLASS_TYPE C % C % A IAO:0000115 A IAO:0000119 A IAO:0000112 AI IAO:0000412 +BFO:0000040 material entity http://purl.obolibrary.org/obo/bfo.owl ECO:0000000 evidence evidence subclass information content entity http://purl.obolibrary.org/obo/eco.owl +ECO:0000006 experimental evidence experimental evidence subclass evidence http://purl.obolibrary.org/obo/eco.owl +ECO:0000033 author statement supported by traceable reference author statement supported by traceable reference http://purl.obolibrary.org/obo/eco.owl GO:0042611 MHC protein complex MHC protein complex MHC molecule equivalent protein complex ('has part' some (protein and ('gene product of' some 'MHC locus'))) A transmembrane protein complex composed of an MHC alpha chain and, in most cases, either an MHC class II beta chain or an invariant beta2-microglobin chain, and with or without a bound peptide, lipid, or polysaccharide antigen. GO http://purl.obolibrary.org/obo/go.owl GO:0043234 protein complex protein complex MHC subclass material entity http://purl.obolibrary.org/obo/go.owl +IAO:0000030 information content entity http://purl.obolibrary.org/obo/iao.owl NCBITaxon:8355 clawed frog Xenopus laevis subclass organism http://purl.obolibrary.org/obo/ncbitaxon.owl NCBITaxon:8839 duck Anas platyrhynchos subclass organism http://purl.obolibrary.org/obo/ncbitaxon.owl NCBITaxon:9031 chicken Gallus gallus subclass organism http://purl.obolibrary.org/obo/ncbitaxon.owl @@ -24,9 +28,12 @@ NCBITaxon:9940 sheep Ovis aries subclass organism http://purl.obolibrary.or NCBITaxon:9986 rabbit Oryctolagus cuniculus subclass organism http://purl.obolibrary.org/obo/ncbitaxon.owl NCBITaxon:10090 mouse Mus musculus subclass organism http://purl.obolibrary.org/obo/ncbitaxon.owl NCBITaxon:10116 rat Rattus norvegicus subclass organism http://purl.obolibrary.org/obo/ncbitaxon.owl +OBI:0100026 organism subclass material entity http://purl.obolibrary.org/obo/obi.owl +OBI:1110128 immune epitope assay http://purl.obolibrary.org/obo/obi.owl +OBI:1110128 assay measuring binding of a T cell epitope:MHC:TCR complex subclass immune epitope assay http://purl.obolibrary.org/obo/obi.owl PR:000000001 protein protein subclass material entity http://purl.obolibrary.org/obo/pr.owl PR:000004580 Beta-2-microglobulin Beta-2-microglobulin subclass protein A protein that is a translation product of the human B2M gene or a 1:1 ortholog thereof. http://purl.obolibrary.org/obo/pr.owl -REO:0000079 genetic locus genetic locus subclass genetic entity a nucleic acid sequence region that is part of a genome and represents a specified location or region on a chromosome or other genomic element. http://purl.obolibrary.org/obo/reo.owl -SO:0000355 haplotype_block haplotype_block subclass genetic entity A region of the genome which is co-inherited as the result of the lack of historic recombination within it. http://purl.obolibrary.org/obo/so.owl -SO:0001024 haplotype haplotype subclass genetic entity A haplotype is one of a set of coexisting sequence variants of a haplotype block. http://purl.obolibrary.org/obo/so.owl +REO:0000079 genetic locus genetic locus a nucleic acid sequence region that is part of a genome and represents a specified location or region on a chromosome or other genomic element. http://purl.obolibrary.org/obo/reo.owl +SO:0000355 haplotype_block haplotype_block A region of the genome which is co-inherited as the result of the lack of historic recombination within it. http://purl.obolibrary.org/obo/so.owl +SO:0001024 haplotype haplotype A haplotype is one of a set of coexisting sequence variants of a haplotype block. http://purl.obolibrary.org/obo/so.owl owl:Thing owl:Thing From bf7fb1bf5fbe5f94bab94f8e868e9985971d5433 Mon Sep 17 00:00:00 2001 From: rctauber Date: Thu, 5 Nov 2020 11:56:11 -0800 Subject: [PATCH 2/6] Fix ID in external --- ontology/external.tsv | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ontology/external.tsv b/ontology/external.tsv index a65e49b..ae1605e 100644 --- a/ontology/external.tsv +++ b/ontology/external.tsv @@ -1,12 +1,12 @@ ID Label Editor Preferred Term IEDB Label Class Type Parent Logic Definition Definition Source Example of Usage Source Ontology ID A rdfs:label A IAO:0000111 A OBI:9991118 CLASS_TYPE C % C % A IAO:0000115 A IAO:0000119 A IAO:0000112 AI IAO:0000412 -BFO:0000040 material entity http://purl.obolibrary.org/obo/bfo.owl +BFO:0000040 material entity material entity http://purl.obolibrary.org/obo/bfo.owl ECO:0000000 evidence evidence subclass information content entity http://purl.obolibrary.org/obo/eco.owl ECO:0000006 experimental evidence experimental evidence subclass evidence http://purl.obolibrary.org/obo/eco.owl -ECO:0000033 author statement supported by traceable reference author statement supported by traceable reference http://purl.obolibrary.org/obo/eco.owl +ECO:0000033 author statement supported by traceable reference http://purl.obolibrary.org/obo/eco.owl GO:0042611 MHC protein complex MHC protein complex MHC molecule equivalent protein complex ('has part' some (protein and ('gene product of' some 'MHC locus'))) A transmembrane protein complex composed of an MHC alpha chain and, in most cases, either an MHC class II beta chain or an invariant beta2-microglobin chain, and with or without a bound peptide, lipid, or polysaccharide antigen. GO http://purl.obolibrary.org/obo/go.owl GO:0043234 protein complex protein complex MHC subclass material entity http://purl.obolibrary.org/obo/go.owl -IAO:0000030 information content entity http://purl.obolibrary.org/obo/iao.owl +IAO:0000030 information content entity information content entity http://purl.obolibrary.org/obo/iao.owl NCBITaxon:8355 clawed frog Xenopus laevis subclass organism http://purl.obolibrary.org/obo/ncbitaxon.owl NCBITaxon:8839 duck Anas platyrhynchos subclass organism http://purl.obolibrary.org/obo/ncbitaxon.owl NCBITaxon:9031 chicken Gallus gallus subclass organism http://purl.obolibrary.org/obo/ncbitaxon.owl @@ -28,9 +28,9 @@ NCBITaxon:9940 sheep Ovis aries subclass organism http://purl.obolibrary.or NCBITaxon:9986 rabbit Oryctolagus cuniculus subclass organism http://purl.obolibrary.org/obo/ncbitaxon.owl NCBITaxon:10090 mouse Mus musculus subclass organism http://purl.obolibrary.org/obo/ncbitaxon.owl NCBITaxon:10116 rat Rattus norvegicus subclass organism http://purl.obolibrary.org/obo/ncbitaxon.owl -OBI:0100026 organism subclass material entity http://purl.obolibrary.org/obo/obi.owl -OBI:1110128 immune epitope assay http://purl.obolibrary.org/obo/obi.owl -OBI:1110128 assay measuring binding of a T cell epitope:MHC:TCR complex subclass immune epitope assay http://purl.obolibrary.org/obo/obi.owl +OBI:0100026 organism organism subclass material entity http://purl.obolibrary.org/obo/obi.owl +OBI:1110128 immune epitope assay immune epitope assay http://purl.obolibrary.org/obo/obi.owl +OBI:1110037 assay measuring binding of a T cell epitope:MHC:TCR complex assay measuring binding of a T cell epitope:MHC:TCR complex subclass immune epitope assay http://purl.obolibrary.org/obo/obi.owl PR:000000001 protein protein subclass material entity http://purl.obolibrary.org/obo/pr.owl PR:000004580 Beta-2-microglobulin Beta-2-microglobulin subclass protein A protein that is a translation product of the human B2M gene or a 1:1 ortholog thereof. http://purl.obolibrary.org/obo/pr.owl REO:0000079 genetic locus genetic locus a nucleic acid sequence region that is part of a genome and represents a specified location or region on a chromosome or other genomic element. http://purl.obolibrary.org/obo/reo.owl From 371503e866acd05bf93a273268e726717f327030 Mon Sep 17 00:00:00 2001 From: rctauber Date: Thu, 5 Nov 2020 12:00:48 -0800 Subject: [PATCH 3/6] Add to COGS tasks --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 74872eb..d3e4695 100644 --- a/Makefile +++ b/Makefile @@ -135,13 +135,17 @@ apply_%: build/validation_%.tsv | .cogs .PHONY: validate_tables validate_tables: cogs fetch && cogs pull + cogs clear all make apply_errors + make apply_valve cogs push .PHONY: validate_tables_strict validate_tables_strict: cogs fetch && cogs pull + cogs clear all make apply_errors_strict + make apply_valve cogs push ### Processing From b8f4c82ec96c26b5c23588adce2adffcf7fabd30 Mon Sep 17 00:00:00 2001 From: rctauber Date: Thu, 5 Nov 2020 12:05:48 -0800 Subject: [PATCH 4/6] Add VALVE config --- src/validation/datatype.tsv | 8 ++++++++ src/validation/field.tsv | 26 ++++++++++++++++++++++++++ src/validation/prefix.tsv | 14 ++++++++++++++ src/validation/rule.tsv | 9 +++++++++ 4 files changed, 57 insertions(+) create mode 100644 src/validation/datatype.tsv create mode 100644 src/validation/field.tsv create mode 100644 src/validation/prefix.tsv create mode 100644 src/validation/rule.tsv diff --git a/src/validation/datatype.tsv b/src/validation/datatype.tsv new file mode 100644 index 0000000..d8e727d --- /dev/null +++ b/src/validation/datatype.tsv @@ -0,0 +1,8 @@ +datatype parent match level description instructions replace +string ERROR any string +blank string /^$/ ERROR a blank value (an empty string) +line string /^[^\n]+$/ ERROR a single line of text (no line breaks) remove line breaks s/\n/ /g +trimmed line line /^\w.*\w$/ ERROR a line with no leading or trailing whitespace remove leading and trailing whitespace s/\s+(.*)\s+/\1/ +label trimmed line ERROR an ontology term label +IRI trimmed line /^\S+$/ ERROR an Internationalized Resource Identifier remove whitespace characters +prefix trimmed line /^\w+$/ ERROR a valid prefix for a CURIE remove non-word characters diff --git a/src/validation/field.tsv b/src/validation/field.tsv new file mode 100644 index 0000000..385cfed --- /dev/null +++ b/src/validation/field.tsv @@ -0,0 +1,26 @@ +table column type note +external Parent tree(external.Label) +evidence Conclusion tree(evidence.Label, external.Parent) +core Parent tree(core.Label, evidence.Conclusion) +chain Parent tree(chain.Label, core.Parent) +genetic-locus Parent tree(genetic-locus.Label, core.Parent) +haplotype Parent tree(haplotype.Label, core.Parent) +molecule Parent tree(molecule.Label, core.Parent) +mutant-molecule Parent tree(mutant-molecule.Label, core.Parent) +serotype Parent tree(serotype.Label, core.Parent) +chain Parent under(chain.Parent, "protein") +external ID CURIE(prefix.prefix) +genetic-locus Parent under(genetic-locus.Parent, "genetic locus") +haplotype-molecule Parent under(molecule.Parent, "protein complex") +haplotype-molecule In Taxon under(external.Parent, "organism") +haplotype-molecule With Haplotype under(haplotype.Parent, "haplotype") +haplotype Parent under(haplotype.Parent, "haplotype") +molecule Parent under(molecule.Parent, "protein complex") +molecule Alpha Chain blank or from(chain.Label) +molecule Beta Chain blank or in("Beta-2-microglobulin") or from(chain.Label) +molecule With Haplotype blank or under(haplotype.Parent, "haplotype") +molecule With Serotype blank or under(serotype.Parent, "serotype") +mutant-molecule Parent under(mutant-molecule.Parent, "mutant MHC protein complex") +serotype-molecule Parent under(molecule.Parent, "protein complex") +serotype-molecule With Serotype under(serotype.Parent, "serotype") +serotype Parent under(serotype.Parent, "serotype") \ No newline at end of file diff --git a/src/validation/prefix.tsv b/src/validation/prefix.tsv new file mode 100644 index 0000000..9b94f44 --- /dev/null +++ b/src/validation/prefix.tsv @@ -0,0 +1,14 @@ +prefix base + +BFO http://purl.obolibrary.org/obo/BFO_ +ECO http://purl.obolibrary.org/obo/ECO_ +GO http://purl.obolibrary.org/obo/GO_ +IAO http://purl.obolibrary.org/obo/IAO_ +MRO http://purl.obolibrary.org/obo/MRO_ +NCBITaxon http://purl.obolibrary.org/obo/NCBITaxon_ +OBI http://purl.obolibrary.org/obo/OBI_ +obo http://purl.obolibrary.org/obo/ +owl http://www.w3.org/2002/07/owl# +PR http://purl.obolibrary.org/obo/PR_ +REO http://purl.obolibrary.org/obo/REO_ +SO http://purl.obolibrary.org/obo/SO_ diff --git a/src/validation/rule.tsv b/src/validation/rule.tsv new file mode 100644 index 0000000..7749a01 --- /dev/null +++ b/src/validation/rule.tsv @@ -0,0 +1,9 @@ +when table when column when condition then table then column then condition level description note +chain Parent in("protein") chain Gene under(genetic-locus.Parent, "genetic locus") ERROR +external Label not in("owl:Thing") external Source Ontology not blank ERROR +genetic-locus Parent under(genetic-locus.Parent, "MHC locus", direct=True) genetic-locus In Taxon under(external.Parent, "organism") ERROR +haplotype Parent in("MHC haplotype") haplotype In Taxon under(external.Parent, "organism") ERROR +molecule Parent not in("MHC protein complex") molecule In Taxon under(external.Parent, "organism") ERROR +mutant-molecule Parent under(mutant-molecule.Parent, "mutant MHC protein complex", direct=True) mutant-molecule In Taxon under(external.Parent, "organism") ERROR +mutant-molecule Parent not in("mutant MHC protein complex") or under(mutant-molecule.Parent, "mutant MHC protein complex", direct=True) mutant-molecule Mutant Of under(molecule.Parent, "protein complex") ERROR +serotype-molecule Parent not in("MHC protein complex") or under(serotype.Parent, "MHC serotype", direct=True) serotype-molecule In Taxon under(external.Parent, "organism") ERROR \ No newline at end of file From 406dd0a7f528199d8774fa3bfe02601d95656776 Mon Sep 17 00:00:00 2001 From: rctauber Date: Tue, 10 Nov 2020 12:22:22 -0800 Subject: [PATCH 5/6] Update valve command --- Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d3e4695..0214108 100644 --- a/Makefile +++ b/Makefile @@ -115,9 +115,7 @@ build/validation_errors.tsv: src/scripts/validate_templates.py index.tsv iedb/ie build/validation_errors_strict.tsv: src/scripts/validate_templates.py index.tsv iedb/iedb.tsv $(build_files) python3 $< index.tsv iedb/iedb.tsv build $@ -VALVE_CONFIG_MASTER := $(foreach f,$(shell ls src/validation),src/validation/$(f)) -VALVE_CONFIG := $(foreach f,$(shell ls src/validation),build/valve/$(f)) -VALVE_TABLES := $(foreach f,$(shell ls ontology | grep .tsv),build/valve/$(f)) +VALVE_CONFIG := $(foreach f,$(shell ls src/validation),src/validation/$(f)) $(VALVE_CONFIG): $(VALVE_CONFIG_MASTER) | build/valve cp src/validation/* build/valve @@ -125,8 +123,8 @@ $(VALVE_CONFIG): $(VALVE_CONFIG_MASTER) | build/valve build/valve/%.tsv: ontology/%.tsv | build/valve cp $< $@ -build/validation_valve.tsv: $(VALVE_CONFIG) $(VALVE_TABLES) - valve -D build/valve -o $@ -r 3 +build/validation_valve.tsv: $(VALVE_CONFIG) $(source_files) + valve src/validation ontology -o $@ -r 3 apply_%: build/validation_%.tsv | .cogs cogs clear all From fe6c4987a8895a0b3ab511864f43729eba99d58a Mon Sep 17 00:00:00 2001 From: rctauber Date: Tue, 5 Jan 2021 12:07:36 -0800 Subject: [PATCH 6/6] VALVE updates --- Makefile | 2 +- requirements.txt | 1 + src/validation/datatype.tsv | 6 +++--- src/validation/field.tsv | 30 +++++++++++++++--------------- src/validation/prefix.tsv | 2 +- src/validation/rule.tsv | 18 +++++++++--------- 6 files changed, 30 insertions(+), 29 deletions(-) diff --git a/Makefile b/Makefile index aa58172..c99107f 100644 --- a/Makefile +++ b/Makefile @@ -124,7 +124,7 @@ build/valve/%.tsv: ontology/%.tsv | build/valve cp $< $@ build/validation_valve.tsv: $(VALVE_CONFIG) $(source_files) - valve src/validation ontology -o $@ -r 3 + valve src/validation ontology -o $@ -r 3 || true apply_%: build/validation_%.tsv | .cogs cogs clear all diff --git a/requirements.txt b/requirements.txt index ca9892b..2756201 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ cerberus ontodev-cogs ontodev-gizmos==0.1.3 +ontodev-valve openpyxl diff --git a/src/validation/datatype.tsv b/src/validation/datatype.tsv index d8e727d..cc839f7 100644 --- a/src/validation/datatype.tsv +++ b/src/validation/datatype.tsv @@ -1,8 +1,8 @@ datatype parent match level description instructions replace -string ERROR any string -blank string /^$/ ERROR a blank value (an empty string) -line string /^[^\n]+$/ ERROR a single line of text (no line breaks) remove line breaks s/\n/ /g +blank /^$/ ERROR a blank value (an empty string) +line /^[^\n]+$/ ERROR a single line of text (no line breaks) remove line breaks s/\n/ /g trimmed line line /^\w.*\w$/ ERROR a line with no leading or trailing whitespace remove leading and trailing whitespace s/\s+(.*)\s+/\1/ label trimmed line ERROR an ontology term label IRI trimmed line /^\S+$/ ERROR an Internationalized Resource Identifier remove whitespace characters prefix trimmed line /^\w+$/ ERROR a valid prefix for a CURIE remove non-word characters +numeric /^[0-9]+$/ ERROR a sequence of digits remove non-numeric characters diff --git a/src/validation/field.tsv b/src/validation/field.tsv index 385cfed..d1b0e60 100644 --- a/src/validation/field.tsv +++ b/src/validation/field.tsv @@ -1,25 +1,25 @@ -table column type note -external Parent tree(external.Label) -evidence Conclusion tree(evidence.Label, external.Parent) -core Parent tree(core.Label, evidence.Conclusion) -chain Parent tree(chain.Label, core.Parent) -genetic-locus Parent tree(genetic-locus.Label, core.Parent) -haplotype Parent tree(haplotype.Label, core.Parent) -molecule Parent tree(molecule.Label, core.Parent) -mutant-molecule Parent tree(mutant-molecule.Label, core.Parent) -serotype Parent tree(serotype.Label, core.Parent) +table column condition +external Parent tree(Label) +evidence Conclusion tree(Label, external.Parent) +core Parent tree(Label, evidence.Conclusion) +chain Parent tree(Label, core.Parent) +genetic-locus Parent tree(Label, core.Parent) +haplotype Parent tree(Label, core.Parent) +molecule Parent tree(Label, core.Parent) +mutant-molecule Parent tree(Label, core.Parent) +serotype Parent tree(Label, core.Parent) chain Parent under(chain.Parent, "protein") -external ID CURIE(prefix.prefix) +external ID any(in("owl:Thing"), concat(in(prefix.prefix), ":", numeric)) genetic-locus Parent under(genetic-locus.Parent, "genetic locus") haplotype-molecule Parent under(molecule.Parent, "protein complex") haplotype-molecule In Taxon under(external.Parent, "organism") haplotype-molecule With Haplotype under(haplotype.Parent, "haplotype") haplotype Parent under(haplotype.Parent, "haplotype") molecule Parent under(molecule.Parent, "protein complex") -molecule Alpha Chain blank or from(chain.Label) -molecule Beta Chain blank or in("Beta-2-microglobulin") or from(chain.Label) -molecule With Haplotype blank or under(haplotype.Parent, "haplotype") -molecule With Serotype blank or under(serotype.Parent, "serotype") +molecule Alpha Chain any(blank, in(chain.Label)) +molecule Beta Chain any(blank, in("Beta-2-microglobulin", chain.Label)) +molecule With Haplotype any(blank, under(haplotype.Parent, "haplotype")) +molecule With Serotype any(blank, under(serotype.Parent, "serotype")) mutant-molecule Parent under(mutant-molecule.Parent, "mutant MHC protein complex") serotype-molecule Parent under(molecule.Parent, "protein complex") serotype-molecule With Serotype under(serotype.Parent, "serotype") diff --git a/src/validation/prefix.tsv b/src/validation/prefix.tsv index 9b94f44..b23ebf6 100644 --- a/src/validation/prefix.tsv +++ b/src/validation/prefix.tsv @@ -1,5 +1,5 @@ prefix base - + BFO http://purl.obolibrary.org/obo/BFO_ ECO http://purl.obolibrary.org/obo/ECO_ GO http://purl.obolibrary.org/obo/GO_ diff --git a/src/validation/rule.tsv b/src/validation/rule.tsv index 7749a01..5e7460a 100644 --- a/src/validation/rule.tsv +++ b/src/validation/rule.tsv @@ -1,9 +1,9 @@ -when table when column when condition then table then column then condition level description note -chain Parent in("protein") chain Gene under(genetic-locus.Parent, "genetic locus") ERROR -external Label not in("owl:Thing") external Source Ontology not blank ERROR -genetic-locus Parent under(genetic-locus.Parent, "MHC locus", direct=True) genetic-locus In Taxon under(external.Parent, "organism") ERROR -haplotype Parent in("MHC haplotype") haplotype In Taxon under(external.Parent, "organism") ERROR -molecule Parent not in("MHC protein complex") molecule In Taxon under(external.Parent, "organism") ERROR -mutant-molecule Parent under(mutant-molecule.Parent, "mutant MHC protein complex", direct=True) mutant-molecule In Taxon under(external.Parent, "organism") ERROR -mutant-molecule Parent not in("mutant MHC protein complex") or under(mutant-molecule.Parent, "mutant MHC protein complex", direct=True) mutant-molecule Mutant Of under(molecule.Parent, "protein complex") ERROR -serotype-molecule Parent not in("MHC protein complex") or under(serotype.Parent, "MHC serotype", direct=True) serotype-molecule In Taxon under(external.Parent, "organism") ERROR \ No newline at end of file +table when column when condition then column then condition level description +chain Parent in("protein") Gene under(genetic-locus.Parent, "genetic locus") ERROR +external Label not(in("owl:Thing")) Source Ontology not(blank) ERROR +genetic-locus Parent under(genetic-locus.Parent, "MHC locus", direct=True) In Taxon under(external.Parent, "organism") ERROR +haplotype Parent in("MHC haplotype") In Taxon under(external.Parent, "organism") ERROR +molecule Parent not(in("MHC protein complex")) In Taxon under(external.Parent, "organism") ERROR +mutant-molecule Parent under(mutant-molecule.Parent, "mutant MHC protein complex", direct=True) In Taxon under(external.Parent, "organism") ERROR +mutant-molecule Parent not(any(in("mutant MHC protein complex"), under(mutant-molecule.Parent, "mutant MHC protein complex", direct=True))) Mutant Of under(molecule.Parent, "protein complex") ERROR +serotype-molecule Parent not(any(in("MHC protein complex"), under(serotype.Parent, "MHC serotype", direct=True))) In Taxon under(external.Parent, "organism") ERROR \ No newline at end of file