https://w3id.org/np/RA_VlZ1Y9g2pGyPadCoqhjo-L7ZZx45e0ov8ObvO6dOek
.trig | .trig.txt | .jelly | .jelly.txt | .jsonld | .jsonld.txt | .nq | .nq.txt | .xml | .xml.txt
@prefix this: <https://w3id.org/np/RA_VlZ1Y9g2pGyPadCoqhjo-L7ZZx45e0ov8ObvO6dOek> .
@prefix sub: <https://w3id.org/np/RA_VlZ1Y9g2pGyPadCoqhjo-L7ZZx45e0ov8ObvO6dOek/> .
@prefix np: <http://www.nanopub.org/nschema#> .
@prefix grlc: <https://w3id.org/kpxl/grlc/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix nt: <https://w3id.org/np/o/ntemplate/> .
@prefix npx: <http://purl.org/nanopub/x/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix orcid: <https://orcid.org/> .
@prefix prov: <http://www.w3.org/ns/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 <https://creativecommons.org/licenses/by/4.0/>;
rdfs:label "Get MVIKG sample info";
grlc:endpoint <https://w3id.org/np/l/nanopub-query-1.1/repo/full>;
grlc:sparql """prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix dct: <http://purl.org/dc/terms/>
prefix np: <http://www.nanopub.org/nschema#>
prefix npa: <http://purl.org/nanopub/admin/>
prefix npx: <http://purl.org/nanopub/x/>
prefix gen: <https://w3id.org/kpxl/gen/terms/>
prefix sosa: <http://www.w3.org/ns/sosa/>
prefix biolink: <https://w3id.org/biolink/vocab/>
prefix mvikg: <http://example.org/mvikg/>
prefix obo: <http://purl.obolibrary.org/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 <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
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 <https://w3id.org/spaces/mvikg> ; 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 <https://creativecommons.org/licenses/by/4.0/>;
npx:embeds sub:get-mvikg-sample-info;
rdfs:label "Get MVIKG sample info";
nt:wasCreatedFromProvenanceTemplate <https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU>;
nt:wasCreatedFromPubinfoTemplate <https://w3id.org/np/RA-N4_kFxcruvBTlo1yJv29E4SLOXsx5KO_th69PprMrA>,
<https://w3id.org/np/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8>;
nt:wasCreatedFromTemplate <https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k> .
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 .
}