diff --git a/emgapi/management/commands/ebi_search_analysis_dump.py b/emgapi/management/commands/ebi_search_analysis_dump.py index cb49508f8..8bee0cfbf 100644 --- a/emgapi/management/commands/ebi_search_analysis_dump.py +++ b/emgapi/management/commands/ebi_search_analysis_dump.py @@ -59,7 +59,7 @@ def get_analysis_context(self, analysis: AnalysisJob): try: go_annotation: Optional[AnalysisJobGoTerm] = AnalysisJobGoTerm.objects.get( - pk=analysis.job_id + pk=str(analysis.job_id) ) except AnalysisJobGoTerm.DoesNotExist: logger.debug(f"Could not find go terms for {analysis.job_id}") @@ -67,7 +67,7 @@ def get_analysis_context(self, analysis: AnalysisJob): try: ips_annotation: Optional[AnalysisJobInterproIdentifier] = AnalysisJobInterproIdentifier.objects.get( - pk=analysis.job_id + pk=str(analysis.job_id) ) except AnalysisJobInterproIdentifier.DoesNotExist: logger.debug(f"Could not find IPS terms for {analysis.job_id}") @@ -203,10 +203,10 @@ def handle(self, *args, **options): ) ) - nowish = timezone.now() + timedelta(minutes=1) - # Small buffer into the future so that the indexing time remains ahead of auto-now updated times. + nowish = timezone.now() + timedelta(minutes=1) + # Small buffer into the future so that the indexing time remains ahead of auto-now updated times. - for analysis in analyses: - analysis.last_indexed = nowish + for analysis in page: + analysis.last_indexed = nowish - AnalysisJob.objects.bulk_update(analyses, fields=["last_indexed"]) + AnalysisJob.objects.bulk_update(page, fields=["last_indexed"]) diff --git a/emgapi/templates/ebi_search/analysis.xml b/emgapi/templates/ebi_search/analysis.xml index 578d24c12..f4ffcca1b 100644 --- a/emgapi/templates/ebi_search/analysis.xml +++ b/emgapi/templates/ebi_search/analysis.xml @@ -7,9 +7,10 @@ - assembly + {{ analysis.experiment_type.experiment_type }} {{ analysis.pipeline.release_version }} {{ analysis.sample.sample_name | escape }} + {{ analysis.sample.sample_desc | escape }} {{ analysis.study.study_name | escape }} {{ analysis.study.biome.biome_name | escape }} @@ -66,16 +67,26 @@ + {# biosample #} + {% if analysis.sample.primary_accession %} + + {% endif %} + + {# INSDC sample like DRSxx, ERSxx, SRSxx #} + {% if analysis.sample.accession and analysis.sample.accession|slice:"1:3" == "RS"%} + + {% endif %} + {# Assembly analysis #} - {% if analysis.assembly and analysis.assembly.accession|slice:":4" == "GCA_" %} - - + {% if analysis.assembly %} + {% endif %} {# WGS/Amplicon analysis #} {% if analysis.run %} {% endif %} + {% for go in analysis_go_entries %} {% endfor %} diff --git a/emgcli/__init__.py b/emgcli/__init__.py index ff3a98ea4..c6dbbedcb 100644 --- a/emgcli/__init__.py +++ b/emgcli/__init__.py @@ -1 +1 @@ -__version__: str = "2.4.40" +__version__: str = "2.4.41" diff --git a/pyproject.toml b/pyproject.toml index b6e97a4b9..54396e44e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,7 +117,7 @@ max-line-length = 119 """ [tool.bumpversion] -current_version = "2.4.40" +current_version = "2.4.41" [[tool.bumpversion.files]] filename = "emgcli/__init__.py"