Nanopublication

< Home

ID

https://w3id.org/np/RAWbhxxCFTwoe9JEHlZuCoI31hEM4HvmOr-FEPDef-lOY

Formats

.trig | .trig.txt | .jelly | .jelly.txt | .jsonld | .jsonld.txt | .nq | .nq.txt | .xml | .xml.txt

Content

@prefix this: <https://w3id.org/np/RAWbhxxCFTwoe9JEHlZuCoI31hEM4HvmOr-FEPDef-lOY> .
@prefix sub: <https://w3id.org/np/RAWbhxxCFTwoe9JEHlZuCoI31hEM4HvmOr-FEPDef-lOY/> .
@prefix np: <http://www.nanopub.org/nschema#> .
@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 skos: <http://www.w3.org/2004/02/skos/core#> .
@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-kg-landscape-svg a <https://w3id.org/kpxl/grlc/grlc-query>;
    dct:description "Count-only landscape figure for mvikg/r/kg: the number of currently-approved samples, variants and phenotypes, and the number of approved cross-type associations among them (sample-variant via the shared gene, variant-phenotype via mvikg:isAssociatedWithVariant, sample-phenotype via sosa:isResultOf). Returns one row with a single ready-to-embed svg column; no geometric area-proportional layout, just three labelled circles with the counts written on them.";
    dct:license <https://creativecommons.org/licenses/by/4.0/>;
    rdfs:label "Get mvikg/r/kg landscape SVG";
    <https://w3id.org/kpxl/grlc/endpoint> <https://w3id.org/np/l/nanopub-query-1.1/repo/full>;
    <https://w3id.org/kpxl/grlc/sparql> """prefix npa: <http://purl.org/nanopub/admin/>
prefix gen: <https://w3id.org/kpxl/gen/terms/>
prefix npx: <http://purl.org/nanopub/x/>
prefix dct: <http://purl.org/dc/terms/>
prefix sosa: <http://www.w3.org/ns/sosa/>
prefix biolink: <https://w3id.org/biolink/vocab/>
prefix mvikg: <http://example.org/mvikg/>

