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

Refactor and improve kb_tests.py #270

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Refactor and improve kb_tests.py #270

wants to merge 3 commits into from

Conversation

hkir-dev
Copy link
Contributor

@hkir-dev hkir-dev commented Aug 3, 2022

Related with issue #267

  • Logging improved. Json formatted test results are written to a report file and simplified test results are printed to the console
  • A new cli interface that enable users to define datasets added:
python -m uk.ac.ebi.vfb.neo4j.neo2neo.kb_tests_runner -k http://kb.virtualflybrain.org -u neo4j -p vfb -d Yu2013 -d Cachero2010

@hkir-dev
Copy link
Contributor Author

hkir-dev commented Aug 3, 2022

Example report output is as follows:

Test Progress: 100%|████████████████████| 110/110

Failed Tests:          6/515    (1%)
Failed Datasets:       3/110    (2%)
Empty Datasets:        7/110    (6%)
Successful Datasets:   100/110          (90%)

=== Failed Datasets:

Dataset: Cachero2010

        Testing assertion: All anatomical individuals in dataset are typed.
        1 of total 119 individuals failed. First 5 failing individuals are: ['VFB_00017893']
        MATCH (ds:DataSet)<-[:has_source]-(i:Individual)-[:INSTANCEOF]->(c:Class) WHERE ds.short_form = 'Cachero2010' RETURN COUNT (DISTINCT i) as ind_count, COLLECT(i.short_form) as ind_list

Dataset: CostaJefferis_v2

        Testing assertion: All anatomical individuals in dataset have matching channel individuals.
        604 of total 604 individuals failed. First 5 failing individuals are: ['VFB_00016303', 'VFB_00016495', 'VFB_00016293', 'VFB_00016428', 'VFB_00016572']
        MATCH (ds:DataSet)<-[:has_source]-(i:Individual)<-[:depicts]-(j:Individual) WHERE ds.short_form = 'CostaJefferis_v2' RETURN COUNT (DISTINCT i) as ind_count, COLLECT(i.short_form) as ind_list

        Testing assertion: All anatomical individuals in dataset have matching registered channel individuals.
        604 of total 604 individuals failed. First 5 failing individuals are: ['VFB_00016303', 'VFB_00016495', 'VFB_00016293', 'VFB_00016428', 'VFB_00016572']
        MATCH (ds:DataSet)<-[:has_source]-(i:Individual)<-[:depicts]-(j:Individual)-[in_register_with]->(k:Individual) WHERE ds.short_form = 'CostaJefferis_v2' RETURN COUNT (DISTINCT i) as ind_count, COLLECT(i.short_form) as ind_list

        Testing assertion: All anatomical individuals in dataset have matching channel individuals with imaging method.
        604 of total 604 individuals failed. First 5 failing individuals are: ['VFB_00016303', 'VFB_00016495', 'VFB_00016293', 'VFB_00016428', 'VFB_00016572']
        MATCH (ds:DataSet)<-[:has_source]-(i:Individual)<-[:depicts]-(j:Individual)-[:is_specified_output_of]->(:Class) WHERE ds.short_form = 'CostaJefferis_v2' RETURN COUNT (DISTINCT i) as ind_count, COLLECT(i.short_form) as ind_list

        Testing assertion: All anatomical individuals in dataset have matching channel, typed individuals
        604 of total 604 individuals failed. First 5 failing individuals are: ['VFB_00016303', 'VFB_00016495', 'VFB_00016293', 'VFB_00016428', 'VFB_00016572']
        MATCH (ds:DataSet)<-[:has_source]-(i:Individual)<-[:depicts]-(j:Individual)-[:INSTANCEOF]->(c:Class { label: 'channel'}) WHERE ds.short_form = 'CostaJefferis_v2' RETURN COUNT (DISTINCT i) as ind_count, COLLECT(i.short_form) as ind_list

Dataset: Dickson2017

        Testing assertion: All anatomical individuals in dataset are typed.
        1 of total 5387 individuals failed. First 5 failing individuals are: ['VFB_00068747']
        MATCH (ds:DataSet)<-[:has_source]-(i:Individual)-[:INSTANCEOF]->(c:Class) WHERE ds.short_form = 'Dickson2017' RETURN COUNT (DISTINCT i) as ind_count, COLLECT(i.short_form) as ind_list

=== Empty Datasets:

  - Tsubouchi2017
  - LateralHorn2019
  - SplitDavis2017
  - Valdes-Aleman2021
  - SplitTurner_Evans2017
  - HeadMusclesMcKellar2020
  - McKellar2019

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

Successfully merging this pull request may close these issues.

2 participants