πŸ›Έ Interact with Galaxy

Note

Most of the configuration for Galaxy goes through the Django admin of your application.

πŸ’» Galaxy instance

You first need to add your Galaxy instance in the admin panel.

Note

The path should be {root_address}/admin/django_to_galaxy/galaxyinstance/

πŸ‘€ Galaxy user

Then you can create the user you need to communication with galaxy. This is at this moment you specify you Galaxy API key.

Note

The path should be {root_address}/admin/django_to_galaxy/galaxyuser/

Django admin actions

From the admin panel of users, you have several actions to interact with the galaxy instances from the different users.

Create History

This create a history on the Galaxy instance for selected users. At the moment, the name is fixed but will be meaningful after this issue will be done.

Note

If you delete a history item on the django side, it will also delete it on galaxy side. We consider that every history used on the django side has to be created from django to be used.

Import Workflow(s)

Note

This action needs to be performed on one user only

It allows addition and import of workflows from the galaxy instance of the selected user:

  • Select one user (and only one)

  • Open list of actions and select Import workflow(s) (1 user only)

  • (Page takes few seconds to load) select workflow(s) to import from the list by checking the boxes

  • Click Import selected workflow(s)

  • That’s it!

πŸ“” History

API

Upload file to history

  • API endpoint: django_to_galaxy/api/upload_to_history/

  • In the payload of the API, you give the id of the history

  • For the file, you give a nested payload with: * model: the slug name of the model used by the app to store the file locally on Django * field_path: the field used for the file (either FileField or FilePathField) * id: the ID of the file to retrieve

Django admin actions

Synchronize data from Galaxy

It allows to synchronize the data in the django tables from the histories in Galaxy.

♻️ Workflow

Interact with workflow

How to invoke workflow from the terminal

At the moment, workflow can be invoked using python uniquely

Note

Here is the corresponding MR.

from django_to_galaxy.models import History, Workflow
# Retrieve your workflow and history
wf = Workflow.objects.get(galaxy_id="474fc4a321a8ef55")
h = History.objects.get(galaxy_id="bca59e65293f7341")
# Generate datamap
datamap = h.simplify_datasets[0].generate_datamap('0')
# Invoke
inv = wf.invoke(datamap, history=h)

⏳ Invocation

Django admin actions

Synchronize data from Galaxy

It allows to synchronize the data in the django tables from the histories in Galaxy.