Skip to content

Commit

Permalink
#313 #287 #281 use CI to test very mini build (only fastest ETL); tes…
Browse files Browse the repository at this point in the history
…t reporting of semmed exclusion
  • Loading branch information
ecwood committed Jul 18, 2023
1 parent 1489445 commit acdf781
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,10 @@ jobs:
bash -x ./build-kg2-snakemake.sh all -R_Merge -n nodes ci
bash -x ./build-kg2-snakemake.sh all -R_Finish -n nodes ci
bash -x ./build-kg2-snakemake.sh all -F -n nodes ci
- name: Test Building One File
run: |
cd /home/runner/work/RTX-KG2/RTX-KG2/RTX-KG2
bash -x ./extract-mirbase.sh ~/kg2-build/miRNA.dat
~/kg2-venv/bin/python3 -u mirbase_dat_to_kg_json.py ~/kg2-build/miRNA.dat ~/kg2-build/kg2-mirbase.json --test
~/kg2-venv/bin/python3 -u report_stats_on_json_kg.py ~/kg2-build/kg2-mirbase.json ~/kg2-build/kg2-mirbase-report.json
cat ~/kg2-build/kg2-mirbase-report.json
18 changes: 18 additions & 0 deletions report_stats_on_json_kg.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,24 @@ def get_deprecated_nodes(nodes: list):

return deprecated_nodes


def get_excluded_nodes(nodes: list):
excluded_nodes = dict()
provided_by_label = 'provided_by'
excluded_label = 'domain_range_exclusion'

for node in nodes:
source = node[provided_by_label][0]
excluded = node[excluded_label]

if excluded:
if source not in excluded_nodes:
excluded_nodes[source] = 0
excluded_nodes[source] += 1

return excluded_nodes


def count_orphan_nodes(nodes: list, edges: list):
orphan_nodes = dict()
provided_by_label = 'provided_by'
Expand Down

0 comments on commit acdf781

Please sign in to comment.