Skip to content

Commit

Permalink
ensure biome hierarchical_field is not empty for root-tagged studies
Browse files Browse the repository at this point in the history
  • Loading branch information
SandyRogers committed Jan 3, 2024
1 parent 5852201 commit 6b40098
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion emgapi/management/commands/ebi_search_analysis_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def get_analysis_context(self, analysis: AnalysisJob):
logger.debug(f"Could not find IPS terms for {analysis.job_id}")
ips_annotation = None

biome_list = analysis.study.biome.lineage.split(":")[1:]
biome_list = analysis.study.biome.lineage.split(":")[1:] or ['root']
# to ensure there are no empty hierarchical fields

taxonomy_lists = []
if analysis_taxonomy:
Expand Down
2 changes: 1 addition & 1 deletion emgapi/management/commands/ebi_search_study_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def write_without_blank_lines(fp, string):

@staticmethod
def get_study_context(study: Study):
biome_list = study.biome.lineage.split(":")[1:]
biome_list = study.biome.lineage.split(":")[1:] or ['root']

return {
"study": study,
Expand Down

0 comments on commit 6b40098

Please sign in to comment.