Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide distinctSubjects and distinctObjects for propertyPartition that are linked to classPartitions #24

Open
vemonet opened this issue Nov 12, 2024 · 0 comments

Comments

@vemonet
Copy link
Contributor

vemonet commented Nov 12, 2024

Right now distinctSubjects and distinctObjects are calculated only for propertyPartition that are not linked to classPartitions

Imo the most interesting info would be that in this endpoint there is, for example, 1000 distinct Pathways isPartOf 500 distinct AnatomicalEntities

This could be retrieved this way:

PREFIX up: <http://purl.uniprot.org/core/>
PREFIX void: <http://rdfs.org/ns/void#>
PREFIX void-ext: <http://ldf.fi/void-ext#>

SELECT DISTINCT ?subjectCount ?subjectClass ?prop ?objectClass ?objectCount ?objectDatatype
WHERE {
  {
    ?cp void:class ?subjectClass ;
        void:propertyPartition ?pp .
    ?pp void:property ?prop ;
        void:distinctSubjects ?subjectCount ;
        void:distinctObjects ?objectCount .
    OPTIONAL {
        {
            ?pp  void:classPartition [ void:class ?objectClass ] .
        	
        } UNION {
            ?pp void-ext:datatypePartition [ void-ext:datatype ?objectDatatype ] .
        }
    }
  } UNION {
    ?linkset void:subjectsTarget [ void:class ?subjectClass ] ;
      void:linkPredicate ?prop ;
      void:objectsTarget [ void:class ?objectClass ] .
  }
}

I could look into adding this if necessary @JervenBolleman let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant