Skip to content

Commit

Permalink
Further size reduction to the the HTML, now < 2/3 of old size
Browse files Browse the repository at this point in the history
On branch loglen
	modified:   recentrifuge/krona.py
  • Loading branch information
khyox committed Dec 18, 2023
1 parent f942d9f commit 6f7dd15
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions recentrifuge/krona.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
LOADING = '/img/loading.uri'
FAVICON = '/img/favicon.uri'
# Krona plot attributes
COUNT = Attrib('count')
UNASSIGNED = Attrib('unassigned')
COUNT = Attrib('cnt')
UNASSIGNED = Attrib('una')
TID = Attrib('tid')
RANK = Attrib('rank')
SCORE = Attrib('score')
RANK = Attrib('rnk')
SCORE = Attrib('sco')

# Define encoding dialect for TSV files expected by Krona
csv.register_dialect('krona', csv.get_dialect('unix'), delimiter='\t',
Expand Down Expand Up @@ -195,7 +195,7 @@ def __init__(self,

# Set attributes
self.attributes = ETree.SubElement(self.krona, 'attributes',
{'magnitude': 'count'})
{'magnitude': COUNT})
# # Set Count attribute
self.sub(self.attributes, 'attribute',
{'display': 'Count', 'dataAll': 'members',
Expand Down Expand Up @@ -236,7 +236,7 @@ def __init__(self,

# Set color
self.color = self.sub(self.krona, 'color',
{'attribute': 'score',
{'attribute': SCORE,
'hueStart': '0',
'hueEnd': '300',
'valueStart': f'{min_score:.1f}',
Expand Down

0 comments on commit 6f7dd15

Please sign in to comment.