Skip to content

Commit

Permalink
Fix Layer Order
Browse files Browse the repository at this point in the history
  • Loading branch information
metehaansever committed Jan 24, 2025
1 parent 46944a4 commit 28f62d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
19 changes: 6 additions & 13 deletions anvio/data/interactive/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -534,18 +534,6 @@ var named_layers = {
'norm': 'none',
'pretty_name': '_',
},
'num_gene_clusters_in_psgc': {
'height': 180,
'color': '#ffa60d',
'norm': 'none',
'pretty_name': 'Num gene clusters in PSGC',
},
'num_genes_in_psgc': {
'height': 180,
'color': '#ffa60d',
'norm': 'none',
'pretty_name': 'Num genes in PSGC',
},
'gene_types!core': {
'height': 200,
'color': '#440000',
Expand Down Expand Up @@ -582,7 +570,12 @@ var named_layers = {
'psgc_composition': {
'type': 'bar',
'pretty_name': 'GCs in PSGC'
}
},
'number_gc_in_psgc': {
'height': 200,
'color': '#ffa60d',
'pretty_name': 'Num GC in PSGC'
},
};

named_category_colors = {
Expand Down
4 changes: 2 additions & 2 deletions anvio/panops.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def add_psgc_layers(self, gene_clusters_dict, item_additional_data_keys):

self.add_layers_to_view(psgc_gc_counts)
item_additional_data_keys.extend([
'num_gene_clusters_in_psgc',
'number_gc_in_psgc',
'psgc_composition!core',
'psgc_composition!singleton',
'psgc_composition!accessory',
Expand Down Expand Up @@ -720,7 +720,7 @@ def classify_gene_types(self, gene_clusters_dict):
def add_layers_to_view(self, psgc_gc_counts):
"""Add all PSGC layers to the view data."""
for gene_cluster in self.view_data:
self.additional_view_data[gene_cluster].update({ 'num_gene_clusters_in_psgc': psgc_gc_counts.get(gene_cluster, 0) })
self.additional_view_data[gene_cluster].update({ 'number_gc_in_psgc': psgc_gc_counts.get(gene_cluster, 0) })


def gen_synteny_based_ordering_of_gene_clusters(self, gene_clusters_dict):
Expand Down

1 comment on commit 28f62d7

@meren
Copy link
Member

@meren meren commented on 28f62d7 Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See, I knew it was somewhere there :)

Please sign in to comment.