annotate squidpy_spatial.py @ 0:6fe0d4f464f4 draft

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