The blog of a juvenile Geekus biologicus

Query a BioPAX ontology with DuckDB


Install DuckDB

pipx install duckdb

Download PathBank BioPAX files

Throughout this blog post, we will work with example BioPAX files from the pathbank database. I downloaded the BioPAX files from https://pathbank.org/downloads on <2026-09-28 Mon>, the announced date of generation is September 13, 2019.

Load the DuckDB rdf extension

duckdb
INSTALL rdf FROM community;
LOAD rdf;

How to load the content of a BioPAX file with DuckDB rdf extension?

I extracted the zip archive in ~/data/pathbank/pathbank_all_biopax/pathbank_all_biopax/.

…
Read more ⟶

How to load the PathwayCommons OWL file into a local QLever instance?


What are we talking about?

QLever (pronounced “clever”) is a graph database for RDF triplets supporting the SPARQL query language.

PathwayCommons is an initiative to gather multiple sources of metabolic pathways, from multiple databases, and merge them in a single entrypoint, using the standard BioPAX ontology. Pathway-Commons provides a compressed OWL file for each release, as well as an API.

What do we want to do?

The objective of this tutorial is to show how one can load the Pathway-Commons OWL file in a local QLever instance, for unlimited local SPARQL queries.

…
Read more ⟶

How to interface TidalCycle with LMMS via MIDI ?


TidalCycle is a livecoding environment enabling live performance of code-generated music. LMMS is a digital audio workstation software. Both are free-libre opensource softwares. TidalCycle typically use SuperCollider to generate audio based on the patterns of Tidal. We can also use any device that can handle MIDI input to generate sound from Tidal patterns.

Procedure

On SuperCollider window, open startup file (File > Open startup file), then add the following code:

MIDIClient.init;

In the section where SuperDirt server starts, add the following before the ~dirt.start command:

…
Read more ⟶

ob-exec


I created a generic Org-babel mode, named ob-exec. This emacs-lisp script enable to execute any executable on a code fragment within Org-mode.

How it works

ob-exec simply execute the code sample with the provided command-line

For example, suppose you want to use the command line glpsol of the GNU Linear Programming Kit on a Linear program encoded in MathProg. To the best of my knowledge, there is no org-babel mode for GLPK. It wouln’t be too difficult to build one, but suppose further that you feel lazy and want to execute GLPK solver directly. Then, you can insert the following source code in emacs:

…
Read more ⟶

Tent Game in Answer Set Programming


The Tent game is a logic puzzle on a square or rectangular grid. Each grid cell can have a tree, a tent or stay empty. <Nourry (2024)>

The following rules must be respected:

  • Tent can be placed on empty cells.
  • Each tent is attached to a tree placed on an adjacent cell.
  • A tree cannot be attached to more than one tent.
  • Two tents cannot be placed on adjacent, nor diagonal cells.
  • The number of tents on each row and column is specified.
  • Some cells are not accessible, no tent can be pitched there. <“Fiche: Jeux de Réflexion - Tentes” (n.d.);Nourry (2024)>

The aim of this article is to propose a implementation of the Tent game in Answer Set Programming.

…
Read more ⟶