name: "from_spatialdata_to_h5mu"
namespace: "convert"
description: |
  Reads in the Tables field stored in a SpatialData object and converts it to an h5mu file.
    
authors:
  - __merge__: /src/authors/dorien_roosen.yaml
    roles: [ maintainer ]
  - __merge__: /src/authors/weiwei_schultz.yaml
    roles: [ contributor ]
arguments:
  - name: "--input"
    alternatives: ["-i"]
    type: file
    description: Input zarr folder where the SpatialData object is stored.
    example: input.zarr
    direction: input
    required: true
  - name: "--modality"
    type: string
    default: rna
  - name: "--output"
    alternatives: ["-o"]
    type: file
    description: The output h5mu file.
    example: "output.h5mu"
    direction: output
  - name: "--output_compression"
    type: string
    choices: ["gzip", "lzf"]
    required: false
    example: "gzip"
resources:
  - type: python_script
    path: script.py
  - path: /src/utils/setup_logger.py
test_resources:
  - type: python_script
    path: test.py
  - path: /resources_test/xenium/xenium_tiny.zarr
engines:
  - type: docker
    image: python:3.12-slim
    setup:
      - type: apt
        packages: 
          - procps
      - type: python
        __merge__: [/src/base/requirements/anndata_mudata.yaml, /src/base/requirements/spatialdata.yaml]
    __merge__: [ /src/base/requirements/python_test_setup.yaml, .]
runners:
  - type: executable
  - type: nextflow
    directives:
      label: [lowmem, singlecpu]
