Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
boasvdp committed Jun 7, 2022
1 parent f1b8fd0 commit a13efe2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
itolparser_functions/__pycache__
test
2 changes: 1 addition & 1 deletion itolparser
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import random
import itolparser_functions.itolparser_functions as itolparser_functions

__author__= "Boas van der Putten"
__version__= "itolparser v0.1.3"
__version__= "itolparser v0.1.4"

# Parse arguments
parser = argparse.ArgumentParser(description='Find within and between cluster comparisons based on SNP distances and fastBAPS clustering.')
Expand Down
Binary file not shown.
10 changes: 5 additions & 5 deletions itolparser_functions/itolparser_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ def create_dicts(tmpdf, name, list_vals, CONTINUOUS, MAXCATEGORIES, list_removev

# check if continuous
if CONTINUOUS > 0:
MIN = min(list_vals)
MAX = max(list_vals)
MIN = float(min(list_vals))
MAX = float(max(list_vals))
for i in list_vals:
RVAL = int(255 - (((i - MIN) / (MAX - MIN)) * 255))
GVAL = int(255 - (((i - MIN) / (MAX - MIN)) * 155))
BVAL = int(150 - (((i - MIN) / (MAX - MIN)) * 150))
RVAL = int(255 - (((float(i) - MIN) / (MAX - MIN)) * 255))
GVAL = int(255 - (((float(i) - MIN) / (MAX - MIN)) * 155))
BVAL = int(150 - (((float(i) - MIN) / (MAX - MIN)) * 150))
HEX = '#%02x%02x%02x' % (RVAL, GVAL, BVAL)
a_dict[i] = HEX

Expand Down

0 comments on commit a13efe2

Please sign in to comment.