Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
proccaserra authored Jul 18, 2024
0 parents commit 5515f17
Show file tree
Hide file tree
Showing 10 changed files with 188 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/dashboard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Run Dashboard
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'dashboard-config.yml'
- 'Makefile'
schedule:
# This will run at 05:48 on first day of the month in every month from January through December.
- cron: "48 5 1 1-12 *"
jobs:
dashboard:
runs-on: ubuntu-latest
container: obolibrary/odkfull:v1.3.1
strategy:
max-parallel: 1
steps:
- name: Checkout main branch
uses: actions/checkout@v3
- name: work around permission issue
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Clean directories
run: rm -rf dashboard ontologies && mkdir -p dashboard ontologies
- name: Prepare run
run: cp dashboard-config.yml /tools/OBO-Dashboard/dashboard-config.yml && cp -r sparql/ /tools/OBO-Dashboard/sparql
- name: Run dashboard
run: obodash -C dashboard-config.yml
- name: Copy results
run: cp -r /tools/OBO-Dashboard/dashboard/* dashboard/ && cp -r /tools/OBO-Dashboard/build/ontologies/* ontologies/
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: Update dashboard run
title: 'Update dashboard run'
body: |
Updates the Custom OBO Dashboard
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ontologies
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
dashboard/ ontologies/:
mkdir -p $@

.PRECIOUS: dependencies
dependencies:
#pip install networkx==2.6.2
echo "No dependencies needed."

.PRECIOUS: run_dashboard
run_dashboard: | dependencies dashboard/ ontologies/
obodash -C dashboard-config.yml
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Template repository to create Custom OBO Foundry Dashboard

Custom configuration at `dashboard-config.yml`

```yaml
...
ontologies:
custom:
- id: Ontology id
mirror_from: Link to the OWL file in your repository.
title: Ontology's title
contact:
email:
label:
orcid:
github:
description: Ontology's description
domain: Ontology's domain
homepage: Ontology's page
products:
- id:
dependencies:
- id:
tracker: Link to ontology's issue tracker
license:
url: License's url
label: License's label
preferredPrefix:
base_ns: Base namespaces
```
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-minimal
44 changes: 44 additions & 0 deletions dashboard-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
title: "OBO Dashboard"
description: "Dashboard for checking ontology quality. Under construction."
obo_score_weights:
no_base:
impact_factor: 5
max_impact: 5
overall_error:
impact_factor: 5
max_impact: 20
overall_warning:
impact_factor: 0.5
max_impact: 10
overall_info:
impact_factor: 0.1
max_impact: 5
report_errors:
impact_factor: 0.05
max_impact: 10
report_warning:
impact_factor: 0.01
max_impact: 5
report_info:
impact_factor: 0.005
max_impact: 3
impact:
impact_factor: 1
max_impact: 1
dashboard:
impact_factor: 1
max_impact: 1
ontologies:
custom:
- id: tmp
mirror_from: "https://raw.githubusercontent.com/monarch-ebi-dev/robot_tests/master/custom-dashboard.owl"
prefer_base: True
profile:
baseprofile: "https://raw.githubusercontent.com/ontodev/robot/master/robot-core/src/main/resources/report_profile.txt"
custom:
- "WARN\tfile:./sparql/missing_xrefs.sparql"
report_truncation_limit: 600
redownload_after_hours: 0
environment:
ROBOT_JAR: /tools/robot.jar
ROBOT: robot
5 changes: 5 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Welcome to the Custom OBO Foundry Dashboard



[Dashboard](dashboard/index.html)
22 changes: 22 additions & 0 deletions odk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
# Wrapper script for docker.
#
# This is used primarily for wrapping the GNU Make workflow.
# Instead of typing "make TARGET", type "./run.sh make TARGET".
# This will run the make workflow within a docker container.
#
# The assumption is that you are working in the src/ontology folder;
# we therefore map the whole repo (../..) to a docker volume.
#
# See README-editors.md for more details.
#echo "WARNING USING ODK 1.2.30!"

docker run -e ROBOT_JAVA_ARGS='-Xmx4G' -e JAVA_OPTS='-Xmx4G' \
-v $PWD/dashboard:/tools/OBO-Dashboard/dashboard \
-v $PWD/dashboard-config.yml:/tools/OBO-Dashboard/dashboard-config.yml \
-v $PWD/Makefile:/work/Makefile \
-v $PWD/ontologies:/tools/OBO-Dashboard/build/ontologies \
-v $PWD/sparql:/tools/OBO-Dashboard/sparql \
-w /work --rm -ti obolibrary/odkfull:v1.3.1 "$@"

#echo "WARNING USING ODK 1.2.30!"
10 changes: 10 additions & 0 deletions run-dash.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

set -e

OBODASH="sh odk.sh "

rm -rf dashboard ontologies
mkdir -p dashboard ontologies
#$OBODASH refresh -B
$OBODASH make run_dashboard
27 changes: 27 additions & 0 deletions sparql/missing_xrefs.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX oboInOwl: <http://www.geneontology.org/formats/oboInOwl#>

SELECT DISTINCT ?entity ?property ?value WHERE {
VALUES ?property { oboInOwl:hasDbXref }
?entity ?any ?o .
FILTER NOT EXISTS { ?entity ?property ?value }
FILTER NOT EXISTS { ?entity a owl:Ontology }
FILTER NOT EXISTS { ?entity owl:deprecated true }
FILTER NOT EXISTS {
?entity rdfs:subPropertyOf oboInOwl:SubsetProperty .
}
FILTER EXISTS {
?entity ?prop2 ?object .
FILTER (?prop2 != rdf:type)
FILTER (?prop2 != owl:equivalentClass)
FILTER (?prop2 != owl:disjointWith)
FILTER (?prop2 != owl:equivalentProperty)
FILTER (?prop2 != owl:sameAs)
FILTER (?prop2 != owl:differentFrom)
FILTER (?prop2 != owl:inverseOf)
}
FILTER (!isBlank(?entity))
}
ORDER BY ?entity

0 comments on commit 5515f17

Please sign in to comment.