# HG changeset patch # User goeckslab # Date 1722363643 0 # Node ID ef73596d678a68decf78228c0227222604f28da5 # Parent c42e97dc5a3a8c78ade5e90d128a38be64d48236 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/scimap commit c39cea5ae2ebf61b3d51d687fd9d2930c907b72d diff -r c42e97dc5a3a -r ef73596d678a main_macros.xml --- a/main_macros.xml Wed Jun 26 15:26:55 2024 +0000 +++ b/main_macros.xml Tue Jul 30 18:20:43 2024 +0000 @@ -1,6 +1,6 @@ 2.1.0 - 1 + 2 20.01 diff -r c42e97dc5a3a -r ef73596d678a scimap_plotting.py --- a/scimap_plotting.py Wed Jun 26 15:26:55 2024 +0000 +++ b/scimap_plotting.py Tue Jul 30 18:20:43 2024 +0000 @@ -3,7 +3,7 @@ import os import warnings -import matplotlib.pylab as plt +import matplotlib.pyplot as plt import numpy as np import scimap as sm import seaborn as sns @@ -37,9 +37,11 @@ # parse list text arguments for o in options.copy(): - opt_list = options.pop(o) - if opt_list: - options[o] = [x.strip() for x in opt_list.split(',')] + opt = options.pop(o) + if o == 'matplotlib_cmap': + matplotlib_cmap = opt + elif opt != "": + options[o] = [x.strip() for x in opt.split(',')] # add base args into options dict to pass to tool options['x_axis'] = params['analyses']['x_axis'] @@ -50,15 +52,6 @@ df = sm.pl.stacked_barplot(adata, **options) - # Pick cmap to use - num_phenotypes = len(df.columns) - 1 - if num_phenotypes <= 9: - matplotlib_cmap = "Set1" - elif num_phenotypes > 9 and num_phenotypes <= 20: - matplotlib_cmap = plt.cm.tab20 - else: - matplotlib_cmap = plt.cm.gist_ncar - # Plotting sns.set_theme(style="white") ax = df.plot.bar(stacked=True, cmap=matplotlib_cmap) diff -r c42e97dc5a3a -r ef73596d678a scimap_plotting.xml --- a/scimap_plotting.xml Wed Jun 26 15:26:55 2024 +0000 +++ b/scimap_plotting.xml Tue Jul 30 18:20:43 2024 +0000 @@ -38,6 +38,20 @@ + + + + + + + + + + + + + + @@ -97,16 +111,9 @@