Skip to content

Commit 5a162be

Browse files
committed
Feature
Added possibility to circumvent max_group_plot limit of 8 by specifying colours.txt manually.
1 parent b6763b7 commit 5a162be

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

lib/blobplot.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
5050
--label GROUPS... Relabel (taxonomic) groups, can be used several times.
5151
e.g. "A=Actinobacteria,Proteobacteria"
52-
--colours COLOURFILE File containing colours for (taxonomic) groups
52+
--colours COLOURFILE File containing colours for (taxonomic) groups. This allows having more than 9 colours.
5353
--exclude GROUPS Exclude these (taxonomic) groups (also works for 'other')
5454
e.g. "Actinobacteria,Proteobacteria,other"
5555
--refcov <FILE> File containing number of "total" and "mapped" reads
@@ -77,8 +77,9 @@ def main():
7777
rank = args['--rank']
7878
min_length = int(args['--length'])
7979
max_group_plot = int(args['--plotgroups'])
80-
if max_group_plot > 8:
81-
sys.exit("[X] '--plotgroups' must be less than 9.")
80+
colour_f = args['--colours']
81+
if max_group_plot > 8 and not colour_f:
82+
sys.exit("[X] '--plotgroups' must be less than 9 for using automatic colour assignation.")
8283
hide_nohits = args['--nohit']
8384
taxrule = args['--taxrule']
8485
c_index = args['--cindex']

lib/interface.py

-2
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,13 @@
4848

4949
def main():
5050
try:
51-
5251
start_time = timer()
5352
try:
5453
args = docopt(__doc__, version=__version__, options_first=True)
5554
except DocoptExit:
5655
print(__doc__)
5756
else:
5857
if args['<module>']:
59-
6058
if args['<module>'] == 'create':
6159
import lib.create as create
6260
create.main()

lib/view.py

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
-n, --notable Do not generate table view [default: False]
2626
"""
2727

28-
from __future__ import division
2928
from docopt import docopt
3029
from os.path import isfile
3130

0 commit comments

Comments
 (0)