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

Add SPARQL queries to get stats for manuscript #275

Open
5 tasks done
shawntanzk opened this issue Mar 18, 2022 · 4 comments
Open
5 tasks done

Add SPARQL queries to get stats for manuscript #275

shawntanzk opened this issue Mar 18, 2022 · 4 comments
Assignees

Comments

@shawntanzk
Copy link
Collaborator

shawntanzk commented Mar 18, 2022

In the BDSO manuscript

The current release (date) of the BDSO component (which PCL imports) contains X number of individuals, out of which X are clusters (individuals also include datasets), and X number of classes, out of which X have PCL namespace and X are cell types (classes also include genes and ns forest sets).

We need the following SPARQL queries:

  • number of individuals with PCL namespace (pcl_individual.sparql)
  • individuals that are clusters (pcl_cluster.sparql)
  • number classes (class-count-by-prefix.sparql)
  • number classes with PCL namespace (class-count-by-prefix.sparql)
  • number of cell types with PCL namespace (for this I assume that all cell types are subclassof native cell) [pcl-celltypes-count.sparql]
@shawntanzk shawntanzk self-assigned this Mar 18, 2022
@shawntanzk
Copy link
Collaborator Author

need help with individuals that are clusters
I think the way to do it is to select only those that have cluster ids (obo:PCL_0010059)
I've tried:

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX obo: <http://purl.obolibrary.org/obo/PCL_>

SELECT (COUNT (DISTINCT ?ind) as ?indcount)
WHERE {
    ?ind a owl:NamedIndividual ;
    <obo:PCL_0010059> ?cluster </obo:PCL_0010059>
  FILTER(isIRI(?ind) && (STRSTARTS(str(?ind), "http://purl.obolibrary.org/obo/PCL_")))
}

and

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX obo: <http://purl.obolibrary.org/obo/PCL_>

SELECT (COUNT (DISTINCT ?ind) as ?indcount)
WHERE {
    ?ind a owl:NamedIndividual ;
    ?ind obo:PCL_0010059 ?cluster
  FILTER(isIRI(?ind) && (STRSTARTS(str(?ind), "http://purl.obolibrary.org/obo/PCL_")))
}

and both don't work - I can copy the whole list of stuff with individuals, but im sure there is a better way?

@hkir-dev
Copy link
Contributor

Is this what we expect?

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX pcl: <http://purl.obolibrary.org/obo/PCL_>

SELECT (COUNT (DISTINCT ?ind) as ?indcount)
WHERE {
    ?ind a owl:NamedIndividual ;
    pcl:0010059 ?cluster.
  FILTER(isIRI(?ind) && (STRSTARTS(str(?ind), "http://purl.obolibrary.org/obo/PCL_")))
}

@shawntanzk
Copy link
Collaborator Author

shawntanzk commented Mar 18, 2022

lol ok, that makes sense, probably right, will change and do a test. Thanks :)

done, looks right

@shawntanzk
Copy link
Collaborator Author

will keep this ticket till inserted into manuscript

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

2 participants