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

Update to wf_v7: sync in wf

parent d66753e7
No related branches found
No related tags found
2 merge requests!25Sync in 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.
......@@ -89,6 +89,7 @@ class DeploySpeciesStack(species_data.SpeciesData):
picture_dest_name = "species%s" % picture_path_extension
picture_dest_path = os.path.join(self.species_dir, picture_dest_name)
shutil.copy(self.picture_path, picture_dest_path)
logging.info("Add picture %s" % self.picture_path)
else:
logging.error("Specified organism picture has wrong extension (must be '.png' or '.jpg'): {0}".format(self.picture_path))
else:
......
......@@ -142,13 +142,21 @@ def get_sp_picture(sp_dict_list):
sp_picture_dict = {}
for sp in sp_dict_list:
gspecies = get_gspecies_string_from_sp_dict(sp)
if gspecies not in sp_picture_dict.keys() or ( constants.ORG_PARAM_DESC_MAIN_SPECIES in sp[constants.ORG_PARAM_DESC].keys() and
sp[constants.ORG_PARAM_DESC][constants.ORG_PARAM_DESC_MAIN_SPECIES] == True ):
sp_picture_dict[gspecies] = ""
genus_species = get_gspecies_string_from_sp_dict(sp)
if genus_species not in sp_picture_dict.keys() \
or (genus_species not in sp_picture_dict.keys()
and sp_picture_dict[genus_species] != "") \
or (constants.ORG_PARAM_DESC_MAIN_SPECIES in sp[constants.ORG_PARAM_DESC].keys()
and sp[constants.ORG_PARAM_DESC][constants.ORG_PARAM_DESC_MAIN_SPECIES] == True ) :
if constants.ORG_PARAM_DESC_PICTURE_PATH in sp[constants.ORG_PARAM_DESC].keys() and \
sp[constants.ORG_PARAM_DESC][constants.ORG_PARAM_DESC_PICTURE_PATH] != "":
sp_picture_dict[gspecies] = sp[constants.ORG_PARAM_DESC][constants.ORG_PARAM_DESC_PICTURE_PATH]
sp_picture_dict[genus_species] = sp[constants.ORG_PARAM_DESC][constants.ORG_PARAM_DESC_PICTURE_PATH]
else:
sp_picture_dict[genus_species] = ""
return sp_picture_dict
def get_sp_jbrowse_links(org_list):
......
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