Molgenis is an open-source platform for scientific data management and research. The name “Molgenis” is derived from “Molecular Genetics Information Systems.” It provides tools for researchers to design, capture, and share data in the field of molecular genetics and other related areas.

Molgenis is designed to facilitate the handling of large-scale, complex datasets in genomics and other biomedical research domains. It offers features such as data integration, data modeling, and data management. Researchers can use Molgenis to create databases, design forms for data entry, and perform data analysis.

At The Day Job, we’re using it as part of our oncology research infrastructure project to act as a source of truth for certain system information as we build out a distributed access platform to help scientists and doctors conduct their research.

Anyway, at time of writing, there wasn’t a PHP client library for it, so I quickly put one together. Have fun!

» Visit the project on Gitlab...

Just a quick one; first of all as a sign of life, I know I’ve been quiet of late, and second of all, to put out something that might be of use (albeit to a niche audience).

DOIs, or Digital Object Identifiers, are persistent identifiers for digital object for all sorts of things on the internet. Typically these are published documents, but they may also be things like datasets, workflows, images, etc.

I deal with these a fair amount at The Day Job, and often need to resolve these strings into something that returns metadata (title, author etc). Nice to be able to do this over an API.

Datacite, Crossref etc, who deal in DOIs, do provide their own resolution APIs, but only for items minted in their own namespaces, not the canonical set. DOI.org do provide a proxy, in order to resolve a doi to a location, but no obvious way of extracting metadata.

As it happens, there is a way of getting this data, with a little bit of Accept header witchcraft.

Anyway, to make it easier for you (and me), I wrote a library. Enjoy!

» Visit the project on Github...

So, another in a series of posts where I package up some code I often use into a reusable library, let me introduce a simple PHP library for creating virtual pages.

Virtual pages are pages on a website that are generated in code, and are sent to the client’s browser, but don’t correspond directly to a physical file. This process requires mod_rewrite on Apache, but similar functionality exists in other web servers.

Defining your endpoint

You must specify your endpoint, and then a handling function. This function can be anything callable; functions, methods or an enclosure.

\simple_page_handler\Page::create('my/page/', function($page, array $subpages) {
        // Your page handling code
});

Writing your endpoint handler

You then trigger the handled pages by writing a page handler, and then directing Apache to redirect unhandled requests to this endpoint.

Example endpoint:

try {
        if (!\simple_page_handler\Page::call(\simple_page_handler\Input::get('page'))) {
            \simple_page_handler\Page::set503();
            echo "Something went wrong.";
        }
} catch (Exception $e) {
    echo $e->getMessage();
}

And your redirect code:

# Redirect anything that isn't a real file to our example page handler
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^(.*)$ example_page_handler.php?page=$1 [QSA]

Hopefully this’ll be useful to someone!

» Visit the project on Github...