comparison squidpy_scatter.py @ 1:b84c324b58bd draft default tip

planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ed118f79326f83eff1315f735b4e0e1a45a5e02c
author goeckslab
date Thu, 31 Oct 2024 17:55:17 +0000
parents 6fe0d4f464f4
children
comparison
equal deleted inserted replaced
0:6fe0d4f464f4 1:b84c324b58bd
20 # read inputs JSON 20 # read inputs JSON
21 with open(inputs, 'r') as param_handler: 21 with open(inputs, 'r') as param_handler:
22 params = json.load(param_handler) 22 params = json.load(param_handler)
23 23
24 # collapse param dict hierarchy, parse inputs 24 # collapse param dict hierarchy, parse inputs
25 main_params = ['anndata', 'x_coord', 'y_coord', 'color']
25 plot_opts = params.pop('plot_opts') 26 plot_opts = params.pop('plot_opts')
26 legend_opts = params.pop('legend_opts') 27 legend_opts = params.pop('legend_opts')
27 aes_opts = params.pop('aesthetic_opts') 28 aes_opts = params.pop('aesthetic_opts')
28 options = {**params, **plot_opts, **legend_opts, **aes_opts} 29 options = {
30 **{k: params[k] for k in main_params},
31 **plot_opts,
32 **legend_opts,
33 **aes_opts
34 }
29 35
30 # read input anndata file 36 # read input anndata file
31 adata_fh = options.pop('anndata') 37 adata_fh = options.pop('anndata')
32 adata = read_h5ad(adata_fh) 38 adata = read_h5ad(adata_fh)
33 39