diff --git a/docs/context/development/phyx.json b/docs/context/development/phyx.json index ad56db35..459277a3 100644 --- a/docs/context/development/phyx.json +++ b/docs/context/development/phyx.json @@ -4,6 +4,7 @@ "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "owl": "http://www.w3.org/2002/07/owl#", + "skos": "http://www.w3.org/2004/02/skos/core#", "obo": "http://purl.obolibrary.org/obo/", "dwc": "http://rs.tdwg.org/dwc/terms/", @@ -186,6 +187,12 @@ "title": "dct:title", - "representsTaxonomicUnits": "obo:CDAO_0000187" + "representsTaxonomicUnits": "obo:CDAO_0000187", + + "apomorphy": "testcase:apomorphy", + "exactMatch": { + "@id": "skos:exactMatch", + "@type": "@id" + } } } diff --git a/docs/context/development/schema.json b/docs/context/development/schema.json index dfdfeec5..72e5ed9b 100644 --- a/docs/context/development/schema.json +++ b/docs/context/development/schema.json @@ -1,5 +1,23 @@ { "definitions": { + "id": { + "type": "object", + "description": "Any entity that can be identified by a URI.", + "additionalProperties": false, + "properties": { + "@id": { + "type": "string", + "description": "The URI used to identify this entity.", + "minLength": 1 + }, + "@type": { + "type": "string", + "description": "The type of this entity.", + "minLength": 1 + } + }, + "required": [ "@id" ] + }, "agent": { "type": "object", "description": "A person or entity.", @@ -111,9 +129,7 @@ } }, "required": [ - "name", - "volume", - "identifier" + "name" ] }, "identifier": { @@ -164,6 +180,9 @@ "http://rs.tdwg.org/dwc/terms/Occurrence" ] }, + "rdf:ID": { + "$ref": "#/definitions/id" + }, "label": { "type": "string", "minLength": 1 @@ -201,8 +220,6 @@ }, "required": [ "@type", - "nomenclaturalCode", - "label", "nameComplete" ] } @@ -277,7 +294,7 @@ "minItems": 0, "items": { "required": [ - "cladeDefinition" + "definition" ], "properties": { "regnumId": { @@ -285,6 +302,14 @@ "description": "The identifier of this clade definition in the Regnum database", "minLength": 1 }, + "phylorefType": { + "description": "The type of this phyloreference.", + "enum": [ + "phyloref:PhyloreferenceUsingMaximumClade", + "phyloref:PhyloreferenceUsingMinimumClade", + "phyloref:PhyloreferenceUsingApomorphy" + ] + }, "label": { "type": "string", "description": "The name or label of this phyloreference." @@ -313,7 +338,10 @@ "uniqueItems": true, "minItems": 1, "items": { - "$ref": "#/definitions/taxonomic_unit" + "anyOf": [ + { "$ref": "#/definitions/taxonomic_unit" }, + { "$ref": "#/definitions/id" } + ] } }, "externalSpecifiers": { @@ -322,7 +350,10 @@ "uniqueItems": true, "minItems": 0, "items": { - "$ref": "#/definitions/taxonomic_unit" + "anyOf": [ + { "$ref": "#/definitions/taxonomic_unit" }, + { "$ref": "#/definitions/id" } + ] } } } diff --git a/src/wrappers/PhylorefWrapper.js b/src/wrappers/PhylorefWrapper.js index b6233502..09f3342f 100644 --- a/src/wrappers/PhylorefWrapper.js +++ b/src/wrappers/PhylorefWrapper.js @@ -2,6 +2,7 @@ const moment = require('moment'); const { has, cloneDeep } = require('lodash'); +const owlterms = require('../utils/owlterms'); const { TaxonomicUnitWrapper } = require('./TaxonomicUnitWrapper'); const { PhylogenyWrapper } = require('./PhylogenyWrapper'); @@ -369,10 +370,56 @@ class PhylorefWrapper { } static getIncludesRestrictionForTU(tu) { + const tunit = new TaxonomicUnitWrapper(tu).asOWLEquivClass; + + if (has(tunit, '@id')) { + // This is a reference! So we treat it differently. + const type = tunit['@type'] || ''; + if (type === 'phyloref:Phyloreference') { + // Phyloreferences need to be incorporated directly with a `some` clause. + return { + '@type': 'owl:Restriction', + onProperty: owlterms.CDAO_HAS_DESCENDANT, + someValuesFrom: tunit, + }; + } + + // If it's not a Phyloreference, we assume that it is an opaque taxonomic + // unit that has been identified with its own URI. In that case, we need + // to use the same EXCLUDES_TU property that we usually use. + } + + return { + '@type': 'owl:Restriction', + onProperty: owlterms.PHYLOREF_INCLUDES_TU, + someValuesFrom: tunit, + }; + } + + static getExcludesRestrictionForTU(tu) { + const tunit = new TaxonomicUnitWrapper(tu).asOWLEquivClass; + + if (has(tunit, '@id')) { + // This is a reference! So we treat it differently. + const type = tunit['@type'] || ''; + if (type === 'phyloref:Phyloreference') { + // Phyloreferences need to be incorporated directly with a `some` clause. + return { + '@type': 'owl:Restriction', + onProperty: owlterms.PHYLOREF_EXCLUDES_LINEAGE_TO, + someValuesFrom: tunit, + }; + } + + // If it's not a Phyloreference, we assume that it is an opaque taxonomic + // unit that has been identified with its own URI. In that case, we need + // to use the same EXCLUDES_TU property that we usually use. + } + return { '@type': 'owl:Restriction', - onProperty: 'phyloref:includes_TU', - someValuesFrom: new TaxonomicUnitWrapper(tu).asOWLEquivClass, + onProperty: owlterms.PHYLOREF_EXCLUDES_TU, + someValuesFrom: tunit, }; } @@ -387,11 +434,7 @@ class PhylorefWrapper { someValuesFrom: { '@type': 'owl:Class', intersectionOf: [ - { - '@type': 'owl:Restriction', - onProperty: 'phyloref:excludes_TU', - someValuesFrom: new TaxonomicUnitWrapper(tu1).asOWLEquivClass, - }, + PhylorefWrapper.getExcludesRestrictionForTU(tu1), PhylorefWrapper.getIncludesRestrictionForTU(tu2), ], }, @@ -530,11 +573,7 @@ class PhylorefWrapper { '@type': 'owl:Class', intersectionOf: [ includedExpr, - { - '@type': 'owl:Restriction', - onProperty: 'phyloref:excludes_TU', - someValuesFrom: new TaxonomicUnitWrapper(tu).asOWLEquivClass, - }, + PhylorefWrapper.getExcludesRestrictionForTU(tu), ], }]; @@ -549,11 +588,7 @@ class PhylorefWrapper { { '@type': 'owl:Restriction', onProperty: 'obo:CDAO_0000144', // has_Ancestor - someValuesFrom: { - '@type': 'owl:Restriction', - onProperty: 'phyloref:excludes_TU', - someValuesFrom: new TaxonomicUnitWrapper(tu).asOWLEquivClass, - }, + someValuesFrom: PhylorefWrapper.getExcludesRestrictionForTU(tu), }, ], }); @@ -664,12 +699,31 @@ class PhylorefWrapper { const internalSpecifiers = phylorefAsJSONLD.internalSpecifiers || []; const externalSpecifiers = phylorefAsJSONLD.externalSpecifiers || []; + // If it is an apomorphy-based class expression, we can't generate logical + // expressions for it anyway. + const phylorefType = phylorefAsJSONLD.phylorefType; + if ( + (phylorefType && phylorefType === 'phyloref:PhyloreferenceUsingApomorphy') + || (has(phylorefAsJSONLD, 'apomorphy')) + ) { + // This is an apomorphy-based definition! + phylorefAsJSONLD.subClassOf = [ + 'phyloref:Phyloreference', + 'phyloref:PhyloreferenceUsingApomorphy', + ]; + + return phylorefAsJSONLD; + } + // We might need to make component classes. // So we reset our component class counts and records. PhylorefWrapper.componentClassCount = 0; PhylorefWrapper.componentClassesByLabel = {}; phylorefAsJSONLD.hasComponentClass = []; + // The type of this phyloreference. + let calculatedPhylorefType; + // The list of logical expressions generated for this phyloref. let logicalExpressions = []; @@ -677,6 +731,8 @@ class PhylorefWrapper { // We can't handle phyloreferences without at least one internal specifier. phylorefAsJSONLD.malformedPhyloreference = 'No internal specifiers provided'; } else if (externalSpecifiers.length > 0) { + calculatedPhylorefType = 'phyloref:PhyloreferenceUsingMaximumClade'; + // If the phyloreference has at least one external specifier, we // can provide a simplified expression for the internal specifier, // in the form: @@ -701,6 +757,8 @@ class PhylorefWrapper { ); } } else { + calculatedPhylorefType = 'phyloref:PhyloreferenceUsingMinimumClade'; + // We only have internal specifiers. We therefore need to use the algorithm in // PhylorefWrapper.createClassExpressionsForInternals() to create this expression. logicalExpressions = PhylorefWrapper.createClassExpressionsForInternals( @@ -762,6 +820,15 @@ class PhylorefWrapper { } phylorefAsJSONLD.subClassOf.push('phyloref:Phyloreference'); + // If the this Phyloref has a phylorefType that differs from the calculated + // phyloref type, throw an error. + if (has(phylorefAsJSONLD, 'phylorefType') && phylorefAsJSONLD.phylorefType !== calculatedPhylorefType) { + throw new Error( + `Phyloref ${this.label} has phylorefType set to '${phylorefAsJSONLD.phylorefType}', but it appears to be a '${calculatedPhylorefType}'.` + ); + } + phylorefAsJSONLD.subClassOf.push(calculatedPhylorefType); + return phylorefAsJSONLD; } } diff --git a/src/wrappers/TaxonomicUnitWrapper.js b/src/wrappers/TaxonomicUnitWrapper.js index 3c9566b0..bc64c097 100644 --- a/src/wrappers/TaxonomicUnitWrapper.js +++ b/src/wrappers/TaxonomicUnitWrapper.js @@ -235,6 +235,10 @@ class TaxonomicUnitWrapper { return new SpecimenWrapper(this.specimen).asOWLEquivClass; } + // Is this just a reference (i.e. { "@id": })? If so, return that + // unchanged. + if (has(this.tunit, '@id')) return this.tunit; + // Nothing we can do, so just ignore it. return undefined; } diff --git a/test/examples.js b/test/examples.js index 837319ac..bd114d08 100644 --- a/test/examples.js +++ b/test/examples.js @@ -5,7 +5,7 @@ const fs = require('fs'); const path = require('path'); -const jsonld = require('jsonld'); +const JSONLD = require('jsonld'); const chai = require('chai'); const Ajv = require('ajv'); @@ -26,84 +26,83 @@ const REPLACE_EXISTING = false; */ describe('PhyxWrapper', function () { - let brochu2003owl; - describe('convert brochu_2003.json to an OWL ontology', function () { - const jsonFilename = path.resolve(__dirname, './examples/correct/brochu_2003.json'); - const jsonldFilename = path.resolve(__dirname, './examples/correct/brochu_2003.jsonld'); + const ajv = new Ajv({ + allErrors: true, // Display all error messages, not just the first. + }); + const validator = ajv.compile( + JSON.parse( + fs.readFileSync( + path.resolve(__dirname, '../docs/context/development/schema.json') + ) + ) + ); - let brochu2003; + describe('Test all example Phyx files', function () { + const examples = fs.readdirSync(path.resolve(__dirname, './examples/correct')) + .filter(filename => filename.endsWith('.json')); + + examples.forEach((example) => { + const basename = path.resolve(__dirname, './examples/correct', path.parse(example).name); + const jsonFilename = `${basename}.json`; + const jsonldFilename = `${basename}.jsonld`; + const nqFilename = `${basename}.nq`; + + let json; + let jsonld; + let nq; + + describe(`Test file '${example}'`, function () { + it('should be loadable', function () { + json = JSON.parse(fs.readFileSync(jsonFilename)); + expect(json).to.be.an('object'); + }); - it('should be able to load brochu_2003.json', function () { - brochu2003 = JSON.parse(fs.readFileSync(jsonFilename)); - expect(brochu2003).to.be.an('object'); - }); + it('should validate against our JSON schema', function () { + const valid = validator(json); + expect( + validator.errors, + `The following validation errors were generated: ${JSON.stringify(validator.errors, null, 2)}` + ).to.be.null; + expect(valid).to.be.true; + }); - it('should be able to convert brochu_2003.json to an OWL Ontology', function () { - this.timeout(10000); - brochu2003owl = new phyx.PhyxWrapper(brochu2003).asOWLOntology('http://example.org/brochu_2003.json#'); - if (REPLACE_EXISTING) { - fs.writeFileSync( - jsonldFilename, - JSON.stringify(brochu2003owl, null, 2) - ); - } - expect(brochu2003owl).to.be.an('object'); - }); + it('should be able to convertible to an OWL Ontology', function () { + this.timeout(10000); + jsonld = new phyx.PhyxWrapper(json) + .asOWLOntology('http://example.org/phyx.js/example#'); + if (REPLACE_EXISTING) { + fs.writeFileSync( + jsonldFilename, + JSON.stringify(jsonld, null, 2) + ); + } + expect(jsonld).to.be.an('object'); + }); - it('should generate the same OWL ontology as it generated earlier', function () { - const expectedBrochu2003 = JSON.parse(fs.readFileSync(jsonldFilename)); - expect(brochu2003owl).to.be.deep.equal(expectedBrochu2003); - }); - }); - describe('convert brochu_2003.jsonld to n-quads', function () { - const nqFilename = path.resolve(__dirname, './examples/correct/brochu_2003.nq'); - - let brochu2003nq; - it('should be able to convert brochu_2003.json via JSON-LD to n-quads', function () { - this.timeout(10000); - - // JSON-LD readers don't usually handle relative @context easily, so - // instead let's replace the entire @context with the local context file. - brochu2003owl['@context'] = JSON.parse(fs.readFileSync( - path.resolve(__dirname, path.join('examples', 'correct', brochu2003owl['@context'])) - )); - - return jsonld.toRDF(brochu2003owl, { format: 'application/n-quads' }).then((rdf) => { - brochu2003nq = rdf; - if (REPLACE_EXISTING) fs.writeFileSync(nqFilename, brochu2003nq); - expect(brochu2003nq).to.be.a('string'); - }); - }); + it('should generate the same OWL ontology as it generated earlier', function () { + const expectedJSONLD = JSON.parse(fs.readFileSync(jsonldFilename)); + expect(jsonld).to.deep.equal(expectedJSONLD); + }); - it('should generate the same n-quads ontology as it generated earlier', function () { - const expectedBrochu2003nq = fs.readFileSync(nqFilename).toString(); - expect(brochu2003nq).to.be.deep.equal(expectedBrochu2003nq); - }); - }); + it('should be convertible to n-quads', function () { + this.timeout(10000); - describe('Test all example Phyx files', function () { - const examples = fs.readdirSync(path.resolve(__dirname, './examples')); - const jsonlds = examples.filter(filename => filename.toLowerCase().endsWith('.json')); - const ajv = new Ajv(); - const validator = ajv.compile( - JSON.parse( - fs.readFileSync( - path.resolve(__dirname, '../docs/context/development/schema.json') - ) - ) - ); + // JSON-LD readers don't usually handle relative @context easily, so + // instead let's replace the entire @context with the local context file. + jsonld['@context'] = JSON.parse(fs.readFileSync( + path.resolve(__dirname, 'examples', 'correct', jsonld['@context']) + )); - jsonlds.forEach((filename) => { - describe(`Example file ${filename}`, function () { - it('should validate against our JSON schema', function () { - const phyxContent = JSON.parse( - fs.readFileSync( - path.resolve(__dirname, `./examples/correct/${filename}`) - ) - ); - const valid = validator(phyxContent); - expect(validator.errors).to.be.null; - expect(valid).to.be.true; + return JSONLD.toRDF(jsonld, { format: 'application/n-quads' }).then((rdf) => { + nq = rdf; + if (REPLACE_EXISTING) fs.writeFileSync(nqFilename, nq); + expect(nq).to.be.a('string'); + }); + }); + + it('should generate the same n-quads ontology as it generated earlier', function () { + const expectedNQ = fs.readFileSync(nqFilename).toString(); + expect(nq).to.deep.equal(expectedNQ); }); }); }); diff --git a/test/examples/correct/brochu_2003.json b/test/examples/correct/brochu_2003.json index 1396e289..a2862cb4 100644 --- a/test/examples/correct/brochu_2003.json +++ b/test/examples/correct/brochu_2003.json @@ -10,7 +10,8 @@ "phylorefs": [ { "label": "Alligatoridae", - "cladeDefinition": "Alligatoridae (Cuvier 1807).\n\nLast common ancestor of Alligator mississippiensis and Caiman crocodilus and all of its descendents.", + "phylorefType": "phyloref:PhyloreferenceUsingMinimumClade", + "definition": "Alligatoridae (Cuvier 1807).\n\nLast common ancestor of Alligator mississippiensis and Caiman crocodilus and all of its descendents.", "definitionSource": { "type": "article", "title": "Phylogenetic approaches toward crocodylian history", @@ -86,7 +87,8 @@ }, { "label": "Alligatorinae", - "cladeDefinition": "Alligatorinae (Kälin 1940).\n\nAlligator mississippiensis and all crocodylians closer to it than to Caiman crocodilus.", + "phylorefType": "phyloref:PhyloreferenceUsingMaximumClade", + "definition": "Alligatorinae (Kälin 1940).\n\nAlligator mississippiensis and all crocodylians closer to it than to Caiman crocodilus.", "definitionSource": { "type": "article", "title": "Phylogenetic approaches toward crocodylian history", @@ -168,7 +170,8 @@ }, { "label": "Caimaninae", - "cladeDefinition": "Caimaninae (Norell 1988).\n\nCaiman crocodilus and all crocodylians closer to it than to Alligator mississippiensis.", + "phylorefType": "phyloref:PhyloreferenceUsingMaximumClade", + "definition": "Caimaninae (Norell 1988).\n\nCaiman crocodilus and all crocodylians closer to it than to Alligator mississippiensis.", "definitionSource": { "type": "article", "title": "Phylogenetic approaches toward crocodylian history", @@ -249,7 +252,8 @@ }, { "label": "Crocodyloidea", - "cladeDefinition": "Crocodyloidea (Fitzinger 1826).\n\nCrocodylus niloticus and all crocodylians closer to it than to Alligator mississippiensis or Gavialis gangeticus.", + "phylorefType": "phyloref:PhyloreferenceUsingMaximumClade", + "definition": "Crocodyloidea (Fitzinger 1826).\n\nCrocodylus niloticus and all crocodylians closer to it than to Alligator mississippiensis or Gavialis gangeticus.", "internalSpecifiers": [ { "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", @@ -308,7 +312,8 @@ }, { "label": "Crocodylidae", - "cladeDefinition": "Crocodylidae (Cuvier 1807). Definition dependent on phylogenetic context.\n\nLast common ancestor of Crocodylus niloticus, Osteolaemus tetraspis, and Tomistoma schlegelii and all of its descendents.", + "phylorefType": "phyloref:PhyloreferenceUsingMinimumClade", + "definition": "Crocodylidae (Cuvier 1807). Definition dependent on phylogenetic context.\n\nLast common ancestor of Crocodylus niloticus, Osteolaemus tetraspis, and Tomistoma schlegelii and all of its descendents.", "definitionSource": { "type": "article", "title": "Phylogenetic approaches toward crocodylian history", @@ -396,7 +401,8 @@ }, { "label": "Diplocynodontinae", - "cladeDefinition": "Diplocynodontinae (Brochu 1999).\n\nDiplocynodon ratelii and all crocodylians closer to it than to Alligator mississippiensis.", + "phylorefType": "phyloref:PhyloreferenceUsingMaximumClade", + "definition": "Diplocynodontinae (Brochu 1999).\n\nDiplocynodon ratelii and all crocodylians closer to it than to Alligator mississippiensis.", "definitionSource": { "type": "article", "title": "Phylogenetic approaches toward crocodylian history", diff --git a/test/examples/correct/brochu_2003.jsonld b/test/examples/correct/brochu_2003.jsonld index 12029625..7714b192 100644 --- a/test/examples/correct/brochu_2003.jsonld +++ b/test/examples/correct/brochu_2003.jsonld @@ -4,11 +4,11 @@ { "newick": "(Parasuchia,(rauisuchians,Aetosauria,(sphenosuchians,(protosuchians,(mesosuchians,(Hylaeochampsa,Aegyptosuchus,Stomatosuchus,(Allodaposuchus,('Gavialis gangeticus',(('Diplocynodon ratelii',('Alligator mississippiensis','Caiman crocodilus')Alligatoridae)Alligatoroidea,('Tomistoma schlegelii',('Osteolaemus tetraspis','Crocodylus niloticus')Crocodylinae)Crocodylidae)Brevirostres)Crocodylia))Eusuchia)Mesoeucrocodylia)Crocodyliformes)Crocodylomorpha))root;", "label": "Fig 1 from Brochu 2003", - "@id": "http://example.org/brochu_2003.json#phylogeny0", + "@id": "http://example.org/phyx.js/example#phylogeny0", "@type": "testcase:PhyloreferenceTestPhylogeny", "nodes": [ { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node0", + "@id": "http://example.org/phyx.js/example#phylogeny0_node0", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -19,29 +19,29 @@ ], "representsTaxonomicUnits": [], "children": [ - "http://example.org/brochu_2003.json#phylogeny0_node1", - "http://example.org/brochu_2003.json#phylogeny0_node29" + "http://example.org/phyx.js/example#phylogeny0_node1", + "http://example.org/phyx.js/example#phylogeny0_node29" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node1", + "@id": "http://example.org/phyx.js/example#phylogeny0_node1", "rdf:type": [ { "@id": "obo:CDAO_0000140" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node0", + "parent": "http://example.org/phyx.js/example#phylogeny0_node0", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node29" + "http://example.org/phyx.js/example#phylogeny0_node29" ], "children": [ - "http://example.org/brochu_2003.json#phylogeny0_node2", - "http://example.org/brochu_2003.json#phylogeny0_node27", - "http://example.org/brochu_2003.json#phylogeny0_node28" + "http://example.org/phyx.js/example#phylogeny0_node2", + "http://example.org/phyx.js/example#phylogeny0_node27", + "http://example.org/phyx.js/example#phylogeny0_node28" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node2", + "@id": "http://example.org/phyx.js/example#phylogeny0_node2", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -76,18 +76,18 @@ "label": "Crocodylomorpha" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node1", + "parent": "http://example.org/phyx.js/example#phylogeny0_node1", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node27", - "http://example.org/brochu_2003.json#phylogeny0_node28" + "http://example.org/phyx.js/example#phylogeny0_node27", + "http://example.org/phyx.js/example#phylogeny0_node28" ], "children": [ - "http://example.org/brochu_2003.json#phylogeny0_node3", - "http://example.org/brochu_2003.json#phylogeny0_node26" + "http://example.org/phyx.js/example#phylogeny0_node3", + "http://example.org/phyx.js/example#phylogeny0_node26" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node3", + "@id": "http://example.org/phyx.js/example#phylogeny0_node3", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -122,17 +122,17 @@ "label": "Crocodyliformes" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node2", + "parent": "http://example.org/phyx.js/example#phylogeny0_node2", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node26" + "http://example.org/phyx.js/example#phylogeny0_node26" ], "children": [ - "http://example.org/brochu_2003.json#phylogeny0_node4", - "http://example.org/brochu_2003.json#phylogeny0_node25" + "http://example.org/phyx.js/example#phylogeny0_node4", + "http://example.org/phyx.js/example#phylogeny0_node25" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node4", + "@id": "http://example.org/phyx.js/example#phylogeny0_node4", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -167,17 +167,17 @@ "label": "Mesoeucrocodylia" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node3", + "parent": "http://example.org/phyx.js/example#phylogeny0_node3", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node25" + "http://example.org/phyx.js/example#phylogeny0_node25" ], "children": [ - "http://example.org/brochu_2003.json#phylogeny0_node5", - "http://example.org/brochu_2003.json#phylogeny0_node24" + "http://example.org/phyx.js/example#phylogeny0_node5", + "http://example.org/phyx.js/example#phylogeny0_node24" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node5", + "@id": "http://example.org/phyx.js/example#phylogeny0_node5", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -212,37 +212,37 @@ "label": "Eusuchia" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node4", + "parent": "http://example.org/phyx.js/example#phylogeny0_node4", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node24" + "http://example.org/phyx.js/example#phylogeny0_node24" ], "children": [ - "http://example.org/brochu_2003.json#phylogeny0_node6", - "http://example.org/brochu_2003.json#phylogeny0_node21", - "http://example.org/brochu_2003.json#phylogeny0_node22", - "http://example.org/brochu_2003.json#phylogeny0_node23" + "http://example.org/phyx.js/example#phylogeny0_node6", + "http://example.org/phyx.js/example#phylogeny0_node21", + "http://example.org/phyx.js/example#phylogeny0_node22", + "http://example.org/phyx.js/example#phylogeny0_node23" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node6", + "@id": "http://example.org/phyx.js/example#phylogeny0_node6", "rdf:type": [ { "@id": "obo:CDAO_0000140" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node5", + "parent": "http://example.org/phyx.js/example#phylogeny0_node5", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node21", - "http://example.org/brochu_2003.json#phylogeny0_node22", - "http://example.org/brochu_2003.json#phylogeny0_node23" + "http://example.org/phyx.js/example#phylogeny0_node21", + "http://example.org/phyx.js/example#phylogeny0_node22", + "http://example.org/phyx.js/example#phylogeny0_node23" ], "children": [ - "http://example.org/brochu_2003.json#phylogeny0_node7", - "http://example.org/brochu_2003.json#phylogeny0_node20" + "http://example.org/phyx.js/example#phylogeny0_node7", + "http://example.org/phyx.js/example#phylogeny0_node20" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node7", + "@id": "http://example.org/phyx.js/example#phylogeny0_node7", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -277,17 +277,17 @@ "label": "Crocodylia" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node6", + "parent": "http://example.org/phyx.js/example#phylogeny0_node6", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node20" + "http://example.org/phyx.js/example#phylogeny0_node20" ], "children": [ - "http://example.org/brochu_2003.json#phylogeny0_node8", - "http://example.org/brochu_2003.json#phylogeny0_node19" + "http://example.org/phyx.js/example#phylogeny0_node8", + "http://example.org/phyx.js/example#phylogeny0_node19" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node8", + "@id": "http://example.org/phyx.js/example#phylogeny0_node8", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -322,17 +322,17 @@ "label": "Brevirostres" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node7", + "parent": "http://example.org/phyx.js/example#phylogeny0_node7", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node19" + "http://example.org/phyx.js/example#phylogeny0_node19" ], "children": [ - "http://example.org/brochu_2003.json#phylogeny0_node9", - "http://example.org/brochu_2003.json#phylogeny0_node14" + "http://example.org/phyx.js/example#phylogeny0_node9", + "http://example.org/phyx.js/example#phylogeny0_node14" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node9", + "@id": "http://example.org/phyx.js/example#phylogeny0_node9", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -363,7 +363,7 @@ "@type": "owl:Restriction", "onProperty": "obo:OBI_0000293", "someValuesFrom": { - "@id": "http://example.org/brochu_2003.json#phyloref3" + "@id": "http://example.org/phyx.js/example#phyloref3" } } ] @@ -382,7 +382,7 @@ "@type": "owl:Restriction", "onProperty": "obo:OBI_0000293", "someValuesFrom": { - "@id": "http://example.org/brochu_2003.json#phyloref4" + "@id": "http://example.org/phyx.js/example#phyloref4" } } ] @@ -405,17 +405,17 @@ "label": "Crocodylidae" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node8", + "parent": "http://example.org/phyx.js/example#phylogeny0_node8", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node14" + "http://example.org/phyx.js/example#phylogeny0_node14" ], "children": [ - "http://example.org/brochu_2003.json#phylogeny0_node10", - "http://example.org/brochu_2003.json#phylogeny0_node13" + "http://example.org/phyx.js/example#phylogeny0_node10", + "http://example.org/phyx.js/example#phylogeny0_node13" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node10", + "@id": "http://example.org/phyx.js/example#phylogeny0_node10", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -450,17 +450,17 @@ "label": "Crocodylinae" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node9", + "parent": "http://example.org/phyx.js/example#phylogeny0_node9", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node13" + "http://example.org/phyx.js/example#phylogeny0_node13" ], "children": [ - "http://example.org/brochu_2003.json#phylogeny0_node11", - "http://example.org/brochu_2003.json#phylogeny0_node12" + "http://example.org/phyx.js/example#phylogeny0_node11", + "http://example.org/phyx.js/example#phylogeny0_node12" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node11", + "@id": "http://example.org/phyx.js/example#phylogeny0_node11", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -496,13 +496,13 @@ "label": "Crocodylus niloticus" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node10", + "parent": "http://example.org/phyx.js/example#phylogeny0_node10", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node12" + "http://example.org/phyx.js/example#phylogeny0_node12" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node12", + "@id": "http://example.org/phyx.js/example#phylogeny0_node12", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -538,13 +538,13 @@ "label": "Osteolaemus tetraspis" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node10", + "parent": "http://example.org/phyx.js/example#phylogeny0_node10", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node11" + "http://example.org/phyx.js/example#phylogeny0_node11" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node13", + "@id": "http://example.org/phyx.js/example#phylogeny0_node13", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -580,13 +580,13 @@ "label": "Tomistoma schlegelii" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node9", + "parent": "http://example.org/phyx.js/example#phylogeny0_node9", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node10" + "http://example.org/phyx.js/example#phylogeny0_node10" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node14", + "@id": "http://example.org/phyx.js/example#phylogeny0_node14", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -621,17 +621,17 @@ "label": "Alligatoroidea" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node8", + "parent": "http://example.org/phyx.js/example#phylogeny0_node8", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node9" + "http://example.org/phyx.js/example#phylogeny0_node9" ], "children": [ - "http://example.org/brochu_2003.json#phylogeny0_node15", - "http://example.org/brochu_2003.json#phylogeny0_node18" + "http://example.org/phyx.js/example#phylogeny0_node15", + "http://example.org/phyx.js/example#phylogeny0_node18" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node15", + "@id": "http://example.org/phyx.js/example#phylogeny0_node15", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -662,7 +662,7 @@ "@type": "owl:Restriction", "onProperty": "obo:OBI_0000293", "someValuesFrom": { - "@id": "http://example.org/brochu_2003.json#phyloref0" + "@id": "http://example.org/phyx.js/example#phyloref0" } } ] @@ -685,17 +685,17 @@ "label": "Alligatoridae" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node14", + "parent": "http://example.org/phyx.js/example#phylogeny0_node14", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node18" + "http://example.org/phyx.js/example#phylogeny0_node18" ], "children": [ - "http://example.org/brochu_2003.json#phylogeny0_node16", - "http://example.org/brochu_2003.json#phylogeny0_node17" + "http://example.org/phyx.js/example#phylogeny0_node16", + "http://example.org/phyx.js/example#phylogeny0_node17" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node16", + "@id": "http://example.org/phyx.js/example#phylogeny0_node16", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -726,7 +726,7 @@ "@type": "owl:Restriction", "onProperty": "obo:OBI_0000293", "someValuesFrom": { - "@id": "http://example.org/brochu_2003.json#phyloref2" + "@id": "http://example.org/phyx.js/example#phyloref2" } } ] @@ -750,13 +750,13 @@ "label": "Caiman crocodilus" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node15", + "parent": "http://example.org/phyx.js/example#phylogeny0_node15", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node17" + "http://example.org/phyx.js/example#phylogeny0_node17" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node17", + "@id": "http://example.org/phyx.js/example#phylogeny0_node17", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -787,7 +787,7 @@ "@type": "owl:Restriction", "onProperty": "obo:OBI_0000293", "someValuesFrom": { - "@id": "http://example.org/brochu_2003.json#phyloref1" + "@id": "http://example.org/phyx.js/example#phyloref1" } } ] @@ -811,13 +811,13 @@ "label": "Alligator mississippiensis" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node15", + "parent": "http://example.org/phyx.js/example#phylogeny0_node15", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node16" + "http://example.org/phyx.js/example#phylogeny0_node16" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node18", + "@id": "http://example.org/phyx.js/example#phylogeny0_node18", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -848,7 +848,7 @@ "@type": "owl:Restriction", "onProperty": "obo:OBI_0000293", "someValuesFrom": { - "@id": "http://example.org/brochu_2003.json#phyloref5" + "@id": "http://example.org/phyx.js/example#phyloref5" } } ] @@ -872,13 +872,13 @@ "label": "Diplocynodon ratelii" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node14", + "parent": "http://example.org/phyx.js/example#phylogeny0_node14", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node15" + "http://example.org/phyx.js/example#phylogeny0_node15" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node19", + "@id": "http://example.org/phyx.js/example#phylogeny0_node19", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -914,13 +914,13 @@ "label": "Gavialis gangeticus" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node7", + "parent": "http://example.org/phyx.js/example#phylogeny0_node7", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node8" + "http://example.org/phyx.js/example#phylogeny0_node8" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node20", + "@id": "http://example.org/phyx.js/example#phylogeny0_node20", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -955,13 +955,13 @@ "label": "Allodaposuchus" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node6", + "parent": "http://example.org/phyx.js/example#phylogeny0_node6", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node7" + "http://example.org/phyx.js/example#phylogeny0_node7" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node21", + "@id": "http://example.org/phyx.js/example#phylogeny0_node21", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -996,15 +996,15 @@ "label": "Stomatosuchus" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node5", + "parent": "http://example.org/phyx.js/example#phylogeny0_node5", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node6", - "http://example.org/brochu_2003.json#phylogeny0_node22", - "http://example.org/brochu_2003.json#phylogeny0_node23" + "http://example.org/phyx.js/example#phylogeny0_node6", + "http://example.org/phyx.js/example#phylogeny0_node22", + "http://example.org/phyx.js/example#phylogeny0_node23" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node22", + "@id": "http://example.org/phyx.js/example#phylogeny0_node22", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -1039,15 +1039,15 @@ "label": "Aegyptosuchus" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node5", + "parent": "http://example.org/phyx.js/example#phylogeny0_node5", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node6", - "http://example.org/brochu_2003.json#phylogeny0_node21", - "http://example.org/brochu_2003.json#phylogeny0_node23" + "http://example.org/phyx.js/example#phylogeny0_node6", + "http://example.org/phyx.js/example#phylogeny0_node21", + "http://example.org/phyx.js/example#phylogeny0_node23" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node23", + "@id": "http://example.org/phyx.js/example#phylogeny0_node23", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -1082,15 +1082,15 @@ "label": "Hylaeochampsa" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node5", + "parent": "http://example.org/phyx.js/example#phylogeny0_node5", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node6", - "http://example.org/brochu_2003.json#phylogeny0_node21", - "http://example.org/brochu_2003.json#phylogeny0_node22" + "http://example.org/phyx.js/example#phylogeny0_node6", + "http://example.org/phyx.js/example#phylogeny0_node21", + "http://example.org/phyx.js/example#phylogeny0_node22" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node24", + "@id": "http://example.org/phyx.js/example#phylogeny0_node24", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -1100,13 +1100,13 @@ "mesosuchians" ], "representsTaxonomicUnits": [], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node4", + "parent": "http://example.org/phyx.js/example#phylogeny0_node4", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node5" + "http://example.org/phyx.js/example#phylogeny0_node5" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node25", + "@id": "http://example.org/phyx.js/example#phylogeny0_node25", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -1116,13 +1116,13 @@ "protosuchians" ], "representsTaxonomicUnits": [], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node3", + "parent": "http://example.org/phyx.js/example#phylogeny0_node3", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node4" + "http://example.org/phyx.js/example#phylogeny0_node4" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node26", + "@id": "http://example.org/phyx.js/example#phylogeny0_node26", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -1132,13 +1132,13 @@ "sphenosuchians" ], "representsTaxonomicUnits": [], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node2", + "parent": "http://example.org/phyx.js/example#phylogeny0_node2", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node3" + "http://example.org/phyx.js/example#phylogeny0_node3" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node27", + "@id": "http://example.org/phyx.js/example#phylogeny0_node27", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -1173,14 +1173,14 @@ "label": "Aetosauria" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node1", + "parent": "http://example.org/phyx.js/example#phylogeny0_node1", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node2", - "http://example.org/brochu_2003.json#phylogeny0_node28" + "http://example.org/phyx.js/example#phylogeny0_node2", + "http://example.org/phyx.js/example#phylogeny0_node28" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node28", + "@id": "http://example.org/phyx.js/example#phylogeny0_node28", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -1190,14 +1190,14 @@ "rauisuchians" ], "representsTaxonomicUnits": [], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node1", + "parent": "http://example.org/phyx.js/example#phylogeny0_node1", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node2", - "http://example.org/brochu_2003.json#phylogeny0_node27" + "http://example.org/phyx.js/example#phylogeny0_node2", + "http://example.org/phyx.js/example#phylogeny0_node27" ] }, { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node29", + "@id": "http://example.org/phyx.js/example#phylogeny0_node29", "rdf:type": [ { "@id": "obo:CDAO_0000140" @@ -1232,21 +1232,22 @@ "label": "Parasuchia" } ], - "parent": "http://example.org/brochu_2003.json#phylogeny0_node0", + "parent": "http://example.org/phyx.js/example#phylogeny0_node0", "siblings": [ - "http://example.org/brochu_2003.json#phylogeny0_node1" + "http://example.org/phyx.js/example#phylogeny0_node1" ] } ], "hasRootNode": { - "@id": "http://example.org/brochu_2003.json#phylogeny0_node0" + "@id": "http://example.org/phyx.js/example#phylogeny0_node0" } } ], "phylorefs": [ { "label": "Alligatoridae", - "cladeDefinition": "Alligatoridae (Cuvier 1807).\n\nLast common ancestor of Alligator mississippiensis and Caiman crocodilus and all of its descendents.", + "phylorefType": "phyloref:PhyloreferenceUsingMinimumClade", + "definition": "Alligatoridae (Cuvier 1807).\n\nLast common ancestor of Alligator mississippiensis and Caiman crocodilus and all of its descendents.", "definitionSource": { "type": "article", "title": "Phylogenetic approaches toward crocodylian history", @@ -1323,7 +1324,7 @@ } } ], - "@id": "http://example.org/brochu_2003.json#phyloref0", + "@id": "http://example.org/phyx.js/example#phyloref0", "@type": "owl:Class", "hasComponentClass": [], "equivalentClass": { @@ -1362,12 +1363,14 @@ } }, "subClassOf": [ - "phyloref:Phyloreference" + "phyloref:Phyloreference", + "phyloref:PhyloreferenceUsingMinimumClade" ] }, { "label": "Alligatorinae", - "cladeDefinition": "Alligatorinae (Kälin 1940).\n\nAlligator mississippiensis and all crocodylians closer to it than to Caiman crocodilus.", + "phylorefType": "phyloref:PhyloreferenceUsingMaximumClade", + "definition": "Alligatorinae (Kälin 1940).\n\nAlligator mississippiensis and all crocodylians closer to it than to Caiman crocodilus.", "definitionSource": { "type": "article", "title": "Phylogenetic approaches toward crocodylian history", @@ -1450,7 +1453,7 @@ "nodeLabel": "Alligator mississippiensis" } }, - "@id": "http://example.org/brochu_2003.json#phyloref1", + "@id": "http://example.org/phyx.js/example#phyloref1", "@type": "owl:Class", "hasComponentClass": [], "equivalentClass": { @@ -1485,12 +1488,14 @@ ] }, "subClassOf": [ - "phyloref:Phyloreference" + "phyloref:Phyloreference", + "phyloref:PhyloreferenceUsingMaximumClade" ] }, { "label": "Caimaninae", - "cladeDefinition": "Caimaninae (Norell 1988).\n\nCaiman crocodilus and all crocodylians closer to it than to Alligator mississippiensis.", + "phylorefType": "phyloref:PhyloreferenceUsingMaximumClade", + "definition": "Caimaninae (Norell 1988).\n\nCaiman crocodilus and all crocodylians closer to it than to Alligator mississippiensis.", "definitionSource": { "type": "article", "title": "Phylogenetic approaches toward crocodylian history", @@ -1572,7 +1577,7 @@ "nodeLabel": "Caiman crocodilus" } }, - "@id": "http://example.org/brochu_2003.json#phyloref2", + "@id": "http://example.org/phyx.js/example#phyloref2", "@type": "owl:Class", "hasComponentClass": [], "equivalentClass": { @@ -1607,12 +1612,14 @@ ] }, "subClassOf": [ - "phyloref:Phyloreference" + "phyloref:Phyloreference", + "phyloref:PhyloreferenceUsingMaximumClade" ] }, { "label": "Crocodyloidea", - "cladeDefinition": "Crocodyloidea (Fitzinger 1826).\n\nCrocodylus niloticus and all crocodylians closer to it than to Alligator mississippiensis or Gavialis gangeticus.", + "phylorefType": "phyloref:PhyloreferenceUsingMaximumClade", + "definition": "Crocodyloidea (Fitzinger 1826).\n\nCrocodylus niloticus and all crocodylians closer to it than to Alligator mississippiensis or Gavialis gangeticus.", "internalSpecifiers": [ { "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", @@ -1668,11 +1675,11 @@ "nodeLabel": "Crocodylidae" } }, - "@id": "http://example.org/brochu_2003.json#phyloref3", + "@id": "http://example.org/phyx.js/example#phyloref3", "@type": "owl:Class", "hasComponentClass": [ { - "@id": "http://example.org/brochu_2003.json#phyloref3_component1", + "@id": "http://example.org/phyx.js/example#phyloref3_component1", "@type": "owl:Class", "label": "(Crocodylus niloticus ~ Alligator mississippiensis)", "equivalentClass": [ @@ -1713,7 +1720,7 @@ ] }, { - "@id": "http://example.org/brochu_2003.json#phyloref3_component2", + "@id": "http://example.org/phyx.js/example#phyloref3_component2", "@type": "owl:Class", "label": "(Crocodylus niloticus ~ Gavialis gangeticus)", "equivalentClass": [ @@ -1754,14 +1761,14 @@ ] }, { - "@id": "http://example.org/brochu_2003.json#phyloref3_component3", + "@id": "http://example.org/phyx.js/example#phyloref3_component3", "@type": "owl:Class", "label": "(Crocodylus niloticus ~ Alligator mississippiensis V Gavialis gangeticus)", "equivalentClass": { "@type": "owl:Class", "intersectionOf": [ { - "@id": "http://example.org/brochu_2003.json#phyloref3_component1" + "@id": "http://example.org/phyx.js/example#phyloref3_component1" }, { "@type": "owl:Restriction", @@ -1781,19 +1788,19 @@ "subClassOf": [ "phyloref:PhyloreferenceUsingMaximumClade", { - "@id": "http://example.org/brochu_2003.json#phyloref3" + "@id": "http://example.org/phyx.js/example#phyloref3" } ] }, { - "@id": "http://example.org/brochu_2003.json#phyloref3_component4", + "@id": "http://example.org/phyx.js/example#phyloref3_component4", "@type": "owl:Class", "label": "(Crocodylus niloticus ~ Alligator mississippiensis V Gavialis gangeticus)", "equivalentClass": { "@type": "owl:Class", "intersectionOf": [ { - "@id": "http://example.org/brochu_2003.json#phyloref3_component1" + "@id": "http://example.org/phyx.js/example#phyloref3_component1" }, { "@type": "owl:Restriction", @@ -1817,19 +1824,19 @@ "subClassOf": [ "phyloref:PhyloreferenceUsingMaximumClade", { - "@id": "http://example.org/brochu_2003.json#phyloref3" + "@id": "http://example.org/phyx.js/example#phyloref3" } ] }, { - "@id": "http://example.org/brochu_2003.json#phyloref3_component5", + "@id": "http://example.org/phyx.js/example#phyloref3_component5", "@type": "owl:Class", "label": "(Crocodylus niloticus ~ Alligator mississippiensis V Gavialis gangeticus)", "equivalentClass": { "@type": "owl:Class", "intersectionOf": [ { - "@id": "http://example.org/brochu_2003.json#phyloref3_component2" + "@id": "http://example.org/phyx.js/example#phyloref3_component2" }, { "@type": "owl:Restriction", @@ -1849,19 +1856,19 @@ "subClassOf": [ "phyloref:PhyloreferenceUsingMaximumClade", { - "@id": "http://example.org/brochu_2003.json#phyloref3" + "@id": "http://example.org/phyx.js/example#phyloref3" } ] }, { - "@id": "http://example.org/brochu_2003.json#phyloref3_component6", + "@id": "http://example.org/phyx.js/example#phyloref3_component6", "@type": "owl:Class", "label": "(Crocodylus niloticus ~ Alligator mississippiensis V Gavialis gangeticus)", "equivalentClass": { "@type": "owl:Class", "intersectionOf": [ { - "@id": "http://example.org/brochu_2003.json#phyloref3_component2" + "@id": "http://example.org/phyx.js/example#phyloref3_component2" }, { "@type": "owl:Restriction", @@ -1885,18 +1892,20 @@ "subClassOf": [ "phyloref:PhyloreferenceUsingMaximumClade", { - "@id": "http://example.org/brochu_2003.json#phyloref3" + "@id": "http://example.org/phyx.js/example#phyloref3" } ] } ], "subClassOf": [ - "phyloref:Phyloreference" + "phyloref:Phyloreference", + "phyloref:PhyloreferenceUsingMaximumClade" ] }, { "label": "Crocodylidae", - "cladeDefinition": "Crocodylidae (Cuvier 1807). Definition dependent on phylogenetic context.\n\nLast common ancestor of Crocodylus niloticus, Osteolaemus tetraspis, and Tomistoma schlegelii and all of its descendents.", + "phylorefType": "phyloref:PhyloreferenceUsingMinimumClade", + "definition": "Crocodylidae (Cuvier 1807). Definition dependent on phylogenetic context.\n\nLast common ancestor of Crocodylus niloticus, Osteolaemus tetraspis, and Tomistoma schlegelii and all of its descendents.", "definitionSource": { "type": "article", "title": "Phylogenetic approaches toward crocodylian history", @@ -1985,11 +1994,11 @@ } } ], - "@id": "http://example.org/brochu_2003.json#phyloref4", + "@id": "http://example.org/phyx.js/example#phyloref4", "@type": "owl:Class", "hasComponentClass": [ { - "@id": "http://example.org/brochu_2003.json#phyloref4_component1", + "@id": "http://example.org/phyx.js/example#phyloref4_component1", "@type": "owl:Class", "label": "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)", "equivalentClass": { @@ -2056,12 +2065,12 @@ "subClassOf": [ "phyloref:PhyloreferenceUsingMinimumClade", { - "@id": "http://example.org/brochu_2003.json#phyloref4" + "@id": "http://example.org/phyx.js/example#phyloref4" } ] }, { - "@id": "http://example.org/brochu_2003.json#phyloref4_component2", + "@id": "http://example.org/phyx.js/example#phyloref4_component2", "@type": "owl:Class", "label": "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)", "equivalentClass": { @@ -2128,12 +2137,12 @@ "subClassOf": [ "phyloref:PhyloreferenceUsingMinimumClade", { - "@id": "http://example.org/brochu_2003.json#phyloref4" + "@id": "http://example.org/phyx.js/example#phyloref4" } ] }, { - "@id": "http://example.org/brochu_2003.json#phyloref4_component3", + "@id": "http://example.org/phyx.js/example#phyloref4_component3", "@type": "owl:Class", "label": "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)", "equivalentClass": { @@ -2200,12 +2209,12 @@ "subClassOf": [ "phyloref:PhyloreferenceUsingMinimumClade", { - "@id": "http://example.org/brochu_2003.json#phyloref4" + "@id": "http://example.org/phyx.js/example#phyloref4" } ] }, { - "@id": "http://example.org/brochu_2003.json#phyloref4_component4", + "@id": "http://example.org/phyx.js/example#phyloref4_component4", "@type": "owl:Class", "label": "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)", "equivalentClass": { @@ -2272,12 +2281,12 @@ "subClassOf": [ "phyloref:PhyloreferenceUsingMinimumClade", { - "@id": "http://example.org/brochu_2003.json#phyloref4" + "@id": "http://example.org/phyx.js/example#phyloref4" } ] }, { - "@id": "http://example.org/brochu_2003.json#phyloref4_component5", + "@id": "http://example.org/phyx.js/example#phyloref4_component5", "@type": "owl:Class", "label": "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)", "equivalentClass": { @@ -2344,12 +2353,12 @@ "subClassOf": [ "phyloref:PhyloreferenceUsingMinimumClade", { - "@id": "http://example.org/brochu_2003.json#phyloref4" + "@id": "http://example.org/phyx.js/example#phyloref4" } ] }, { - "@id": "http://example.org/brochu_2003.json#phyloref4_component6", + "@id": "http://example.org/phyx.js/example#phyloref4_component6", "@type": "owl:Class", "label": "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)", "equivalentClass": { @@ -2416,12 +2425,12 @@ "subClassOf": [ "phyloref:PhyloreferenceUsingMinimumClade", { - "@id": "http://example.org/brochu_2003.json#phyloref4" + "@id": "http://example.org/phyx.js/example#phyloref4" } ] }, { - "@id": "http://example.org/brochu_2003.json#phyloref4_component7", + "@id": "http://example.org/phyx.js/example#phyloref4_component7", "@type": "owl:Class", "label": "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)", "equivalentClass": { @@ -2488,12 +2497,12 @@ "subClassOf": [ "phyloref:PhyloreferenceUsingMinimumClade", { - "@id": "http://example.org/brochu_2003.json#phyloref4" + "@id": "http://example.org/phyx.js/example#phyloref4" } ] }, { - "@id": "http://example.org/brochu_2003.json#phyloref4_component8", + "@id": "http://example.org/phyx.js/example#phyloref4_component8", "@type": "owl:Class", "label": "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)", "equivalentClass": { @@ -2560,12 +2569,12 @@ "subClassOf": [ "phyloref:PhyloreferenceUsingMinimumClade", { - "@id": "http://example.org/brochu_2003.json#phyloref4" + "@id": "http://example.org/phyx.js/example#phyloref4" } ] }, { - "@id": "http://example.org/brochu_2003.json#phyloref4_component9", + "@id": "http://example.org/phyx.js/example#phyloref4_component9", "@type": "owl:Class", "label": "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)", "equivalentClass": { @@ -2632,18 +2641,20 @@ "subClassOf": [ "phyloref:PhyloreferenceUsingMinimumClade", { - "@id": "http://example.org/brochu_2003.json#phyloref4" + "@id": "http://example.org/phyx.js/example#phyloref4" } ] } ], "subClassOf": [ - "phyloref:Phyloreference" + "phyloref:Phyloreference", + "phyloref:PhyloreferenceUsingMinimumClade" ] }, { "label": "Diplocynodontinae", - "cladeDefinition": "Diplocynodontinae (Brochu 1999).\n\nDiplocynodon ratelii and all crocodylians closer to it than to Alligator mississippiensis.", + "phylorefType": "phyloref:PhyloreferenceUsingMaximumClade", + "definition": "Diplocynodontinae (Brochu 1999).\n\nDiplocynodon ratelii and all crocodylians closer to it than to Alligator mississippiensis.", "definitionSource": { "type": "article", "title": "Phylogenetic approaches toward crocodylian history", @@ -2726,7 +2737,7 @@ "description": "Only representative of the Diplocynodontinae clade in this phylogeny." } }, - "@id": "http://example.org/brochu_2003.json#phyloref5", + "@id": "http://example.org/phyx.js/example#phyloref5", "@type": "owl:Class", "hasComponentClass": [], "equivalentClass": { @@ -2761,13 +2772,14 @@ ] }, "subClassOf": [ - "phyloref:Phyloreference" + "phyloref:Phyloreference", + "phyloref:PhyloreferenceUsingMaximumClade" ] } ], "defaultNomenclaturalCodeURI": "http://purl.obolibrary.org/obo/NOMEN_0000107", "hasTaxonomicUnitMatches": [], - "@id": "http://example.org/brochu_2003.json#", + "@id": "http://example.org/phyx.js/example#", "@type": [ "testcase:PhyloreferenceTestCase", "owl:Ontology" diff --git a/test/examples/correct/brochu_2003.nq b/test/examples/correct/brochu_2003.nq index ec3c0a85..2f2fd7f9 100644 --- a/test/examples/correct/brochu_2003.nq +++ b/test/examples/correct/brochu_2003.nq @@ -1,392 +1,404 @@ - . - . - . - . - . - . - . - . - . - . - . - . - "(Parasuchia,(rauisuchians,Aetosauria,(sphenosuchians,(protosuchians,(mesosuchians,(Hylaeochampsa,Aegyptosuchus,Stomatosuchus,(Allodaposuchus,('Gavialis gangeticus',(('Diplocynodon ratelii',('Alligator mississippiensis','Caiman crocodilus')Alligatoridae)Alligatoroidea,('Tomistoma schlegelii',('Osteolaemus tetraspis','Crocodylus niloticus')Crocodylinae)Crocodylidae)Brevirostres)Crocodylia))Eusuchia)Mesoeucrocodylia)Crocodyliformes)Crocodylomorpha))root;" . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - "Fig 1 from Brochu 2003" . - . - . - . - "root" . - . - . - . - . - _:b41 . - . - _:b43 . - "Crocodylinae" . - . - . - _:b46 . - . - _:b48 . - "Crocodylus niloticus" . - . - . - _:b51 . - . - _:b53 . - "Osteolaemus tetraspis" . - . - . - _:b56 . - . - _:b58 . - "Tomistoma schlegelii" . - . - . - . - . - _:b61 . - . - _:b63 . - "Alligatoroidea" . - . - . - . - . - _:b66 . - . - _:b68 . - _:b71 . - "Alligatoridae" . - . - . - _:b74 . - . - _:b76 . - _:b79 . - "Caiman crocodilus" . - . - . - _:b82 . - . - _:b84 . - _:b87 . - "Alligator mississippiensis" . - . - . - _:b90 . - . - _:b92 . - _:b95 . - "Diplocynodon ratelii" . - . - . - _:b98 . - . - _:b100 . - "Gavialis gangeticus" . - . - . - . - . - . - . - . - . - _:b103 . - . - _:b105 . - "Allodaposuchus" . - . - . - . - . - _:b108 . - . - _:b110 . - "Stomatosuchus" . - . - . - . - . - _:b113 . - . - _:b115 . - "Aegyptosuchus" . - . - . - . - . - _:b118 . - . - _:b120 . - "Hylaeochampsa" . - . - . - . - "mesosuchians" . - . - . - . - "protosuchians" . - . - . - . - "sphenosuchians" . - . - . - . - _:b123 . - . - _:b125 . - "Aetosauria" . - . - . - . - . - "rauisuchians" . - . - . - _:b128 . - . - _:b130 . - "Parasuchia" . - . - . - . - . - . - _:b0 . - . - _:b2 . - "Crocodylomorpha" . - . - . - . - . - _:b5 . - . - _:b7 . - "Crocodyliformes" . - . - . - . - . - _:b10 . - . - _:b12 . - "Mesoeucrocodylia" . - . - . - . - . - . - . - _:b15 . - . - _:b17 . - "Eusuchia" . - . - . - . - . - . - . - . - . - . - . - . - _:b20 . - . - _:b22 . - "Crocodylia" . - . - . - . - . - _:b25 . - . - _:b27 . - "Brevirostres" . - . - . - . - . - _:b30 . - . - _:b32 . - _:b35 . - _:b38 . - "Crocodylidae" . - _:b133 . - _:b134 . - _:b136 . - _:b138 . - . - "Alligatoridae" . - . - _:b140 . - _:b148 . - _:b149 . - _:b151 . - _:b153 . - . - "Alligatorinae" . - . - _:b155 . - _:b162 . - _:b163 . - _:b165 . - _:b167 . - . - "Caimaninae" . - . - _:b169 . - _:b176 . - _:b178 . - _:b180 . - . - . - . - . - . - . - _:b214 . - . - "Crocodyloidea" . - . - . - "(Crocodylus niloticus ~ Alligator mississippiensis)" . - . - _:b182 . - . - "(Crocodylus niloticus ~ Gavialis gangeticus)" . - . - _:b189 . - . - "(Crocodylus niloticus ~ Alligator mississippiensis V Gavialis gangeticus)" . - . - . - _:b196 . - . - "(Crocodylus niloticus ~ Alligator mississippiensis V Gavialis gangeticus)" . - . - . - _:b200 . - . - "(Crocodylus niloticus ~ Alligator mississippiensis V Gavialis gangeticus)" . - . - . - _:b205 . - . - "(Crocodylus niloticus ~ Alligator mississippiensis V Gavialis gangeticus)" . - . - . - _:b209 . - _:b216 . - _:b217 . - . - . - . - . - . - . - . - . - . - _:b345 . - _:b347 . - _:b349 . - . - "Crocodylidae" . - . - . - "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . - . - . - _:b219 . - . - "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . - . - . - _:b233 . - . - "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . - . - . - _:b247 . - . - "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . - . - . - _:b261 . - . - "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . - . - . - _:b275 . - . - "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . - . - . - _:b289 . - . - "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . - . - . - _:b303 . - . - "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . - . - . - _:b317 . - . - "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . - . - . - _:b331 . - _:b351 . - _:b352 . - _:b354 . - _:b356 . - . - "Diplocynodontinae" . - . - _:b358 . + . + . + . + . + . + . + . + . + . + . + . + . + "(Parasuchia,(rauisuchians,Aetosauria,(sphenosuchians,(protosuchians,(mesosuchians,(Hylaeochampsa,Aegyptosuchus,Stomatosuchus,(Allodaposuchus,('Gavialis gangeticus',(('Diplocynodon ratelii',('Alligator mississippiensis','Caiman crocodilus')Alligatoridae)Alligatoroidea,('Tomistoma schlegelii',('Osteolaemus tetraspis','Crocodylus niloticus')Crocodylinae)Crocodylidae)Brevirostres)Crocodylia))Eusuchia)Mesoeucrocodylia)Crocodyliformes)Crocodylomorpha))root;" . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + "Fig 1 from Brochu 2003" . + . + . + . + "root" . + . + . + . + . + _:b41 . + . + _:b43 . + "Crocodylinae" . + . + . + _:b46 . + . + _:b48 . + "Crocodylus niloticus" . + . + . + _:b51 . + . + _:b53 . + "Osteolaemus tetraspis" . + . + . + _:b56 . + . + _:b58 . + "Tomistoma schlegelii" . + . + . + . + . + _:b61 . + . + _:b63 . + "Alligatoroidea" . + . + . + . + . + _:b66 . + . + _:b68 . + _:b71 . + "Alligatoridae" . + . + . + _:b74 . + . + _:b76 . + _:b79 . + "Caiman crocodilus" . + . + . + _:b82 . + . + _:b84 . + _:b87 . + "Alligator mississippiensis" . + . + . + _:b90 . + . + _:b92 . + _:b95 . + "Diplocynodon ratelii" . + . + . + _:b98 . + . + _:b100 . + "Gavialis gangeticus" . + . + . + . + . + . + . + . + . + _:b103 . + . + _:b105 . + "Allodaposuchus" . + . + . + . + . + _:b108 . + . + _:b110 . + "Stomatosuchus" . + . + . + . + . + _:b113 . + . + _:b115 . + "Aegyptosuchus" . + . + . + . + . + _:b118 . + . + _:b120 . + "Hylaeochampsa" . + . + . + . + "mesosuchians" . + . + . + . + "protosuchians" . + . + . + . + "sphenosuchians" . + . + . + . + _:b123 . + . + _:b125 . + "Aetosauria" . + . + . + . + . + "rauisuchians" . + . + . + _:b128 . + . + _:b130 . + "Parasuchia" . + . + . + . + . + . + _:b0 . + . + _:b2 . + "Crocodylomorpha" . + . + . + . + . + _:b5 . + . + _:b7 . + "Crocodyliformes" . + . + . + . + . + _:b10 . + . + _:b12 . + "Mesoeucrocodylia" . + . + . + . + . + . + . + _:b15 . + . + _:b17 . + "Eusuchia" . + . + . + . + . + . + . + . + . + . + . + . + _:b20 . + . + _:b22 . + "Crocodylia" . + . + . + . + . + _:b25 . + . + _:b27 . + "Brevirostres" . + . + . + . + . + _:b30 . + . + _:b32 . + _:b35 . + _:b38 . + "Crocodylidae" . + "Alligatoridae (Cuvier 1807).\n\nLast common ancestor of Alligator mississippiensis and Caiman crocodilus and all of its descendents." . + _:b133 . + _:b134 . + _:b136 . + _:b138 . + . + "Alligatoridae" . + . + . + _:b140 . + "Alligatorinae (Kälin 1940).\n\nAlligator mississippiensis and all crocodylians closer to it than to Caiman crocodilus." . + _:b148 . + _:b149 . + _:b151 . + _:b153 . + . + "Alligatorinae" . + . + . + _:b155 . + "Caimaninae (Norell 1988).\n\nCaiman crocodilus and all crocodylians closer to it than to Alligator mississippiensis." . + _:b162 . + _:b163 . + _:b165 . + _:b167 . + . + "Caimaninae" . + . + . + _:b169 . + "Crocodyloidea (Fitzinger 1826).\n\nCrocodylus niloticus and all crocodylians closer to it than to Alligator mississippiensis or Gavialis gangeticus." . + _:b176 . + _:b178 . + _:b180 . + . + . + . + . + . + . + _:b214 . + . + "Crocodyloidea" . + . + . + . + "(Crocodylus niloticus ~ Alligator mississippiensis)" . + . + _:b182 . + . + "(Crocodylus niloticus ~ Gavialis gangeticus)" . + . + _:b189 . + . + "(Crocodylus niloticus ~ Alligator mississippiensis V Gavialis gangeticus)" . + . + . + _:b196 . + . + "(Crocodylus niloticus ~ Alligator mississippiensis V Gavialis gangeticus)" . + . + . + _:b200 . + . + "(Crocodylus niloticus ~ Alligator mississippiensis V Gavialis gangeticus)" . + . + . + _:b205 . + . + "(Crocodylus niloticus ~ Alligator mississippiensis V Gavialis gangeticus)" . + . + . + _:b209 . + "Crocodylidae (Cuvier 1807). Definition dependent on phylogenetic context.\n\nLast common ancestor of Crocodylus niloticus, Osteolaemus tetraspis, and Tomistoma schlegelii and all of its descendents." . + _:b216 . + _:b217 . + . + . + . + . + . + . + . + . + . + _:b345 . + _:b347 . + _:b349 . + . + "Crocodylidae" . + . + . + . + "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . + . + . + _:b219 . + . + "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . + . + . + _:b233 . + . + "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . + . + . + _:b247 . + . + "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . + . + . + _:b261 . + . + "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . + . + . + _:b275 . + . + "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . + . + . + _:b289 . + . + "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . + . + . + _:b303 . + . + "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . + . + . + _:b317 . + . + "(Crocodylus niloticus & Osteolaemus tetraspis & Tomistoma schlegelii)" . + . + . + _:b331 . + "Diplocynodontinae (Brochu 1999).\n\nDiplocynodon ratelii and all crocodylians closer to it than to Alligator mississippiensis." . + _:b351 . + _:b352 . + _:b354 . + _:b356 . + . + "Diplocynodontinae" . + . + . + _:b358 . _:b0 _:b1 . _:b0 . _:b0 "Crocodylomorpha" . @@ -1282,7 +1294,7 @@ _:b369 _:b170 . _:b369 _:b370 . _:b37 . _:b37 . -_:b37 . +_:b37 . _:b370 _:b173 . _:b370 . _:b371 _:b183 . @@ -1293,22 +1305,22 @@ _:b373 _:b190 . _:b373 _:b374 . _:b374 _:b193 . _:b374 . -_:b375 . +_:b375 . _:b375 _:b376 . _:b376 _:b197 . _:b376 . -_:b377 . +_:b377 . _:b377 _:b378 . _:b378 _:b201 . _:b378 . -_:b379 . +_:b379 . _:b379 _:b380 . _:b38 . _:b38 . _:b38 _:b39 . _:b380 _:b206 . _:b380 . -_:b381 . +_:b381 . _:b381 _:b382 . _:b382 _:b210 . _:b382 . @@ -1353,7 +1365,7 @@ _:b4 "Crocodylomorpha" . _:b4 . _:b40 . _:b40 . -_:b40 . +_:b40 . _:b400 _:b281 . _:b400 . _:b401 _:b283 . @@ -1539,7 +1551,7 @@ _:b72 _:b425 . _:b73 . _:b73 . -_:b73 . +_:b73 . _:b74 _:b75 . _:b74 . _:b74 "Caiman crocodilus" . @@ -1568,7 +1580,7 @@ _:b80 _:b427 . _:b81 . _:b81 . -_:b81 . +_:b81 . _:b82 _:b83 . _:b82 . _:b82 "Alligator mississippiensis" . @@ -1594,7 +1606,7 @@ _:b88 _:b429 . _:b89 . _:b89 . -_:b89 . +_:b89 . _:b9 . _:b9 "Crocodyliformes" . _:b9 . @@ -1623,7 +1635,7 @@ _:b96 _:b431 . _:b97 . _:b97 . -_:b97 . +_:b97 . _:b98 _:b99 . _:b98 . _:b98 "Gavialis gangeticus" . diff --git a/test/examples/correct/phyloref_as_specifier.json b/test/examples/correct/phyloref_as_specifier.json new file mode 100644 index 00000000..08271c08 --- /dev/null +++ b/test/examples/correct/phyloref_as_specifier.json @@ -0,0 +1,49 @@ +{ + "@context": "../../../docs/context/development/phyx.json", + "phylogenies": [{ + "newick": "(((Aa_a, Bb_b)Phyloreference_as_specifier_example, (Cc_c, Dd_d)Specifier_phyloref), Ee_e);" + }], + "phylorefs": [ + { + "@id": "#phyloref1", + "label": "Phyloreference as specifier example", + "definition": "The maximum clade that includes 'Aa a' but excludes phyloref 'Specifier phyloref' (#phyloref2), defined elsewhere in this file.", + "internalSpecifiers": [ + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nameComplete": "Aa a" + } + } + ], + "externalSpecifiers": [ + { + "@id": "http://example.org/phyx.js/example#phyloref2", + "@type": "phyloref:Phyloreference" + } + ] + }, + { + "@id": "http://example.org/phyx.js/example#phyloref2", + "label": "Specifier phyloref", + "definition": "Most recent common ancestor of 'Cc c' and 'Dd d'", + "internalSpecifiers": [ + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nameComplete": "Cc c" + } + }, + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nameComplete": "Dd d" + } + } + ] + } + ] +} diff --git a/test/examples/correct/phyloref_as_specifier.jsonld b/test/examples/correct/phyloref_as_specifier.jsonld new file mode 100644 index 00000000..9d2f3fe9 --- /dev/null +++ b/test/examples/correct/phyloref_as_specifier.jsonld @@ -0,0 +1,472 @@ +{ + "@context": "../../../docs/context/development/phyx.json", + "phylogenies": [ + { + "newick": "(((Aa_a, Bb_b)Phyloreference_as_specifier_example, (Cc_c, Dd_d)Specifier_phyloref), Ee_e);", + "@id": "http://example.org/phyx.js/example#phylogeny0", + "@type": "testcase:PhyloreferenceTestPhylogeny", + "nodes": [ + { + "@id": "http://example.org/phyx.js/example#phylogeny0_node0", + "rdf:type": [ + { + "@id": "obo:CDAO_0000140" + } + ], + "children": [ + "http://example.org/phyx.js/example#phylogeny0_node1", + "http://example.org/phyx.js/example#phylogeny0_node2" + ] + }, + { + "@id": "http://example.org/phyx.js/example#phylogeny0_node1", + "rdf:type": [ + { + "@id": "obo:CDAO_0000140" + }, + { + "@type": "owl:Restriction", + "onProperty": "obo:CDAO_0000187", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonConcept#hasName", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonName#nameComplete", + "hasValue": "Ee e" + } + } + } + ], + "labels": [ + "Ee_e" + ], + "representsTaxonomicUnits": [ + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nomenclaturalCode": "http://purl.obolibrary.org/obo/NOMEN_0000036", + "label": "Ee_e", + "nameComplete": "Ee e", + "genusPart": "Ee", + "specificEpithet": "e" + }, + "label": "Ee_e" + } + ], + "parent": "http://example.org/phyx.js/example#phylogeny0_node0", + "siblings": [ + "http://example.org/phyx.js/example#phylogeny0_node2" + ] + }, + { + "@id": "http://example.org/phyx.js/example#phylogeny0_node2", + "rdf:type": [ + { + "@id": "obo:CDAO_0000140" + } + ], + "parent": "http://example.org/phyx.js/example#phylogeny0_node0", + "siblings": [ + "http://example.org/phyx.js/example#phylogeny0_node1" + ], + "children": [ + "http://example.org/phyx.js/example#phylogeny0_node3", + "http://example.org/phyx.js/example#phylogeny0_node6" + ] + }, + { + "@id": "http://example.org/phyx.js/example#phylogeny0_node3", + "rdf:type": [ + { + "@id": "obo:CDAO_0000140" + }, + { + "@type": "owl:Restriction", + "onProperty": "obo:CDAO_0000187", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonConcept#hasName", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonName#nameComplete", + "hasValue": "Specifier phyloref" + } + } + } + ], + "labels": [ + "Specifier_phyloref" + ], + "representsTaxonomicUnits": [ + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nomenclaturalCode": "http://purl.obolibrary.org/obo/NOMEN_0000036", + "label": "Specifier_phyloref", + "nameComplete": "Specifier phyloref", + "genusPart": "Specifier", + "specificEpithet": "phyloref" + }, + "label": "Specifier_phyloref" + } + ], + "parent": "http://example.org/phyx.js/example#phylogeny0_node2", + "siblings": [ + "http://example.org/phyx.js/example#phylogeny0_node6" + ], + "children": [ + "http://example.org/phyx.js/example#phylogeny0_node4", + "http://example.org/phyx.js/example#phylogeny0_node5" + ] + }, + { + "@id": "http://example.org/phyx.js/example#phylogeny0_node4", + "rdf:type": [ + { + "@id": "obo:CDAO_0000140" + }, + { + "@type": "owl:Restriction", + "onProperty": "obo:CDAO_0000187", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonConcept#hasName", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonName#nameComplete", + "hasValue": "Dd d" + } + } + } + ], + "labels": [ + "Dd_d" + ], + "representsTaxonomicUnits": [ + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nomenclaturalCode": "http://purl.obolibrary.org/obo/NOMEN_0000036", + "label": "Dd_d", + "nameComplete": "Dd d", + "genusPart": "Dd", + "specificEpithet": "d" + }, + "label": "Dd_d" + } + ], + "parent": "http://example.org/phyx.js/example#phylogeny0_node3", + "siblings": [ + "http://example.org/phyx.js/example#phylogeny0_node5" + ] + }, + { + "@id": "http://example.org/phyx.js/example#phylogeny0_node5", + "rdf:type": [ + { + "@id": "obo:CDAO_0000140" + }, + { + "@type": "owl:Restriction", + "onProperty": "obo:CDAO_0000187", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonConcept#hasName", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonName#nameComplete", + "hasValue": "Cc c" + } + } + } + ], + "labels": [ + "Cc_c" + ], + "representsTaxonomicUnits": [ + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nomenclaturalCode": "http://purl.obolibrary.org/obo/NOMEN_0000036", + "label": "Cc_c", + "nameComplete": "Cc c", + "genusPart": "Cc", + "specificEpithet": "c" + }, + "label": "Cc_c" + } + ], + "parent": "http://example.org/phyx.js/example#phylogeny0_node3", + "siblings": [ + "http://example.org/phyx.js/example#phylogeny0_node4" + ] + }, + { + "@id": "http://example.org/phyx.js/example#phylogeny0_node6", + "rdf:type": [ + { + "@id": "obo:CDAO_0000140" + }, + { + "@type": "owl:Restriction", + "onProperty": "obo:CDAO_0000187", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonConcept#hasName", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonName#nameComplete", + "hasValue": "Phyloreference as" + } + } + } + ], + "labels": [ + "Phyloreference_as_specifier_example" + ], + "representsTaxonomicUnits": [ + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nomenclaturalCode": "http://purl.obolibrary.org/obo/NOMEN_0000036", + "label": "Phyloreference_as_specifier_example", + "nameComplete": "Phyloreference as", + "genusPart": "Phyloreference", + "specificEpithet": "as" + }, + "label": "Phyloreference_as_specifier_example" + } + ], + "parent": "http://example.org/phyx.js/example#phylogeny0_node2", + "siblings": [ + "http://example.org/phyx.js/example#phylogeny0_node3" + ], + "children": [ + "http://example.org/phyx.js/example#phylogeny0_node7", + "http://example.org/phyx.js/example#phylogeny0_node8" + ] + }, + { + "@id": "http://example.org/phyx.js/example#phylogeny0_node7", + "rdf:type": [ + { + "@id": "obo:CDAO_0000140" + }, + { + "@type": "owl:Restriction", + "onProperty": "obo:CDAO_0000187", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonConcept#hasName", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonName#nameComplete", + "hasValue": "Bb b" + } + } + } + ], + "labels": [ + "Bb_b" + ], + "representsTaxonomicUnits": [ + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nomenclaturalCode": "http://purl.obolibrary.org/obo/NOMEN_0000036", + "label": "Bb_b", + "nameComplete": "Bb b", + "genusPart": "Bb", + "specificEpithet": "b" + }, + "label": "Bb_b" + } + ], + "parent": "http://example.org/phyx.js/example#phylogeny0_node6", + "siblings": [ + "http://example.org/phyx.js/example#phylogeny0_node8" + ] + }, + { + "@id": "http://example.org/phyx.js/example#phylogeny0_node8", + "rdf:type": [ + { + "@id": "obo:CDAO_0000140" + }, + { + "@type": "owl:Restriction", + "onProperty": "obo:CDAO_0000187", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonConcept#hasName", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonName#nameComplete", + "hasValue": "Aa a" + } + } + } + ], + "labels": [ + "Aa_a" + ], + "representsTaxonomicUnits": [ + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nomenclaturalCode": "http://purl.obolibrary.org/obo/NOMEN_0000036", + "label": "Aa_a", + "nameComplete": "Aa a", + "genusPart": "Aa", + "specificEpithet": "a" + }, + "label": "Aa_a" + } + ], + "parent": "http://example.org/phyx.js/example#phylogeny0_node6", + "siblings": [ + "http://example.org/phyx.js/example#phylogeny0_node7" + ] + } + ], + "hasRootNode": { + "@id": "http://example.org/phyx.js/example#phylogeny0_node0" + } + } + ], + "phylorefs": [ + { + "@id": "http://example.org/phyx.js/example#phyloref1", + "label": "Phyloreference as specifier example", + "definition": "The maximum clade that includes 'Aa a' but excludes phyloref 'Specifier phyloref' (#phyloref2), defined elsewhere in this file.", + "internalSpecifiers": [ + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nameComplete": "Aa a" + } + } + ], + "externalSpecifiers": [ + { + "@id": "http://example.org/phyx.js/example#phyloref2", + "@type": "phyloref:Phyloreference" + } + ], + "@type": "owl:Class", + "hasComponentClass": [], + "equivalentClass": { + "@type": "owl:Class", + "intersectionOf": [ + { + "@type": "owl:Restriction", + "onProperty": "phyloref:includes_TU", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonConcept#hasName", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonName#nameComplete", + "hasValue": "Aa a" + } + } + }, + { + "@type": "owl:Restriction", + "onProperty": "phyloref:excludes_lineage_to", + "someValuesFrom": { + "@id": "http://example.org/phyx.js/example#phyloref2", + "@type": "phyloref:Phyloreference" + } + } + ] + }, + "subClassOf": [ + "phyloref:Phyloreference", + "phyloref:PhyloreferenceUsingMaximumClade" + ] + }, + { + "@id": "http://example.org/phyx.js/example#phyloref2", + "label": "Specifier phyloref", + "definition": "Most recent common ancestor of 'Cc c' and 'Dd d'", + "internalSpecifiers": [ + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nameComplete": "Cc c" + } + }, + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nameComplete": "Dd d" + } + } + ], + "@type": "owl:Class", + "hasComponentClass": [], + "equivalentClass": { + "@type": "owl:Restriction", + "onProperty": "obo:CDAO_0000149", + "someValuesFrom": { + "@type": "owl:Class", + "intersectionOf": [ + { + "@type": "owl:Restriction", + "onProperty": "phyloref:excludes_TU", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonConcept#hasName", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonName#nameComplete", + "hasValue": "Cc c" + } + } + }, + { + "@type": "owl:Restriction", + "onProperty": "phyloref:includes_TU", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonConcept#hasName", + "someValuesFrom": { + "@type": "owl:Restriction", + "onProperty": "http://rs.tdwg.org/ontology/voc/TaxonName#nameComplete", + "hasValue": "Dd d" + } + } + } + ] + } + }, + "subClassOf": [ + "phyloref:Phyloreference", + "phyloref:PhyloreferenceUsingMinimumClade" + ] + } + ], + "hasTaxonomicUnitMatches": [], + "@id": "http://example.org/phyx.js/example#", + "@type": [ + "testcase:PhyloreferenceTestCase", + "owl:Ontology" + ], + "owl:imports": [ + "http://raw.githubusercontent.com/phyloref/curation-workflow/develop/ontologies/phyloref_testcase.owl", + "http://ontology.phyloref.org/2018-12-14/phyloref.owl", + "http://ontology.phyloref.org/2018-12-14/tcan.owl" + ] +} \ No newline at end of file diff --git a/test/examples/correct/phyloref_as_specifier.nq b/test/examples/correct/phyloref_as_specifier.nq new file mode 100644 index 00000000..a9c3cb64 --- /dev/null +++ b/test/examples/correct/phyloref_as_specifier.nq @@ -0,0 +1,274 @@ + . + . + . + . + . + . + . + . + "(((Aa_a, Bb_b)Phyloreference_as_specifier_example, (Cc_c, Dd_d)Specifier_phyloref), Ee_e);" . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + _:b0 . + . + _:b2 . + "Ee_e" . + . + . + . + . + . + . + . + . + . + _:b5 . + . + _:b7 . + "Specifier_phyloref" . + . + . + _:b10 . + . + _:b12 . + "Dd_d" . + . + . + _:b15 . + . + _:b17 . + "Cc_c" . + . + . + . + . + _:b20 . + . + _:b22 . + "Phyloreference_as_specifier_example" . + . + . + _:b25 . + . + _:b27 . + "Bb_b" . + . + . + _:b30 . + . + _:b32 . + "Aa_a" . + "The maximum clade that includes 'Aa a' but excludes phyloref 'Specifier phyloref' (#phyloref2), defined elsewhere in this file." . + . + _:b35 . + . + "Phyloreference as specifier example" . + . + . + _:b37 . + "Most recent common ancestor of 'Cc c' and 'Dd d'" . + _:b42 . + _:b44 . + . + . + "Specifier phyloref" . + . + . + _:b46 . +_:b0 _:b1 . +_:b0 . +_:b0 "Ee_e" . +_:b1 "Ee" . +_:b1 "Ee e" . +_:b1 . +_:b1 "e" . +_:b1 . +_:b1 "Ee_e" . +_:b10 _:b11 . +_:b10 . +_:b10 "Dd_d" . +_:b11 "Dd" . +_:b11 "Dd d" . +_:b11 . +_:b11 "d" . +_:b11 . +_:b11 "Dd_d" . +_:b12 . +_:b12 . +_:b12 _:b13 . +_:b13 . +_:b13 . +_:b13 _:b14 . +_:b14 . +_:b14 "Dd d" . +_:b14 . +_:b15 _:b16 . +_:b15 . +_:b15 "Cc_c" . +_:b16 "Cc" . +_:b16 "Cc c" . +_:b16 . +_:b16 "c" . +_:b16 . +_:b16 "Cc_c" . +_:b17 . +_:b17 . +_:b17 _:b18 . +_:b18 . +_:b18 . +_:b18 _:b19 . +_:b19 . +_:b19 "Cc c" . +_:b19 . +_:b2 . +_:b2 . +_:b2 _:b3 . +_:b20 _:b21 . +_:b20 . +_:b20 "Phyloreference_as_specifier_example" . +_:b21 "Phyloreference" . +_:b21 "Phyloreference as" . +_:b21 . +_:b21 "as" . +_:b21 . +_:b21 "Phyloreference_as_specifier_example" . +_:b22 . +_:b22 . +_:b22 _:b23 . +_:b23 . +_:b23 . +_:b23 _:b24 . +_:b24 . +_:b24 "Phyloreference as" . +_:b24 . +_:b25 _:b26 . +_:b25 . +_:b25 "Bb_b" . +_:b26 "Bb" . +_:b26 "Bb b" . +_:b26 . +_:b26 "b" . +_:b26 . +_:b26 "Bb_b" . +_:b27 . +_:b27 . +_:b27 _:b28 . +_:b28 . +_:b28 . +_:b28 _:b29 . +_:b29 . +_:b29 "Bb b" . +_:b29 . +_:b3 . +_:b3 . +_:b3 _:b4 . +_:b30 _:b31 . +_:b30 . +_:b30 "Aa_a" . +_:b31 "Aa" . +_:b31 "Aa a" . +_:b31 . +_:b31 "a" . +_:b31 . +_:b31 "Aa_a" . +_:b32 . +_:b32 . +_:b32 _:b33 . +_:b33 . +_:b33 . +_:b33 _:b34 . +_:b34 . +_:b34 "Aa a" . +_:b34 . +_:b35 _:b36 . +_:b35 . +_:b36 "Aa a" . +_:b36 . +_:b37 . +_:b37 _:b54 . +_:b38 . +_:b38 . +_:b38 _:b39 . +_:b39 . +_:b39 . +_:b39 _:b40 . +_:b4 . +_:b4 "Ee e" . +_:b4 . +_:b40 . +_:b40 "Aa a" . +_:b40 . +_:b41 . +_:b41 . +_:b41 . +_:b42 _:b43 . +_:b42 . +_:b43 "Cc c" . +_:b43 . +_:b44 _:b45 . +_:b44 . +_:b45 "Dd d" . +_:b45 . +_:b46 . +_:b46 . +_:b46 _:b47 . +_:b47 . +_:b47 _:b56 . +_:b48 . +_:b48 . +_:b48 _:b49 . +_:b49 . +_:b49 . +_:b49 _:b50 . +_:b5 _:b6 . +_:b5 . +_:b5 "Specifier_phyloref" . +_:b50 . +_:b50 "Cc c" . +_:b50 . +_:b51 . +_:b51 . +_:b51 _:b52 . +_:b52 . +_:b52 . +_:b52 _:b53 . +_:b53 . +_:b53 "Dd d" . +_:b53 . +_:b54 _:b38 . +_:b54 _:b55 . +_:b55 _:b41 . +_:b55 . +_:b56 _:b48 . +_:b56 _:b57 . +_:b57 _:b51 . +_:b57 . +_:b6 "Specifier" . +_:b6 "Specifier phyloref" . +_:b6 . +_:b6 "phyloref" . +_:b6 . +_:b6 "Specifier_phyloref" . +_:b7 . +_:b7 . +_:b7 _:b8 . +_:b8 . +_:b8 . +_:b8 _:b9 . +_:b9 . +_:b9 "Specifier phyloref" . +_:b9 . diff --git a/test/examples/correct/testudinata_phylonym.json b/test/examples/correct/testudinata_phylonym.json new file mode 100644 index 00000000..45552175 --- /dev/null +++ b/test/examples/correct/testudinata_phylonym.json @@ -0,0 +1,124 @@ +{ + "@context": "../../../docs/context/development/phyx.json", + "phylorefs": [ + { + "label": "Testudinata", + "phylorefType": "phyloref:PhyloreferenceUsingApomorphy", + "definition": "The apomorphy-based clade name, for which a complete turtle shell, as inherited by Testudo graeca Linnaeus 1758 is an apomorphy. A 'complete turtle shell' is herein defined as a composite structure consisting of a carapace with interlocking costals, neurals, peripherals, and a nuchal, together with the plastron comprising interlocking epi-, hyo-, meso- (lost in Testudo graeca), hypo-, xiphiplastra and an entoplastron.", + "definitionSource": { + "type": "book_section", + "title": "Testudinata (#273)", + "authors": [ + { + "firstname": "W.", + "middlename": "G.", + "lastname": "Joyce" + }, + { + "firstname": "J.", + "middlename": "F.", + "lastname": "Parham" + }, + { + "firstname": "J.", + "lastname": "Anquetin" + }, + { + "firstname": "J.", + "lastname": "Claude" + }, + { + "firstname": "I.", + "middlename": "G.", + "lastname": "Danilov" + }, + { + "firstname": "J.", + "middlename": "B.", + "lastname": "Iverson" + }, + { + "firstname": "B.", + "lastname": "Kear" + }, + { + "firstname": "T.", + "middlename": "R.", + "lastname": "Lyson" + }, + { + "firstname": "M.", + "lastname": "Rabi" + }, + { + "firstname": "J.", + "lastname": "Sterli" + } + ], + "year": 2020, + "identifier": [ + { + "type": "regnum", + "id": "273" + } + ], + "editors": [ + { + "firstname": "K.", + "lastname": "de Queiroz" + }, + { + "firstname": "P.", + "middlename": "D.", + "lastname": "Cantino" + }, + { + "firstname": "J.", + "middlename": "A.", + "lastname": "Gauthier" + } + ], + "publisher": "CRC Press", + "city": "Boca Raton, FL", + "journal": { + "name": "Phylonyms: a companion to the PhyloCode", + "pages": "1045--1048", + "identifier": [{ + "type": "ISBN", + "id": "9781138332935" + }] + } + }, + "apomorphy": { + "@type": "https://semanticscience.org/resource/SIO_010056", + "exactMatch": "http://purl.obolibrary.org/obo/UBERON_0008271", + "definition": "A 'complete turtle shell' is herein defined as a composite structure consisting of a carapace with interlocking costals, neurals, peripherals, and a nuchal, together with the plastron comprising interlocking epi-, hyo-, meso- (lost in Testudo graeca), hypo-, xiphiplastra and an entoplastron. These are articulated with one another along a bridge. Additional elements may be present as well." + }, + "internalSpecifiers": [ + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nomenclaturalCode": "http://purl.obolibrary.org/obo/NOMEN_0000107", + "label": "Testudo graeca Linnaeus 1758", + "nameComplete": "Testudo graeca", + "genusPart": "Testudo", + "specificEpithet": "graeca" + } + } + ], + "pso:holdsStatusInTime": [ + { + "@type": "http://purl.org/spar/pso/StatusInTime", + "pso:withStatus": { + "@id": "pso:submitted" + }, + "tvc:atTime": { + "timeinterval:hasIntervalStartDate": "2021-02-09T20:36:09Z" + } + } + ] + } + ], + "defaultNomenclaturalCodeURI": "http://purl.obolibrary.org/obo/NOMEN_0000107" +} diff --git a/test/examples/correct/testudinata_phylonym.jsonld b/test/examples/correct/testudinata_phylonym.jsonld new file mode 100644 index 00000000..20d04ec0 --- /dev/null +++ b/test/examples/correct/testudinata_phylonym.jsonld @@ -0,0 +1,142 @@ +{ + "@context": "../../../docs/context/development/phyx.json", + "phylorefs": [ + { + "label": "Testudinata", + "phylorefType": "phyloref:PhyloreferenceUsingApomorphy", + "definition": "The apomorphy-based clade name, for which a complete turtle shell, as inherited by Testudo graeca Linnaeus 1758 is an apomorphy. A 'complete turtle shell' is herein defined as a composite structure consisting of a carapace with interlocking costals, neurals, peripherals, and a nuchal, together with the plastron comprising interlocking epi-, hyo-, meso- (lost in Testudo graeca), hypo-, xiphiplastra and an entoplastron.", + "definitionSource": { + "type": "book_section", + "title": "Testudinata (#273)", + "authors": [ + { + "firstname": "W.", + "middlename": "G.", + "lastname": "Joyce" + }, + { + "firstname": "J.", + "middlename": "F.", + "lastname": "Parham" + }, + { + "firstname": "J.", + "lastname": "Anquetin" + }, + { + "firstname": "J.", + "lastname": "Claude" + }, + { + "firstname": "I.", + "middlename": "G.", + "lastname": "Danilov" + }, + { + "firstname": "J.", + "middlename": "B.", + "lastname": "Iverson" + }, + { + "firstname": "B.", + "lastname": "Kear" + }, + { + "firstname": "T.", + "middlename": "R.", + "lastname": "Lyson" + }, + { + "firstname": "M.", + "lastname": "Rabi" + }, + { + "firstname": "J.", + "lastname": "Sterli" + } + ], + "year": 2020, + "identifier": [ + { + "type": "regnum", + "id": "273" + } + ], + "editors": [ + { + "firstname": "K.", + "lastname": "de Queiroz" + }, + { + "firstname": "P.", + "middlename": "D.", + "lastname": "Cantino" + }, + { + "firstname": "J.", + "middlename": "A.", + "lastname": "Gauthier" + } + ], + "publisher": "CRC Press", + "city": "Boca Raton, FL", + "journal": { + "name": "Phylonyms: a companion to the PhyloCode", + "pages": "1045--1048", + "identifier": [ + { + "type": "ISBN", + "id": "9781138332935" + } + ] + } + }, + "apomorphy": { + "@type": "https://semanticscience.org/resource/SIO_010056", + "exactMatch": "http://purl.obolibrary.org/obo/UBERON_0008271", + "definition": "A 'complete turtle shell' is herein defined as a composite structure consisting of a carapace with interlocking costals, neurals, peripherals, and a nuchal, together with the plastron comprising interlocking epi-, hyo-, meso- (lost in Testudo graeca), hypo-, xiphiplastra and an entoplastron. These are articulated with one another along a bridge. Additional elements may be present as well." + }, + "internalSpecifiers": [ + { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept", + "hasName": { + "@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName", + "nomenclaturalCode": "http://purl.obolibrary.org/obo/NOMEN_0000107", + "label": "Testudo graeca Linnaeus 1758", + "nameComplete": "Testudo graeca", + "genusPart": "Testudo", + "specificEpithet": "graeca" + } + } + ], + "pso:holdsStatusInTime": [ + { + "@type": "http://purl.org/spar/pso/StatusInTime", + "pso:withStatus": { + "@id": "pso:submitted" + }, + "tvc:atTime": { + "timeinterval:hasIntervalStartDate": "2021-02-09T20:36:09Z" + } + } + ], + "@id": "http://example.org/phyx.js/example#phyloref0", + "@type": "owl:Class", + "subClassOf": [ + "phyloref:Phyloreference", + "phyloref:PhyloreferenceUsingApomorphy" + ] + } + ], + "defaultNomenclaturalCodeURI": "http://purl.obolibrary.org/obo/NOMEN_0000107", + "@id": "http://example.org/phyx.js/example#", + "@type": [ + "testcase:PhyloreferenceTestCase", + "owl:Ontology" + ], + "owl:imports": [ + "http://raw.githubusercontent.com/phyloref/curation-workflow/develop/ontologies/phyloref_testcase.owl", + "http://ontology.phyloref.org/2018-12-14/phyloref.owl", + "http://ontology.phyloref.org/2018-12-14/tcan.owl" + ] +} \ No newline at end of file diff --git a/test/examples/correct/testudinata_phylonym.nq b/test/examples/correct/testudinata_phylonym.nq new file mode 100644 index 00000000..44364ad1 --- /dev/null +++ b/test/examples/correct/testudinata_phylonym.nq @@ -0,0 +1,31 @@ + . + . + . + . + . + . + "The apomorphy-based clade name, for which a complete turtle shell, as inherited by Testudo graeca Linnaeus 1758 is an apomorphy. A 'complete turtle shell' is herein defined as a composite structure consisting of a carapace with interlocking costals, neurals, peripherals, and a nuchal, together with the plastron comprising interlocking epi-, hyo-, meso- (lost in Testudo graeca), hypo-, xiphiplastra and an entoplastron." . + _:b0 . + _:b1 . + _:b3 . + _:b4 . + . + "Testudinata" . + . + . +_:b0 "Testudinata (#273)" . +_:b1 . +_:b1 _:b2 . +_:b1 . +_:b2 "2021-02-09T20:36:09Z" . +_:b3 "A 'complete turtle shell' is herein defined as a composite structure consisting of a carapace with interlocking costals, neurals, peripherals, and a nuchal, together with the plastron comprising interlocking epi-, hyo-, meso- (lost in Testudo graeca), hypo-, xiphiplastra and an entoplastron. These are articulated with one another along a bridge. Additional elements may be present as well." . +_:b3 . +_:b3 . +_:b4 _:b5 . +_:b4 . +_:b5 "Testudo" . +_:b5 "Testudo graeca" . +_:b5 . +_:b5 "graeca" . +_:b5 . +_:b5 "Testudo graeca Linnaeus 1758" . diff --git a/test/jphyloref.js b/test/jphyloref.js index 1fdaf7e5..8c005d3e 100644 --- a/test/jphyloref.js +++ b/test/jphyloref.js @@ -75,16 +75,20 @@ describe('JPhyloRef', function () { expect(matches, `Test result line not found in STDERR <${child.stderr}>`).to.have.lengthOf(5); - const countSuccess = Number(matches[1]); + // const countSuccess = Number(matches[1]); const countFailure = Number(matches[2]); const countTODOs = Number(matches[3]); // const countSkipped = Number(matches[4]); - expect(countSuccess, 'Expected one or more successes').to.be.greaterThan(0); + // We can't test for one or more successes since some example Phyx file + // such as apomorphy-based phyloreferences don't have any successes at all. + // expect(countSuccess, 'Expected one or more successes').to.be.greaterThan(0); expect(countFailure, 'Expected zero failures').to.equal(0); expect(countTODOs, 'Expected zero TODOs').to.equal(0); - expect(child.status).to.equal(0); + // An exit code of 0 means success. An exit code of 255 means that while + // there were no successes, there were also no failures. Either is acceptable here. + expect(child.status).to.be.oneOf([0, 255]); }); }); }); diff --git a/test/scripts/phyx2owl.js b/test/scripts/phyx2owl.js index 0bd0eccd..4f4eb170 100644 --- a/test/scripts/phyx2owl.js +++ b/test/scripts/phyx2owl.js @@ -40,14 +40,14 @@ describe(PHYX2OWL_JS, function () { const OWL_FILE = path.resolve(__dirname, '../examples/correct/brochu_2003.owl'); const EXPECTED_OWL_FILE = path.resolve(__dirname, '../examples/correct/brochu_2003.jsonld'); - // If there is already a '../examples/brochu_2003.json' file, we should delete it. + // If there is already a '../examples/brochu_2003.owl' file, we should delete it. if (fs.existsSync(OWL_FILE)) fs.unlinkSync(OWL_FILE); expect(fs.existsSync(OWL_FILE)).to.be.false; // Convert brochu_2003.json to brochu_2003.owl. // Because of the way in which we test brochu_2003.owl in test/examples.js, // we need to set a base URI as well. - const result = child.spawnSync(PHYX2OWL_JS, [PHYX_FILE, '--base-uri', 'http://example.org/brochu_2003.json#'], { + const result = child.spawnSync(PHYX2OWL_JS, [PHYX_FILE, '--base-uri', 'http://example.org/phyx.js/example#'], { encoding: 'utf-8', stdio: 'pipe', }); @@ -71,7 +71,7 @@ describe(PHYX2OWL_JS, function () { const jsonFilesInExamples = fs.readdirSync(EXAMPLE_DIR, 'utf8') .filter(fileName => fileName.toLowerCase().endsWith('.json')); - const result = child.spawnSync(PHYX2OWL_JS, [EXAMPLE_DIR], { + const result = child.spawnSync(PHYX2OWL_JS, [EXAMPLE_DIR, '--base-uri', 'http://example.org/phyx.js/example#'], { encoding: 'utf-8', stdio: 'pipe', });