@prefix this: . @prefix sub: . @prefix np: . @prefix grlc: . @prefix dct: . @prefix nt: . @prefix npx: . @prefix xsd: . @prefix rdfs: . @prefix orcid: . @prefix prov: . sub:Head { this: a np:Nanopublication; np:hasAssertion sub:assertion; np:hasProvenance sub:provenance; np:hasPublicationInfo sub:pubinfo . } sub:assertion { sub:get-mvikg-sample-info a grlc:grlc-query; dct:description "Key-value Info card for a sample record ('partid') of the MVIKG knowledge graph: name, description, taxon, biome, the source article that mentions it, review status, the graph it is part of and its defining nanopub. Rows of absent fields are omitted. Only records signed by a current admin, maintainer or member of the mvikg space count, in their newest non-invalidated version; the review status is the latest npx:approvesOf / npx:disapprovesOf verdict of a current mvikg admin on that version (none: pending)."; dct:license ; rdfs:label "Get MVIKG sample info"; grlc:endpoint ; grlc:sparql """prefix rdf: prefix rdfs: prefix dct: prefix np: prefix npa: prefix npx: prefix gen: prefix sosa: prefix biolink: prefix mvikg: prefix obo: select ?Property_noheader ?Property_label (group_concat(replace(str(?val), '[\\r\\n]+', ' '); separator='\\n') as ?Value_multi_val_noheader) (group_concat(replace(str(?vallabel), '[\\r\\n]+', ' '); separator='\\n') as ?Value_label_multi) where { { select ?ord ?Property_noheader ?Property_label ?val (min(?vallabelRaw) as ?vallabel) where { { select ?dnp ?da (max(?verdict) as ?mv) where { service { select (group_concat(distinct ?pk; separator=' ') as ?memberKeys) (group_concat(distinct ?apk; separator=' ') as ?adminKeys) where { graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?sg . } graph ?sg { ?ri a gen:RoleInstantiation ; npa:forSpace ; npa:hasRoleType ?tier ; npa:forAgent ?agent . filter(?tier in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole)) ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?pk . bind(if(?tier = gen:AdminRole, ?pk, '') as ?apk) } } } graph npa:graph { ?dnp npx:introduces ?_partid_iri ; np:hasAssertion ?da ; dct:created ?ddate ; npa:hasValidSignatureForPublicKeyHash ?dpk . filter not exists { ?dinv npx:invalidates ?dnp ; npa:hasValidSignatureForPublicKeyHash ?dpk . } } filter(contains(?memberKeys, ?dpk)) optional { values ?vpred { npx:approvesOf npx:disapprovesOf } graph ?va { ?vagent ?vpred ?dnp . } graph npa:graph { ?vnp np:hasAssertion ?va ; dct:created ?vdate ; npa:hasValidSignatureForPublicKeyHash ?vpk . filter not exists { ?vinv npx:invalidates ?vnp ; npa:hasValidSignatureForPublicKeyHash ?vpk . } } filter(contains(?adminKeys, ?vpk)) bind(concat(str(?vdate), '>', if(?vpred = npx:disapprovesOf, 'd', 'a')) as ?verdict) } } group by ?dnp ?da ?ddate order by desc(?ddate) limit 1 } { select ?da ?ord ?Property_noheader ?Property_label ?val0 ?lab0 where { { graph ?da { ?_partid_iri rdfs:label ?v } bind(1 as ?ord) bind(rdfs:label as ?Property_noheader) bind('Name:' as ?Property_label) bind(str(?v) as ?val0) bind('' as ?lab0) } union { graph ?da { ?_partid_iri rdfs:comment ?v } bind(2 as ?ord) bind(rdfs:comment as ?Property_noheader) bind('Description:' as ?Property_label) bind(str(?v) as ?val0) bind('' as ?lab0) } union { graph ?da { ?_partid_iri biolink:in_taxon ?iri } bind(3 as ?ord) bind(biolink:in_taxon as ?Property_noheader) bind('Taxon:' as ?Property_label) bind(str(?iri) as ?val0) bind(replace(replace(str(?iri), '^.*[/#]', ''), '_', ':') as ?lab0) } union { graph ?da { ?_partid_iri biolink:in_taxon ?taxon . ?taxon mvikg:has_biome ?iri } bind(4 as ?ord) bind(mvikg:has_biome as ?Property_noheader) bind('Biome:' as ?Property_label) bind(str(?iri) as ?val0) bind(replace(replace(str(?iri), '^.*[/#]', ''), '_', ':') as ?lab0) } union { graph ?da { ?iri biolink:mentions ?_partid_iri } bind(5 as ?ord) bind(biolink:mentions as ?Property_noheader) bind('Source:' as ?Property_label) bind(str(?iri) as ?val0) bind(replace(str(?iri), '^.*[/#]', '') as ?lab0) } union { bind(7 as ?ord) bind(dct:isPartOf as ?Property_noheader) bind('Part of:' as ?Property_label) graph ?da { ?_partid_iri dct:isPartOf ?iri } bind(str(?iri) as ?val0) bind('MVIKG knowledge graph' as ?lab0) } } } union { bind(8 as ?ord) bind(npa:viaNanopub as ?Property_noheader) bind('Defined in:' as ?Property_label) bind('DNP' as ?val0) } union { bind(6 as ?ord) bind(npx:approvesOf as ?Property_noheader) bind('Review status:' as ?Property_label) bind('STATUS' as ?val0) } bind(if(?val0 = 'DNP', str(?dnp), if(?val0 = 'STATUS', if(!bound(?mv), '⏳ pending', if(strends(?mv, 'd'), '🚫 rejected', '✅ approved')), ?val0)) as ?val) bind(if(?val0 = 'DNP', substr(replace(str(?dnp), '^.*/np/', ''), 1, 10), if(?val0 = 'STATUS', '', ?lab0)) as ?vallabelRaw) } group by ?ord ?Property_noheader ?Property_label ?val } } group by ?ord ?Property_noheader ?Property_label order by ?ord""" . } sub:provenance { sub:assertion prov:wasAttributedTo orcid:0000-0002-1267-0234 . } sub:pubinfo { this: dct:created "2026-11-12T12:26:36.866+01:00"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-mvikg-sample-info; rdfs:label "Get MVIKG sample info"; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "KyG4SL0m48Ay7QUhD2zE2CUZreRK/u9FB1DfkLubDzaHcTp+Dy3lA+R0ZvS5Ob5c9RTc8d/Eq80czjZESP7J97hvChI4KXCdQegpuCbvnelB0BSJNxNO81rjoKV+YwpXiwnG06w0znmW50Cl2NsfW4mriQhJ9qgm/UKcC2OhL+o="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }