wikipathways / GPML2RDF

GPML2RDF converter
Apache License 2.0
4 stars 2 forks source link

Relevant ChEBI RDF in WP Endpoint #91

Closed DeniseSl22 closed 3 years ago

DeniseSl22 commented 4 years ago

@egonw Create Jenkins job for:

  1. Download full OWL file of ChEBI
  2. Perform SPARQL query to obtain all ChEBI IDs in WP
  3. Use ENanomapper Slimmer (?) to only retain ChEBI OWL which we have IDs for (and parent classes).
  4. Convert remaining ChEBI OWL to .ttl with Robot.
  5. Update the WP SPARQL endpoint with this ttl.
egonw commented 3 years ago

Implemented:

export ONTO=chebi
#rm -f *.owl
#rm -f *.owl.*
rm -f ${ONTO}.props*
rm -f ${ONTO}.iris*
wget https://raw.githubusercontent.com/enanomapper/ontologies/master/config/${ONTO}.props
wget -N `grep "owl=" ${ONTO}.props | cut -d'=' -f2`

echo "SELECT DISTINCT ?chebi WHERE { [] wp:bdbChEBI ?chebi }" > chebi.rq
curl -H "Accept: text/tab-separated-values" --data-urlencode query@chebi.rq -G http://sparql.wikipathways.org/sparql -o chebi.tsv
grep -v "\"chebi\"" chebi.tsv > chebi2.tsv
sed -i 's/"http:\/\/identifiers.org\/chebi\/CHEBI:/+U:http:\/\/purl.obolibrary.org\/obo\/CHEBI_/' chebi2.tsv
sed -i 's/\"//' chebi2.tsv
cp chebi2.tsv ${ONTO}.iris

wget -N https://github.com/enanomapper/slimmer/releases/download/v1.0.1/slimmer-1.0.1-jar-with-dependencies.jar
java -Dhttps.proxyHost=proxy.unimaas.nl -Dhttps.proxyPort=3128 -Dhttp.proxyHost=proxy.unimaas.nl -Dhttp.proxyPort=3128 -cp slimmer-1.0.1-jar-with-dependencies.jar com.github.enanomapper.Slimmer .

rapper -i rdfxml -o turtle chebi-slim.owl > chebi-slim.ttl
egonw commented 3 years ago

@marvinm2, can you update the SPARQL data loading procedure to load the chebi-slim.ttl into the SPARQL endpoint, plz?

egonw commented 3 years ago

@marvinm2, this was now done, right?

marvinm2 commented 3 years ago

Yes, it's in the endpoint!