Skip to content
Snippets Groups Projects
Commit 07d45756 authored by Loraine Gueguen's avatar Loraine Gueguen
Browse files

fix library_id

parent 9bbb7931
No related branches found
No related tags found
2 merge requests!24Run wf,!18Release v2.1.0
This commit is part of merge request !18. Comments created here will be created in the context of that merge request.
......@@ -86,8 +86,8 @@ class LoadData(speciesData.SpeciesData):
logging.info("Creating new %s library" % constants.GALAXY_LIBRARY_NAME)
prj_lib = gio.libraries.create(constants.GALAXY_LIBRARY_NAME, constants.GALAXY_LIBRARY_DESC)
self.library_id = prj_lib.id # project data folder/library
logging.info("Library for {0}: {1}".format(self.full_name, self.library_id))
library_id = prj_lib.id # project data folder/library
logging.info("Library for {0}: {1}".format(self.full_name, library_id))
for fname, files in folders.items():
if fname and files:
......
......@@ -8,6 +8,7 @@ import logging
import sys
import json
import time
from bioblend.galaxy.objects import GalaxyInstance
import utilities
import utilities_bioblend
......@@ -185,7 +186,16 @@ class RunWorkflowJbrowse(runWorkflowPhaeo.RunWorkflow):
transcripts_hda_id = None
proteins_hda_id = None
folder_dict_list = self.instance.libraries.get_folders(library_id=str(self.library_id))
gio = GalaxyInstance(url=self.instance_url,
email=self.config[constants.CONF_GALAXY_DEFAULT_ADMIN_EMAIL],
password=self.config[constants.CONF_GALAXY_DEFAULT_ADMIN_PASSWORD]
)
prj_lib = gio.libraries.get_previews(constants.GALAXY_LIBRARY_NAME)
if len(prj_lib) == 1:
library_id = prj_lib[0].id
else:
logging.error("Multiple (or no one) libraries '%s' exist" % constants.GALAXY_LIBRARY_NAME)
folder_dict_list = self.instance.libraries.get_folders(library_id=str(library_id))
folders_id_dict = {}
......
......@@ -140,4 +140,3 @@ class SpeciesData:
self.instance = None
self.history_id = None
self.history_name = str(self.genus_species)
self.library_id = None
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment