From 2110e8b9219aa36d18da75b48fc04eb8c1597925 Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Sun, 17 Oct 2021 18:10:42 +0200 Subject: [PATCH 1/7] bump to rc --- Dockerfile | 2 +- anvio/__init__.py | 2 +- conda-recipe/anvio-minimal/meta.yaml | 2 +- conda-recipe/anvio/meta.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 38e9dd110e..6c86d6039a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ # FROM continuumio/miniconda3:4.9.2 -ENV ANVIO_VERSION "7" +ENV ANVIO_VERSION "7.1-rc" RUN conda config --env --add channels bioconda RUN conda config --env --add channels conda-forge diff --git a/anvio/__init__.py b/anvio/__init__.py index a07e51d10c..49a72682dd 100644 --- a/anvio/__init__.py +++ b/anvio/__init__.py @@ -15,7 +15,7 @@ # unless you want to explode `bottle`: import pkg_resources -anvio_version = '7-dev' +anvio_version = '7.1-rc' anvio_codename = 'hope' # after Hope E. Hopps, https://sivb.org/awards/student-awards/hope-e-hopps-award.html # see the release notes for details: https://github.com/merenlab/anvio/releases/tag/v7 diff --git a/conda-recipe/anvio-minimal/meta.yaml b/conda-recipe/anvio-minimal/meta.yaml index a0d61a77d5..f062fc415e 100644 --- a/conda-recipe/anvio-minimal/meta.yaml +++ b/conda-recipe/anvio-minimal/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "7" %} +{% set version = "7.1-rc" %} package: name: anvio-minimal diff --git a/conda-recipe/anvio/meta.yaml b/conda-recipe/anvio/meta.yaml index c5de9d2347..b2ce83432d 100644 --- a/conda-recipe/anvio/meta.yaml +++ b/conda-recipe/anvio/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "7" %} +{% set version = "7.1-rc" %} package: name: anvio From 2c17b465300582687c42443d6f8263b738573ff6 Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Mon, 18 Oct 2021 15:27:37 +0200 Subject: [PATCH 2/7] working versions --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4451809537..3d6fb89478 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,7 +15,7 @@ illumina-utils tabulate numba paste -pyani==0.2.10 -psutil==5.4.3 +pyani +psutil pandas==0.25.1 -snakemake==5.10.0 \ No newline at end of file +snakemake==5.10.0 From d8276c6d809fc5fdccbee20848e3c5ba91326e03 Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Tue, 19 Oct 2021 14:53:55 +0200 Subject: [PATCH 3/7] up --- Dockerfile | 2 +- anvio/__init__.py | 2 +- conda-recipe/anvio-minimal/meta.yaml | 9 +++------ conda-recipe/anvio/meta.yaml | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6c86d6039a..b09fea82db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ # FROM continuumio/miniconda3:4.9.2 -ENV ANVIO_VERSION "7.1-rc" +ENV ANVIO_VERSION "7.1" RUN conda config --env --add channels bioconda RUN conda config --env --add channels conda-forge diff --git a/anvio/__init__.py b/anvio/__init__.py index 813396b662..229d996606 100644 --- a/anvio/__init__.py +++ b/anvio/__init__.py @@ -15,7 +15,7 @@ # unless you want to explode `bottle`: import pkg_resources -anvio_version = '7.1-rc' +anvio_version = '7.1' anvio_codename = 'hope' # after Hope E. Hopps, https://sivb.org/awards/student-awards/hope-e-hopps-award.html # see the release notes for details: https://github.com/merenlab/anvio/releases/tag/v7 diff --git a/conda-recipe/anvio-minimal/meta.yaml b/conda-recipe/anvio-minimal/meta.yaml index f062fc415e..d7b3bf096f 100644 --- a/conda-recipe/anvio-minimal/meta.yaml +++ b/conda-recipe/anvio-minimal/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "7.1-rc" %} +{% set version = "7.1" %} package: name: anvio-minimal @@ -24,13 +24,10 @@ requirements: - pysam - ete3 - scipy - # the following prevents an openmp error first reported in - # merenlab/anvio#1489 that also occurs during conda bulid: - # https://github.com/bioconda/bioconda-recipes/pull/26014#issuecomment-753693842 - - scikit-learn >=0.23.2 + - scikit-learn - django - requests - - psutil ==5.4.3 + - psutil - mistune - six - pandas ==0.25.1 diff --git a/conda-recipe/anvio/meta.yaml b/conda-recipe/anvio/meta.yaml index b2ce83432d..8277d2c020 100644 --- a/conda-recipe/anvio/meta.yaml +++ b/conda-recipe/anvio/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "7.1-rc" %} +{% set version = "7.1" %} package: name: anvio From 0632133fac1af233bbf31e7bc2ee751644303740 Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Tue, 19 Oct 2021 15:36:16 +0200 Subject: [PATCH 4/7] fixy --- anvio/taxonomyops/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/anvio/taxonomyops/__init__.py b/anvio/taxonomyops/__init__.py index 5de3add2bc..c14605ff49 100644 --- a/anvio/taxonomyops/__init__.py +++ b/anvio/taxonomyops/__init__.py @@ -158,7 +158,8 @@ def __init__(self, skip_init=False): self.initialized = False self.run.info('Contigs DB', self.contigs_db_path) - self.run.info('Profile DB', self.profile_db_path) + if self.profile_db_path: + self.run.info('Profile DB', self.profile_db_path, mc="green") self.run.info('Metagenome mode', self.metagenome_mode) if self.metagenome_mode: self.run.info(f'{self._ITEM} for metagenome', self.item_name_for_metagenome_mode) From 7feb33636f6032d183e9fc0509d531ea5d59ce2e Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Tue, 19 Oct 2021 16:38:15 +0200 Subject: [PATCH 5/7] unique categorical values are at it again. we no longer turn categorical layers with too many unique items to text layers when there are no default state loaded. --- anvio/data/interactive/js/main.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/anvio/data/interactive/js/main.js b/anvio/data/interactive/js/main.js index 4bf59f7be6..962b76563a 100644 --- a/anvio/data/interactive/js/main.js +++ b/anvio/data/interactive/js/main.js @@ -64,6 +64,7 @@ var layer_order; var sample_names; var current_state_name = ""; +var a_default_state_is_found = false; var collapsedNodes = []; @@ -214,6 +215,9 @@ function initData() { switchUserInterfaceMode(response.project, response.title); setupDescriptionPanel(response.description); + if (response.state[0] && response.state[0] == 'default') + a_default_state_is_found = true; + document.title = response.title; $('#title-panel-first-line').text(response.title); @@ -254,7 +258,6 @@ function initData() { loadOrderingAdditionalData(default_order); - var default_view = response.views[0]; var available_views = response.views[2]; $('#views_container').append(getComboBoxContent(default_view, available_views)); @@ -1222,12 +1225,12 @@ function buildLayersTable(order, settings) if (_unique_items.indexOf(layerdata[_pos][layer_id]) === -1) _unique_items.push(layerdata[_pos][layer_id]); - if (_unique_items.length > 20) { - toastr.info("Too many categorical values for the layer '" + layer_name + "' to be shown in colors, switching to text."); + if (_unique_items.length > 250 && !a_default_state_is_found) { + toastr.warning("The layer '" + layer_name + "' has TOO MANY unique categorical values " + + "to be shown as colors (precisely " + _unique_items.length + " of them) :/ " + + "So, anvi'o set the `height` value of this layer to 0. You can change it " + + "from the 'Main' panel, and tame your colors through the 'Legends' panel."); height = '0'; - type = 'text'; - // we have at least one text layer, we can show max font size input - $('.max-font-size-input').show(); break; } } From 7e8c25e663bc92d9f5706d3d52fecd9a8133e9e2 Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Tue, 19 Oct 2021 16:39:40 +0200 Subject: [PATCH 6/7] new template name to be replaced in interactive --- anvio/data/mini-states/display-functions.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/anvio/data/mini-states/display-functions.json b/anvio/data/mini-states/display-functions.json index f6146443de..04e1168d5c 100644 --- a/anvio/data/mini-states/display-functions.json +++ b/anvio/data/mini-states/display-functions.json @@ -34,6 +34,13 @@ "margin": "15", "type": "intensity", "color-start": "#3d7a00" + }, + "__FUNCTIONS_LAYER_NAME__": { + "color": "#000000", + "height": "0", + "margin": "15", + "type": "text", + "color-start": "#e8e8e8" } }, "views": { From a9b38dce8ab04b271216275add2e286c09007a07 Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Tue, 19 Oct 2021 16:39:56 +0200 Subject: [PATCH 7/7] replace the template name in JSON w/ function name --- anvio/interactive.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/anvio/interactive.py b/anvio/interactive.py index 6440fd39e0..b29cefb411 100644 --- a/anvio/interactive.py +++ b/anvio/interactive.py @@ -927,8 +927,9 @@ def load_functional_mode(self): # AND in here in the interactive class to visualize the information. self.items_additional_data_keys, self.items_additional_data_dict = TableForItemAdditionalData(args, r=terminal.Run(verbose=False)).get() - # everything we need is in the database now. time to add a mini state: - mini_state = open(os.path.join(os.path.dirname(anvio.__file__), 'data/mini-states/display-functions.json')).read() + # everything we need is in the database now. time to add a mini state (note that we + # replace the function layer name template with the annotation source on the fly): + mini_state = open(os.path.join(os.path.dirname(anvio.__file__), 'data/mini-states/display-functions.json')).read().replace('__FUNCTIONS_LAYER_NAME__', facc.function_annotation_source) TablesForStates(self.profile_db_path).store_state('default', mini_state) # create an instance of states table