πΈ 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.