Skip to content
Galaxy-E webhook developped during H2020 GAPARS project for SPIPOLL citizen science project Flash protocol for Hoverflies sex recognition
HTML Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

GAPARS_Galaxy webhook

This repo is the first Galaxy webhook created thanks to the GAPARS H2020 project allowing to create connection between the MMOS (Massively Multi Online Science) portal and SPIPOLL project so Galaxy can display a fly picture that the user can classify, here, for SPIPOLL Flash protocol, task is to try recognizing male or female hoverflies.

A big thank to Helena Rasche particularly but Freiburg Galaxy team and Galaxy community who allow this to become reality!


pip install -r requirements.txt

Obtaining a Task


I receive this stdout:

{'description': 'Massively Multiplayer Online Science - Citizen Science Server '
                'API 2, © 2015-2017 MMOS Sàrl',
 'homepage': '',
 'name': 'mmos-api-2',
 'stats': {'architecture': 'x64',
           'nodeEnv': 'depo',
           'nodeVersion': 'v10.16.0',
           'platform': 'linux',
           'uptime': 863153.721,
           'uptimeFriendly': '10 days',
           'uptimeSince': '2019-08-23T11:57:48.550Z'},
 'version': '2.7.42'}

{ statusCode: 201,
   { uid: '81e5fe2a-d6cc-45ca-8bf0-688dea7b0c47-1559059164041',
     game: 'yvan-le-bras-mnhn-fr',
     player: { code: 'YVAN001', accountCode: 'YVAN001' },
      { id: 10000101,
        run: 1,
        project: 'spipoll-fly',
        isTrainingSet: true,
        difficulty: 1,
        assets: [Object] } } }
{ url:
   '' }

Where the URL allows to download the picture and display it


So idea is to use this on 2 different manners:

  • first, to display a randomizely selected picture of fly once a galaxy user submitted a job using webhook functionality in the same spirit than you made with PhDcomics
  • second, to import a picture into a Galaxy history, so the user can use bioimaging tools inside Galaxy to treat / analyse the picture and send the results back to MMOS. Here we will use a "classical Galaxy tool" to get picture and another one to send analysis results

The next step will be to make similar work to allow the Galaxy user to send its task answer to MMOS through the MMOS API api.classifications.create function. Here we are working on the index.js.classification file

This assumes you have saved the create task timestamp in task.created, and that the result variable corresponds to it's validation schema (attached), essentially, your result variable should be one of the following: ["female", "likelyFemale", "cantSee", "likelyMale", "male"] Please note it's case sensitive.

So the idea is :

  • using the "task:create" function (through index.js), Galaxy can display a bee picture
  • the user has to clic on one of the answer possibilities ("female", "likelyFemale", "cantSee", "likelyMale", "male"), the selected answer is stored in task.created.
  • the "classification" funtion is "called" (through index.js.classification) and give the answer, for example "female", to MMOS portal.
You can’t perform that action at this time.