Skip to content

Commit e70b1f0

Browse files
authored
Merge pull request #396 from hubmapconsortium/Derek-Furst/datasets-prov-info-public
Derek furst/datasets prov info public
2 parents 5030f9d + 4cd57fc commit e70b1f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app_neo4j_queries.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,8 @@ def get_prov_info(neo4j_driver, param_dict, published_only):
10651065
the uuid of the desired dataset
10661066
"""
10671067
def get_individual_prov_info(neo4j_driver, dataset_uuid):
1068-
query = (f"MATCH (ds:Dataset {{uuid: '{dataset_uuid}'}})<-[:ACTIVITY_OUTPUT]-(a)<-[:ACTIVITY_INPUT]-(firstSample:Sample)<-[*]-(donor:Donor)"
1068+
query = (f"MATCH (ds:Dataset {{uuid: '{dataset_uuid}'}})<-[*]-(firstSample:Sample)<-[*]-(donor:Donor)"
1069+
f" WHERE (:Dataset)<-[]-()<-[]-(firstSample)"
10691070
f" WITH ds, COLLECT(distinct donor) AS DONOR, COLLECT(distinct firstSample) AS FIRSTSAMPLE"
10701071
f" OPTIONAL MATCH (ds)<-[*]-(metaSample:Sample)"
10711072
f" WHERE NOT metaSample.metadata IS NULL AND NOT TRIM(metaSample.metadata) = ''"

0 commit comments

Comments
 (0)