Mercurial > repos > goeckslab > scimap_spatial
comparison mcmicro_to_anndata.py @ 5:d9f414be2f09 draft default tip
planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/scimap commit 78a4f1a616a9b7f7ca71cdf32e6a63a1daeec8bf
| author | goeckslab |
|---|---|
| date | Wed, 11 Jun 2025 22:18:44 +0000 |
| parents | d19c068c2490 |
| children |
comparison
equal
deleted
inserted
replaced
| 4:2983eb1d7362 | 5:d9f414be2f09 |
|---|---|
| 18 warnings.simplefilter('ignore') | 18 warnings.simplefilter('ignore') |
| 19 | 19 |
| 20 with open(inputs, 'r') as param_handler: | 20 with open(inputs, 'r') as param_handler: |
| 21 params = json.load(param_handler) | 21 params = json.load(param_handler) |
| 22 | 22 |
| 23 image_path = params['image_path'] | 23 image_path = params['image_path']['source_path'] |
| 24 drop_markers = params['drop_markers'] | 24 drop_markers = params['drop_markers'] |
| 25 if not drop_markers: | 25 if not drop_markers: |
| 26 drop_markers = None | 26 drop_markers = None |
| 27 else: | 27 else: |
| 28 drop_markers = [x.strip() for x in drop_markers.split(',')] | 28 drop_markers = [x.strip() for x in drop_markers.split(',')] |
| 29 options = params['options'] | 29 options = params['options'] |
| 30 if not options.get('custom_imageid'): | |
| 31 element_identifier = params['image_path']['element_identifier'] | |
| 32 # Might be a list on unpatched versions of Galaxy, xref: https://github.com/galaxyproject/galaxy/pull/20438 | |
| 33 options['custom_imageid'] = element_identifier if isinstance(element_identifier, str) else element_identifier[0] | |
| 30 for k, v in options.items(): | 34 for k, v in options.items(): |
| 31 if v == '': | 35 if v == '': |
| 32 options[k] = None | 36 options[k] = None |
| 33 | 37 |
| 34 adata = sm.pp.mcmicro_to_scimap( | 38 adata = sm.pp.mcmicro_to_scimap( |
