ebi-ait / dcp-ingest-central

Central point of access for the Ingestion Service of the HCA DCP
Apache License 2.0
0 stars 0 forks source link

IGV does not recognise orphaned entities #943

Open ESapenaVentura opened 1 year ago

ESapenaVentura commented 1 year ago

Describe the bug The ingest graph validator does not properly recognise orphaned entities due to recent changes in ingest. Before, only certain entities were attached to projects - Now, biomaterials are linked to the project through the "PROJECTS" relationship, which has broken the test for No orphaned entities

To Reproduce Steps to reproduce the behaviour:

  1. Go to the ingest-graph-validator repository
  2. Follow the instructions in the README to clone the repository and install/run the ingest-graph validator
  3. Hydrate with this command: ingest-graph-validator hydrate ingest 27302955-dd62-445c-8ba8-ad6346f8998b (May take a while)
  4. Run the tests - More concretely, run the query in the no orphaned entities test
  5. Observe no matchs, but one of the donors is not actually linked to any other biomaterials so it should be returned

Expected behaviour There should be at least 1 error, informing the user that they have an orphaned biomaterial.

Proposed solution Since biomaterials are directly connected to the project, the easiest way is to change the query for this:

MATCH (n)
WHERE NOT EXISTS ((n)--(:process))
AND NOT (n:supplementary_file) 
AND NOT (n:process)
RETURN n, "Entity does not have linkings with any other entity", labels(n)

This assumes that the only other entities to not be related to processes are processes themselves.

Changing the query to search for any p

Environment

Browser

ESapenaVentura commented 1 year ago

https://github.com/ebi-ait/ingest-graph-validator/issues/83