select ?svg where {

  {
    select (count(distinct ?sampleThing) as ?nSample) where {
      
      graph ?da_s { ?sampleThing a <http://www.w3.org/ns/sosa/Sample> ; dct:isPartOf <https://w3id.org/spaces/mvikg/r/kg> . }
      bind(iri(replace(str(?da_s), '/assertion$', '')) as ?dnp_s)
      graph ?vda_s { ?admin_s ?verdictPred_s ?dnp_s . filter(?verdictPred_s in (npx:approvesOf, npx:disapprovesOf)) }
      filter(exists {
        service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
          graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g_s . }
          graph ?g_s { ?ri_s a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin_s ; npa:hasRoleType gen:AdminRole . }
        }
      })
      bind(iri(replace(str(?vda_s), '/assertion$', '')) as ?vnp_s)
      graph ?vpi_s { ?vnp_s dct:created ?vcreatedRaw_s . }
      bind(xsd:dateTime(?vcreatedRaw_s) as ?vcreated_s)
      filter not exists {
        graph ?vda2_s { ?admin2_s ?verdictPred2_s ?dnp_s . filter(?verdictPred2_s in (npx:approvesOf, npx:disapprovesOf)) }
        filter(exists {
          service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
            graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g2_s . }
            graph ?g2_s { ?ri2_s a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin2_s ; npa:hasRoleType gen:AdminRole . }
          }
        })
        bind(iri(replace(str(?vda2_s), '/assertion$', '')) as ?vnp2_s)
        graph ?vpi2_s { ?vnp2_s dct:created ?vcreated2Raw_s . }
        filter(xsd:dateTime(?vcreated2Raw_s) > ?vcreated_s)
      }
      filter(?verdictPred_s = npx:approvesOf)

    }
  }

  {
    select (count(distinct ?variantThing) as ?nVariant) where {
      
      graph ?da_v { ?variantThing a <https://w3id.org/biolink/vocab/SequenceVariant> ; dct:isPartOf <https://w3id.org/spaces/mvikg/r/kg> . }
      bind(iri(replace(str(?da_v), '/assertion$', '')) as ?dnp_v)
      graph ?vda_v { ?admin_v ?verdictPred_v ?dnp_v . filter(?verdictPred_v in (npx:approvesOf, npx:disapprovesOf)) }
      filter(exists {
        service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
          graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g_v . }
          graph ?g_v { ?ri_v a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin_v ; npa:hasRoleType gen:AdminRole . }
        }
      })
      bind(iri(replace(str(?vda_v), '/assertion$', '')) as ?vnp_v)
      graph ?vpi_v { ?vnp_v dct:created ?vcreatedRaw_v . }
      bind(xsd:dateTime(?vcreatedRaw_v) as ?vcreated_v)
      filter not exists {
        graph ?vda2_v { ?admin2_v ?verdictPred2_v ?dnp_v . filter(?verdictPred2_v in (npx:approvesOf, npx:disapprovesOf)) }
        filter(exists {
          service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
            graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g2_v . }
            graph ?g2_v { ?ri2_v a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin2_v ; npa:hasRoleType gen:AdminRole . }
          }
        })
        bind(iri(replace(str(?vda2_v), '/assertion$', '')) as ?vnp2_v)
        graph ?vpi2_v { ?vnp2_v dct:created ?vcreated2Raw_v . }
        filter(xsd:dateTime(?vcreated2Raw_v) > ?vcreated_v)
      }
      filter(?verdictPred_v = npx:approvesOf)

    }
  }

  {
    select (count(distinct ?phenoThing) as ?nPheno) where {
      
      graph ?da_p { ?phenoThing a <https://w3id.org/biolink/vocab/PhenotypicFeature> ; dct:isPartOf <https://w3id.org/spaces/mvikg/r/kg> . }
      bind(iri(replace(str(?da_p), '/assertion$', '')) as ?dnp_p)
      graph ?vda_p { ?admin_p ?verdictPred_p ?dnp_p . filter(?verdictPred_p in (npx:approvesOf, npx:disapprovesOf)) }
      filter(exists {
        service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
          graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g_p . }
          graph ?g_p { ?ri_p a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin_p ; npa:hasRoleType gen:AdminRole . }
        }
      })
      bind(iri(replace(str(?vda_p), '/assertion$', '')) as ?vnp_p)
      graph ?vpi_p { ?vnp_p dct:created ?vcreatedRaw_p . }
      bind(xsd:dateTime(?vcreatedRaw_p) as ?vcreated_p)
      filter not exists {
        graph ?vda2_p { ?admin2_p ?verdictPred2_p ?dnp_p . filter(?verdictPred2_p in (npx:approvesOf, npx:disapprovesOf)) }
        filter(exists {
          service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
            graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g2_p . }
            graph ?g2_p { ?ri2_p a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin2_p ; npa:hasRoleType gen:AdminRole . }
          }
        })
        bind(iri(replace(str(?vda2_p), '/assertion$', '')) as ?vnp2_p)
        graph ?vpi2_p { ?vnp2_p dct:created ?vcreated2Raw_p . }
        filter(xsd:dateTime(?vcreated2Raw_p) > ?vcreated_p)
      }
      filter(?verdictPred_p = npx:approvesOf)

    }
  }

  {
    select (count(distinct ?variantThing) as ?nSampleVariant) where {
      
      graph ?da_sv_s { ?sampleThing a <http://www.w3.org/ns/sosa/Sample> ; dct:isPartOf <https://w3id.org/spaces/mvikg/r/kg> . }
      bind(iri(replace(str(?da_sv_s), '/assertion$', '')) as ?dnp_sv_s)
      graph ?vda_sv_s { ?admin_sv_s ?verdictPred_sv_s ?dnp_sv_s . filter(?verdictPred_sv_s in (npx:approvesOf, npx:disapprovesOf)) }
      filter(exists {
        service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
          graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g_sv_s . }
          graph ?g_sv_s { ?ri_sv_s a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin_sv_s ; npa:hasRoleType gen:AdminRole . }
        }
      })
      bind(iri(replace(str(?vda_sv_s), '/assertion$', '')) as ?vnp_sv_s)
      graph ?vpi_sv_s { ?vnp_sv_s dct:created ?vcreatedRaw_sv_s . }
      bind(xsd:dateTime(?vcreatedRaw_sv_s) as ?vcreated_sv_s)
      filter not exists {
        graph ?vda2_sv_s { ?admin2_sv_s ?verdictPred2_sv_s ?dnp_sv_s . filter(?verdictPred2_sv_s in (npx:approvesOf, npx:disapprovesOf)) }
        filter(exists {
          service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
            graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g2_sv_s . }
            graph ?g2_sv_s { ?ri2_sv_s a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin2_sv_s ; npa:hasRoleType gen:AdminRole . }
          }
        })
        bind(iri(replace(str(?vda2_sv_s), '/assertion$', '')) as ?vnp2_sv_s)
        graph ?vpi2_sv_s { ?vnp2_sv_s dct:created ?vcreated2Raw_sv_s . }
        filter(xsd:dateTime(?vcreated2Raw_sv_s) > ?vcreated_sv_s)
      }
      filter(?verdictPred_sv_s = npx:approvesOf)

      
      graph ?da_sv_v { ?variantThing a <https://w3id.org/biolink/vocab/SequenceVariant> ; dct:isPartOf <https://w3id.org/spaces/mvikg/r/kg> . }
      bind(iri(replace(str(?da_sv_v), '/assertion$', '')) as ?dnp_sv_v)
      graph ?vda_sv_v { ?admin_sv_v ?verdictPred_sv_v ?dnp_sv_v . filter(?verdictPred_sv_v in (npx:approvesOf, npx:disapprovesOf)) }
      filter(exists {
        service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
          graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g_sv_v . }
          graph ?g_sv_v { ?ri_sv_v a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin_sv_v ; npa:hasRoleType gen:AdminRole . }
        }
      })
      bind(iri(replace(str(?vda_sv_v), '/assertion$', '')) as ?vnp_sv_v)
      graph ?vpi_sv_v { ?vnp_sv_v dct:created ?vcreatedRaw_sv_v . }
      bind(xsd:dateTime(?vcreatedRaw_sv_v) as ?vcreated_sv_v)
      filter not exists {
        graph ?vda2_sv_v { ?admin2_sv_v ?verdictPred2_sv_v ?dnp_sv_v . filter(?verdictPred2_sv_v in (npx:approvesOf, npx:disapprovesOf)) }
        filter(exists {
          service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
            graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g2_sv_v . }
            graph ?g2_sv_v { ?ri2_sv_v a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin2_sv_v ; npa:hasRoleType gen:AdminRole . }
          }
        })
        bind(iri(replace(str(?vda2_sv_v), '/assertion$', '')) as ?vnp2_sv_v)
        graph ?vpi2_sv_v { ?vnp2_sv_v dct:created ?vcreated2Raw_sv_v . }
        filter(xsd:dateTime(?vcreated2Raw_sv_v) > ?vcreated_sv_v)
      }
      filter(?verdictPred_sv_v = npx:approvesOf)

      graph ?gda { ?gene sosa:isFeatureOfInterestOf ?sampleThing ; biolink:has_sequence_variant ?variantThing . }
    }
  }

  {
    select (count(distinct ?phenoThing) as ?nVariantPheno) where {
      
      graph ?da_vp_v { ?variantThing a <https://w3id.org/biolink/vocab/SequenceVariant> ; dct:isPartOf <https://w3id.org/spaces/mvikg/r/kg> . }
      bind(iri(replace(str(?da_vp_v), '/assertion$', '')) as ?dnp_vp_v)
      graph ?vda_vp_v { ?admin_vp_v ?verdictPred_vp_v ?dnp_vp_v . filter(?verdictPred_vp_v in (npx:approvesOf, npx:disapprovesOf)) }
      filter(exists {
        service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
          graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g_vp_v . }
          graph ?g_vp_v { ?ri_vp_v a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin_vp_v ; npa:hasRoleType gen:AdminRole . }
        }
      })
      bind(iri(replace(str(?vda_vp_v), '/assertion$', '')) as ?vnp_vp_v)
      graph ?vpi_vp_v { ?vnp_vp_v dct:created ?vcreatedRaw_vp_v . }
      bind(xsd:dateTime(?vcreatedRaw_vp_v) as ?vcreated_vp_v)
      filter not exists {
        graph ?vda2_vp_v { ?admin2_vp_v ?verdictPred2_vp_v ?dnp_vp_v . filter(?verdictPred2_vp_v in (npx:approvesOf, npx:disapprovesOf)) }
        filter(exists {
          service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
            graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g2_vp_v . }
            graph ?g2_vp_v { ?ri2_vp_v a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin2_vp_v ; npa:hasRoleType gen:AdminRole . }
          }
        })
        bind(iri(replace(str(?vda2_vp_v), '/assertion$', '')) as ?vnp2_vp_v)
        graph ?vpi2_vp_v { ?vnp2_vp_v dct:created ?vcreated2Raw_vp_v . }
        filter(xsd:dateTime(?vcreated2Raw_vp_v) > ?vcreated_vp_v)
      }
      filter(?verdictPred_vp_v = npx:approvesOf)

      
      graph ?da_vp_p { ?phenoThing a <https://w3id.org/biolink/vocab/PhenotypicFeature> ; dct:isPartOf <https://w3id.org/spaces/mvikg/r/kg> . }
      bind(iri(replace(str(?da_vp_p), '/assertion$', '')) as ?dnp_vp_p)
      graph ?vda_vp_p { ?admin_vp_p ?verdictPred_vp_p ?dnp_vp_p . filter(?verdictPred_vp_p in (npx:approvesOf, npx:disapprovesOf)) }
      filter(exists {
        service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
          graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g_vp_p . }
          graph ?g_vp_p { ?ri_vp_p a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin_vp_p ; npa:hasRoleType gen:AdminRole . }
        }
      })
      bind(iri(replace(str(?vda_vp_p), '/assertion$', '')) as ?vnp_vp_p)
      graph ?vpi_vp_p { ?vnp_vp_p dct:created ?vcreatedRaw_vp_p . }
      bind(xsd:dateTime(?vcreatedRaw_vp_p) as ?vcreated_vp_p)
      filter not exists {
        graph ?vda2_vp_p { ?admin2_vp_p ?verdictPred2_vp_p ?dnp_vp_p . filter(?verdictPred2_vp_p in (npx:approvesOf, npx:disapprovesOf)) }
        filter(exists {
          service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
            graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g2_vp_p . }
            graph ?g2_vp_p { ?ri2_vp_p a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin2_vp_p ; npa:hasRoleType gen:AdminRole . }
          }
        })
        bind(iri(replace(str(?vda2_vp_p), '/assertion$', '')) as ?vnp2_vp_p)
        graph ?vpi2_vp_p { ?vnp2_vp_p dct:created ?vcreated2Raw_vp_p . }
        filter(xsd:dateTime(?vcreated2Raw_vp_p) > ?vcreated_vp_p)
      }
      filter(?verdictPred_vp_p = npx:approvesOf)

      graph ?vpda { ?phenoThing mvikg:isAssociatedWithVariant ?variantThing . }
    }
  }

  {
    select (count(distinct ?phenoThing) as ?nSamplePheno) where {
      
      graph ?da_sp_s { ?sampleThing a <http://www.w3.org/ns/sosa/Sample> ; dct:isPartOf <https://w3id.org/spaces/mvikg/r/kg> . }
      bind(iri(replace(str(?da_sp_s), '/assertion$', '')) as ?dnp_sp_s)
      graph ?vda_sp_s { ?admin_sp_s ?verdictPred_sp_s ?dnp_sp_s . filter(?verdictPred_sp_s in (npx:approvesOf, npx:disapprovesOf)) }
      filter(exists {
        service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
          graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g_sp_s . }
          graph ?g_sp_s { ?ri_sp_s a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin_sp_s ; npa:hasRoleType gen:AdminRole . }
        }
      })
      bind(iri(replace(str(?vda_sp_s), '/assertion$', '')) as ?vnp_sp_s)
      graph ?vpi_sp_s { ?vnp_sp_s dct:created ?vcreatedRaw_sp_s . }
      bind(xsd:dateTime(?vcreatedRaw_sp_s) as ?vcreated_sp_s)
      filter not exists {
        graph ?vda2_sp_s { ?admin2_sp_s ?verdictPred2_sp_s ?dnp_sp_s . filter(?verdictPred2_sp_s in (npx:approvesOf, npx:disapprovesOf)) }
        filter(exists {
          service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
            graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g2_sp_s . }
            graph ?g2_sp_s { ?ri2_sp_s a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin2_sp_s ; npa:hasRoleType gen:AdminRole . }
          }
        })
        bind(iri(replace(str(?vda2_sp_s), '/assertion$', '')) as ?vnp2_sp_s)
        graph ?vpi2_sp_s { ?vnp2_sp_s dct:created ?vcreated2Raw_sp_s . }
        filter(xsd:dateTime(?vcreated2Raw_sp_s) > ?vcreated_sp_s)
      }
      filter(?verdictPred_sp_s = npx:approvesOf)

      
      graph ?da_sp_p { ?phenoThing a <https://w3id.org/biolink/vocab/PhenotypicFeature> ; dct:isPartOf <https://w3id.org/spaces/mvikg/r/kg> . }
      bind(iri(replace(str(?da_sp_p), '/assertion$', '')) as ?dnp_sp_p)
      graph ?vda_sp_p { ?admin_sp_p ?verdictPred_sp_p ?dnp_sp_p . filter(?verdictPred_sp_p in (npx:approvesOf, npx:disapprovesOf)) }
      filter(exists {
        service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
          graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g_sp_p . }
          graph ?g_sp_p { ?ri_sp_p a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin_sp_p ; npa:hasRoleType gen:AdminRole . }
        }
      })
      bind(iri(replace(str(?vda_sp_p), '/assertion$', '')) as ?vnp_sp_p)
      graph ?vpi_sp_p { ?vnp_sp_p dct:created ?vcreatedRaw_sp_p . }
      bind(xsd:dateTime(?vcreatedRaw_sp_p) as ?vcreated_sp_p)
      filter not exists {
        graph ?vda2_sp_p { ?admin2_sp_p ?verdictPred2_sp_p ?dnp_sp_p . filter(?verdictPred2_sp_p in (npx:approvesOf, npx:disapprovesOf)) }
        filter(exists {
          service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
            graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g2_sp_p . }
            graph ?g2_sp_p { ?ri2_sp_p a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin2_sp_p ; npa:hasRoleType gen:AdminRole . }
          }
        })
        bind(iri(replace(str(?vda2_sp_p), '/assertion$', '')) as ?vnp2_sp_p)
        graph ?vpi2_sp_p { ?vnp2_sp_p dct:created ?vcreated2Raw_sp_p . }
        filter(xsd:dateTime(?vcreated2Raw_sp_p) > ?vcreated_sp_p)
      }
      filter(?verdictPred_sp_p = npx:approvesOf)

      graph ?spda { ?phenoThing sosa:isResultOf ?sampleThing . }
    }
  }


  {
    select (count(distinct ?phenoThing) as ?nTriple) where {
      
      graph ?da_t_s { ?sampleThing a <http://www.w3.org/ns/sosa/Sample> ; dct:isPartOf <https://w3id.org/spaces/mvikg/r/kg> . }
      bind(iri(replace(str(?da_t_s), '/assertion$', '')) as ?dnp_t_s)
      graph ?vda_t_s { ?admin_t_s ?verdictPred_t_s ?dnp_t_s . filter(?verdictPred_t_s in (npx:approvesOf, npx:disapprovesOf)) }
      filter(exists {
        service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
          graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g_t_s . }
          graph ?g_t_s { ?ri_t_s a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin_t_s ; npa:hasRoleType gen:AdminRole . }
        }
      })
      bind(iri(replace(str(?vda_t_s), '/assertion$', '')) as ?vnp_t_s)
      graph ?vpi_t_s { ?vnp_t_s dct:created ?vcreatedRaw_t_s . }
      bind(xsd:dateTime(?vcreatedRaw_t_s) as ?vcreated_t_s)
      filter not exists {
        graph ?vda2_t_s { ?admin2_t_s ?verdictPred2_t_s ?dnp_t_s . filter(?verdictPred2_t_s in (npx:approvesOf, npx:disapprovesOf)) }
        filter(exists {
          service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
            graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g2_t_s . }
            graph ?g2_t_s { ?ri2_t_s a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin2_t_s ; npa:hasRoleType gen:AdminRole . }
          }
        })
        bind(iri(replace(str(?vda2_t_s), '/assertion$', '')) as ?vnp2_t_s)
        graph ?vpi2_t_s { ?vnp2_t_s dct:created ?vcreated2Raw_t_s . }
        filter(xsd:dateTime(?vcreated2Raw_t_s) > ?vcreated_t_s)
      }
      filter(?verdictPred_t_s = npx:approvesOf)

      
      graph ?da_t_v { ?variantThing a <https://w3id.org/biolink/vocab/SequenceVariant> ; dct:isPartOf <https://w3id.org/spaces/mvikg/r/kg> . }
      bind(iri(replace(str(?da_t_v), '/assertion$', '')) as ?dnp_t_v)
      graph ?vda_t_v { ?admin_t_v ?verdictPred_t_v ?dnp_t_v . filter(?verdictPred_t_v in (npx:approvesOf, npx:disapprovesOf)) }
      filter(exists {
        service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
          graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g_t_v . }
          graph ?g_t_v { ?ri_t_v a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin_t_v ; npa:hasRoleType gen:AdminRole . }
        }
      })
      bind(iri(replace(str(?vda_t_v), '/assertion$', '')) as ?vnp_t_v)
      graph ?vpi_t_v { ?vnp_t_v dct:created ?vcreatedRaw_t_v . }
      bind(xsd:dateTime(?vcreatedRaw_t_v) as ?vcreated_t_v)
      filter not exists {
        graph ?vda2_t_v { ?admin2_t_v ?verdictPred2_t_v ?dnp_t_v . filter(?verdictPred2_t_v in (npx:approvesOf, npx:disapprovesOf)) }
        filter(exists {
          service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
            graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g2_t_v . }
            graph ?g2_t_v { ?ri2_t_v a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin2_t_v ; npa:hasRoleType gen:AdminRole . }
          }
        })
        bind(iri(replace(str(?vda2_t_v), '/assertion$', '')) as ?vnp2_t_v)
        graph ?vpi2_t_v { ?vnp2_t_v dct:created ?vcreated2Raw_t_v . }
        filter(xsd:dateTime(?vcreated2Raw_t_v) > ?vcreated_t_v)
      }
      filter(?verdictPred_t_v = npx:approvesOf)

      
      graph ?da_t_p { ?phenoThing a <https://w3id.org/biolink/vocab/PhenotypicFeature> ; dct:isPartOf <https://w3id.org/spaces/mvikg/r/kg> . }
      bind(iri(replace(str(?da_t_p), '/assertion$', '')) as ?dnp_t_p)
      graph ?vda_t_p { ?admin_t_p ?verdictPred_t_p ?dnp_t_p . filter(?verdictPred_t_p in (npx:approvesOf, npx:disapprovesOf)) }
      filter(exists {
        service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
          graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g_t_p . }
          graph ?g_t_p { ?ri_t_p a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin_t_p ; npa:hasRoleType gen:AdminRole . }
        }
      })
      bind(iri(replace(str(?vda_t_p), '/assertion$', '')) as ?vnp_t_p)
      graph ?vpi_t_p { ?vnp_t_p dct:created ?vcreatedRaw_t_p . }
      bind(xsd:dateTime(?vcreatedRaw_t_p) as ?vcreated_t_p)
      filter not exists {
        graph ?vda2_t_p { ?admin2_t_p ?verdictPred2_t_p ?dnp_t_p . filter(?verdictPred2_t_p in (npx:approvesOf, npx:disapprovesOf)) }
        filter(exists {
          service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
            graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g2_t_p . }
            graph ?g2_t_p { ?ri2_t_p a gen:RoleInstantiation ; npa:forSpace <https://w3id.org/spaces/mvikg> ; npa:forAgent ?admin2_t_p ; npa:hasRoleType gen:AdminRole . }
          }
        })
        bind(iri(replace(str(?vda2_t_p), '/assertion$', '')) as ?vnp2_t_p)
        graph ?vpi2_t_p { ?vnp2_t_p dct:created ?vcreated2Raw_t_p . }
        filter(xsd:dateTime(?vcreated2Raw_t_p) > ?vcreated_t_p)
      }
      filter(?verdictPred_t_p = npx:approvesOf)

      graph ?tgda { ?gene <http://www.w3.org/ns/sosa/isFeatureOfInterestOf> ?sampleThing ; <https://w3id.org/biolink/vocab/has_sequence_variant> ?variantThing . }
      graph ?tpda { ?phenoThing mvikg:isAssociatedWithVariant ?variantThing ; sosa:isResultOf ?sampleThing . }
    }
  }

  bind(round(140 + 160*(?nSample/(?nSample + 5.0))) as ?wA) bind(320 as ?Ax2) bind(?Ax2 - ?wA as ?Ax1)
  bind(round(140 + 160*(?nVariant/(?nVariant + 5.0))) as ?wB) bind(280 as ?Bx1) bind(?Bx1 + ?wB as ?Bx2)
  bind(round(160 + 80*(?nPheno/(?nPheno + 5.0))) as ?hC) bind(140 as ?Cy1) bind(?Cy1 + ?hC as ?Cy2)
  bind(if(?nVariantPheno - ?nTriple > 0, ?nVariantPheno - ?nTriple, 0) as ?nVariantPhenoOnly)
  bind(if(?nSamplePheno - ?nTriple > 0, ?nSamplePheno - ?nTriple, 0) as ?nSamplePhenoOnly)
  bind(concat(
    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 600 400\" width=\"600\" height=\"400\">',
    '<desc>Count-only landscape of the mvikg knowledge graph: approved samples, variants and phenotypes, sized by count, with pairwise and triple association counts in their overlaps.</desc>',
    '<rect x=\"', str(?Ax1), '\" y=\"40\" width=\"', str(?wA), '\" height=\"160\" rx=\"12\" fill=\"#3C6DB0\" fill-opacity=\"0.18\" stroke=\"#3C6DB0\" stroke-width=\"1.5\"></rect>',
    '<rect x=\"', str(?Bx1), '\" y=\"40\" width=\"', str(?wB), '\" height=\"160\" rx=\"12\" fill=\"#C0392B\" fill-opacity=\"0.18\" stroke=\"#C0392B\" stroke-width=\"1.5\"></rect>',
    '<rect x=\"160\" y=\"', str(?Cy1), '\" width=\"280\" height=\"', str(?hC), '\" rx=\"12\" fill=\"#3F9E5C\" fill-opacity=\"0.18\" stroke=\"#3F9E5C\" stroke-width=\"1.5\"></rect>',
    '<text x=\"', str(?Ax1 + 20), '\" y=\"65\" font-size=\"13\" fill=\"#2f5488\">Samples (', str(?nSample), ')</text>',
    '<text x=\"', str(?Bx2 - 20), '\" y=\"65\" text-anchor=\"end\" font-size=\"13\" fill=\"#8a2d20\">Variants (', str(?nVariant), ')</text>',
    '<text x=\"300\" y=\"', str(?Cy2 - 15), '\" text-anchor=\"middle\" font-size=\"13\" fill=\"#2f7048\">Phenotypes (', str(?nPheno), ')</text>',
    '<text x=\"300\" y=\"90\" text-anchor=\"middle\" font-size=\"12\" fill=\"#333333\">n = ', str(?nSampleVariant), '</text>',
    '<text x=\"220\" y=\"170\" text-anchor=\"middle\" font-size=\"12\" fill=\"#333333\">n = ', str(?nSamplePhenoOnly), '</text>',
    '<text x=\"380\" y=\"170\" text-anchor=\"middle\" font-size=\"12\" fill=\"#333333\">n = ', str(?nVariantPhenoOnly), '</text>',
    '<text x=\"300\" y=\"170\" text-anchor=\"middle\" font-size=\"12\" fill=\"#333333\">n = ', str(?nTriple), '</text>',
    '</svg>'
  ) as ?svg)
}""" .
}

sub:provenance {
  sub:assertion prov:wasAttributedTo orcid:0009-0005-5515-1230 .
}

sub:pubinfo {
  this: dct:created "2026-11-09T15:36:16Z"^^xsd:dateTime;
    dct:creator orcid:0009-0005-5515-1230;
    dct:license <https://creativecommons.org/licenses/by/4.0/>;
    npx:embeds sub:get-kg-landscape-svg;
    npx:supersedes <https://w3id.org/np/RAMJWiSJ0GvaRcSSOAlm5yAKl4bSHVZDFiAYX2BRpfk7s>;
    rdfs:label "Get mvikg/r/kg landscape SVG";
    skos:changeNote "Redesigned as a count-only box-style landscape (rectangles, not circles), sized by each type's own count via a saturating curve so boxes never overflow the canvas regardless of scale. Fixed a real unit-mismatch bug: the original draft counted sample-variant links by distinct gene while counting the triple overlap by distinct phenotype, so 'pairwise minus triple' could go negative/nonsensical. Now sample-variant is counted by distinct variant (matching no subtraction, shown raw), and variant-phenotype/sample-phenotype/triple are all counted by distinct phenotype, so only those three subtractions are unit-consistent.";
    nt:wasCreatedFromProvenanceTemplate <https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU>;
    nt:wasCreatedFromPubinfoTemplate <https://w3id.org/np/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8>,
      <https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI>;
    nt:wasCreatedFromTemplate <https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k> .
  
  sub:sig npx:hasAlgorithm "RSA";
    npx:hasPublicKey "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjO3oH8Lq/l1oZIUY3FlCz5DnndybGvAhBdmEJ/yq7Nv3GZEYPrEro23rCBCp0GiriOXlVbk61pA/7JFE6tqzTresINW6QQMxE9sIhCBlX4cG66JFD8ud6bMvUyzCR8LQA6zfrSbafGE06rvglJd4MDUcTwvUKqtL9UCnOaowVfnZ3sPOe9EqlmJuO3iHGxBSXMPOPEJZUzMXsFDWFuMZTnrR8gY3r5nVF5a8L/MD135ZH8qW5yGXOB28CmVYCAbw2o07QEKzyzFKN+W1gfnprYZvuKzwGexnzcdzc1S8N/M5bzhWQ40EKCEqgUE8c81OzEMm1HUlUKEJ/o5I/FKKAwIDAQAB";
    npx:hasSignature "XHTVLFVocHKHrC1q53fnCI5ukR/POYl5K885ZZCvudLK+4DdWVt4OBGgMF7l8XBkSmLTmYNV2GSulwyH72C37pmHeJcAhzXHsrt1v+DbQ2UkTH7zjxebdUBOjuhAxHl7o+EY9KgS/J04yGg30MlvZUrJeeC7yFz/UjivrQ2KU8Jpt6GBo26cmo9+W15QQA1ZLOflhZurLD2vqqCpFv/kkNK2W/HaGoR6HQItSj8ITrC4r7xuwGwvYPW/VMWMANkOHy3NABbo+Zv3omW50W9qcH21Dm+zZ7lVuOV8cpCazPQ8B9dY0HmePKRm/lvj/csN2631unvJGH1yqVjBi6158g==";
    npx:hasSignatureTarget this:;
    npx:signedBy orcid:0009-0005-5515-1230 .
}