Skip to content

Commit

Permalink
Implemented figure F4 data. Fixes #58
Browse files Browse the repository at this point in the history
  • Loading branch information
bherr2 committed Oct 24, 2023
1 parent 372314d commit c9cd448
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
46 changes: 46 additions & 0 deletions data-processor/queries/figure-f4.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ASCTB-TEMP: <https://purl.org/ccf/ASCTB-TEMP_>
PREFIX CL: <http://purl.obolibrary.org/obo/CL_>
PREFIX FMA: <http://purl.org/sig/ont/fma/fma>
PREFIX UBERON: <http://purl.obolibrary.org/obo/UBERON_>
PREFIX ccf3d: <http://purl.org/ccf/latest/ccf.owl#>
PREFIX ccf: <http://purl.org/ccf/>
PREFIX ctpop: <https://cns-iu.github.io/hra-cell-type-populations-supporting-information/data/enriched_rui_locations.jsonld#>
PREFIX dc: <http://purl.org/dc/terms/>
PREFIX hubmap: <https://entity.api.hubmapconsortium.org/entities/>
PREFIX rui: <http://purl.org/ccf/1.5/>

# 3d ref organ | #meshes tagged with UBERON ID | total number of tissue blocks | sex | number of datasets
SELECT
?organId
?organ
?sex
(COUNT(DISTINCT(?refOrganAs)) as ?organ_as_count)
(COUNT(DISTINCT(?rui_location)) as ?rui_location_count)
(COUNT(DISTINCT(?dataset)) as ?dataset_count)
FROM ctpop:graph
WHERE {
GRAPH ctpop:graph {
?sample ccf:has_registration_location ?rui_location ;
ccf:generates_dataset ?dataset .

[] a ccf:SpatialPlacement ;
ccf:placement_for ?rui_location ;
ccf:placement_relative_to ?refOrgan .
}

GRAPH <https://purl.org/ccf/releases/2.2.1/ccf.owl> {
?refOrgan ccf:has_reference_organ ?refOrgan ;
ccf:representation_of ?organIri ;
ccf:organ_owner_sex ?sex .

?refOrganAs ccf:has_reference_organ ?refOrgan .

?organIri rdfs:label ?organ .
BIND(REPLACE(REPLACE(STR(?organIri), 'http://purl.obolibrary.org/obo/UBERON_', 'UBERON:'), 'http://purl.org/sig/ont/fma/fma', 'FMA:') as ?organId)
FILTER(?refOrganAs != ?refOrgan)
}
}
GROUP BY ?organId ?organ ?sex
ORDER BY ?organ ?sex
14 changes: 14 additions & 0 deletions data/reports/figure-f4.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
organId,organ,sex,organ_as_count,rui_location_count,dataset_count
FMA:57987,Set of lactiferous glands in right breast,Female,8,1,3
UBERON:0000955,brain,Female,104,1,1
UBERON:0000955,brain,Male,104,1,1
UBERON:0000948,heart,Male,16,16,52
UBERON:0000059,large intestine,Female,10,6,6
UBERON:0000059,large intestine,Male,10,24,24
UBERON:0004538,left kidney,Female,30,2,8
UBERON:0004538,left kidney,Male,26,11,28
UBERON:0000079,male reproductive system,Male,18,1,4
UBERON:0004539,right kidney,Female,28,6,11
UBERON:0004539,right kidney,Male,28,6,50
UBERON:0002108,small intestine,Female,10,8,8
UBERON:0002108,small intestine,Male,11,24,24

0 comments on commit c9cd448

Please sign in to comment.