annotate squidpy_spatial.py @ 0:be0e7952e229 draft

planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
author goeckslab
date Mon, 29 Aug 2022 23:20:54 +0000
parents
children d30ef0613122
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
1 import argparse
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
2 import ast
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
3 import json
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
4 import warnings
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
5
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
6 import pandas as pd
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
7 import squidpy as sq
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
8 from anndata import read_h5ad
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
9
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
10
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
11 def main(inputs, anndata, output, output_plot):
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
12 """
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
13 Parameter
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
14 ---------
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
15 inputs : str
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
16 File path to galaxy tool parameter.
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
17 anndata : str
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
18 File path to anndata containing phenotyping info.
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
19 output : str
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
20 File path to output.
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
21 output_plot: str or None
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
22 File path to save the plotting image.
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
23 """
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
24 warnings.simplefilter('ignore')
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
25
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
26 with open(inputs, 'r') as param_handler:
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
27 params = json.load(param_handler)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
28
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
29 adata = read_h5ad(anndata)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
30
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
31 if 'spatial' not in adata.obsm:
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
32 try:
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
33 adata.obsm['spatial'] = adata.obs[['X_centroid', 'Y_centroid']].values
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
34 except Exception as e:
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
35 print(e)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
36
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
37 tool = params['analyses']['selected_tool']
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
38 tool_func = getattr(sq.gr, tool)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
39
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
40 options = params['analyses']['options']
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
41
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
42 for k, v in options.items():
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
43 if not isinstance(v, str):
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
44 continue
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
45
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
46 if v in ('', 'none'):
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
47 options[k] = None
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
48 continue
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
49
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
50 if k == 'genes': # for spatial_autocorr and sepal
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
51 options[k] = [e.strip() for e in v.split(',')]
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
52 elif k == 'radius': # for spatial_neighbors
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
53 options[k] = ast.literal_eval(v)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
54 elif k == 'numba_parallel': # for nhood_enrichment and ligrec
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
55 if v == 'false':
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
56 options[k] = False
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
57 elif v == 'true':
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
58 options[k] = True
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
59 elif k == 'interactions': # for ligrec
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
60 options[k] = pd.read_csv(v, sep="\t")
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
61 elif k == 'max_neighs':
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
62 options[k] = int(v) # for sepal
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
63
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
64 cluster_key = params['analyses'].get('cluster_key')
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
65 if cluster_key:
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
66 tool_func(adata, cluster_key, **options)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
67 else:
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
68 tool_func(adata, **options)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
69
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
70 if output_plot:
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
71 plotting_options = params['analyses']['plotting_options']
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
72 for k, v in plotting_options.items():
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
73 if not isinstance(v, str):
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
74 continue
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
75
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
76 if v in ('', 'none'):
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
77 plotting_options[k] = None
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
78 continue
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
79
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
80 if k == 'figsize':
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
81 options[k] = ast.literal_eval(v)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
82 elif k in ('palette', 'score', 'source_groups', 'target_groups'):
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
83 options[k] = [e.strip() for e in v.split(',')]
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
84 elif k == 'means_range': # ligrec
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
85 v = v.strip()
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
86 if v[0] == '(':
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
87 v = v[1:]
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
88 if v[-1] == ')':
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
89 v = v[:-1]
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
90 options[k] = tuple([float(e.strip()) for e in v.split(',', 1)])
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
91
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
92 plotting_func = getattr(sq.pl, tool)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
93 if cluster_key:
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
94 plotting_func(adata, cluster_key, save=output_plot, **plotting_options)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
95 else: # TODO Remove this, since all plottings need cluster key
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
96 plotting_func(adata, save=output_plot, **plotting_options)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
97
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
98 adata.write(output)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
99
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
100
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
101 if __name__ == '__main__':
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
102 aparser = argparse.ArgumentParser()
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
103 aparser.add_argument("-i", "--inputs", dest="inputs", required=True)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
104 aparser.add_argument("-e", "--output", dest="output", required=True)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
105 aparser.add_argument("-a", "--anndata", dest="anndata", required=True)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
106 aparser.add_argument("-p", "--output_plot", dest="output_plot", required=False)
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
107
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
108 args = aparser.parse_args()
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
109
be0e7952e229 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit ee16860018eba110ff845d62b18396db22abd91e
goeckslab
parents:
diff changeset
110 main(args.inputs, args.anndata, args.output, args.output_plot)