https://w3id.org/np/RAxTtlrSLrMkn2WNTK0GqfXdHCM_qXJLrRgKs0rXPIuN0
.trig | .trig.txt | .jelly | .jelly.txt | .jsonld | .jsonld.txt | .nq | .nq.txt | .xml | .xml.txt
@prefix this: <https://w3id.org/np/RAxTtlrSLrMkn2WNTK0GqfXdHCM_qXJLrRgKs0rXPIuN0> .
@prefix sub: <https://w3id.org/np/RAxTtlrSLrMkn2WNTK0GqfXdHCM_qXJLrRgKs0rXPIuN0/> .
@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-taxon-samples a grlc:grlc-query;
dct:description "Lists the sample records of the MVIKG knowledge graph that belong to a taxon ('partid'), with description, source article and review status. 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 samples of a taxon";
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 ?sample ?sample_label ?description ?source ?source_label ?status ?np ?np_label where {
{
select ?sample ?np (sample(?l) as ?sl) (sample(?c) as ?description) (sample(?src) as ?source) (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 ?a { ?sample biolink:in_taxon ?_partid_iri . ?sample a sosa:Sample ; dct:isPartOf <https://w3id.org/spaces/mvikg/r/kg> . }
graph npa:graph {
?np np:hasAssertion ?a ; npx:introduces ?sample ; dct:created ?date ;
npa:hasValidSignatureForPublicKeyHash ?pubkey .
filter not exists { ?inv npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }
}
filter(contains(?memberKeys, ?pubkey))
optional {
graph npa:graph {
?np2 npx:introduces ?sample ; dct:created ?date2 ; npa:hasValidSignatureForPublicKeyHash ?pubkey2 .
filter not exists { ?inv2 npx:invalidates ?np2 ; npa:hasValidSignatureForPublicKeyHash ?pubkey2 . }
}
filter(contains(?memberKeys, ?pubkey2) && concat(str(?date2), '>', str(?np2)) > concat(str(?date), '>', str(?np)))
}
filter(!bound(?np2))
optional { graph ?a { ?sample rdfs:label ?l } }
optional { graph ?a { ?sample rdfs:comment ?c } }
optional { graph ?a { ?src biolink:mentions ?sample } }
optional {
values ?vpred { npx:approvesOf npx:disapprovesOf }
graph ?va { ?vagent ?vpred ?np . }
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 ?sample ?np
}
bind(coalesce(str(?sl), replace(str(?sample), '^.*/np/', '')) as ?sample_label)
bind(replace(str(?source), '^.*[/#]', '') as ?source_label)
bind(if(!bound(?mv), '⏳ pending', if(strends(?mv, 'd'), ' rejected', '✅ approved')) as ?status)
bind('^' as ?np_label)
}
order by ?sample_label""" .
}
sub:provenance {
sub:assertion prov:wasAttributedTo orcid:0000-0002-1267-0234 .
}
sub:pubinfo {
this: dct:created "2026-11-12T13:26:12.606+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-taxon-samples;
rdfs:label "Get MVIKG samples of a taxon";
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 "CHct27z4AY42VLzYLhEIFJH91RAdiiz/LmthWTYPJKcXtC8w8Izwk2sfMV2lqjbyik312kcVcUxIyz5sqM6tMk7erAzPeXvbDFpuJIITFbrqjKgfD0Q/5ZuWv21Og3we+7VZLLwsEs0K7fOw1W5K4FvB02GTQ8jAAB9yyOw+8qM=";
npx:hasSignatureTarget this:;
npx:signedBy orcid:0000-0002-1267-0234 .
}