Skip to content

Commit

Permalink
Fix bugs on "no parent" report (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anita Caron authored Oct 3, 2023
1 parent 7d21215 commit 44f8f53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/ccf_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,7 @@ def no_parent(log_dict, cell_type, row_number):
unique_terms.add(next['name'])

if not check_id(current['id']) and (check_id(next['id']) or not check_id(next['id'])):
log_dict = no_parent(log_dict, current, row['rowNumber'])
if not check_id(next['id']):
log_dict = no_parent(log_dict, next, row['rowNumber'])
log_dict = no_parent(log_dict, next, row['rowNumber'])

# CT-AS RELATIONSHIP
if len(anatomical_structures) > 0 and len(cell_types) > 0:
Expand Down
3 changes: 2 additions & 1 deletion src/template_generation_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def generate_class_graph_template(ccf_tools_df :pd.DataFrame, log_dict: dict):
'percent_invalid_CT-CT_relationship': [0],
'percent_indirect_CT-CT_relationship': [0],
'number_of_CT-AS_relationships': [0],
'percent_invalid_CT-AS_relationship': [0]
'percent_invalid_CT-AS_relationship': [0],
'number_of_no_parent_relationships': [len(log_dict["no_parent"])],
}
seed = {'ID': 'ID', 'Label': 'LABEL', 'User_label': 'A skos:prefLabel',
'isa': 'SC %',
Expand Down

0 comments on commit 44f8f53

Please sign in to comment.