name: join_uns_to_obs
namespace: "metadata"
scope: "public"
description: "Join a data frame of length 1 (1 row index value) in .uns containing metadata to the .obs of a mudata file."
arguments:
  - name: "--input"
    alternatives: ["-i"]
    type: file
    description: Input h5mu file
    direction: input
    required: true
    example: input.h5mu
  - name: "--modality"
    description: |
      Which modality from the input MuData file to process.
    type: string
    default: "rna"
    required: false
  - name: "--uns_key"
    description: |
      Lookup key from .uns pointing to the input data.
    type: string
    required: true
  - name: "--output"
    alternatives: ["-o"]
    type: file
    description: Output h5mu file.
    direction: output
    required: true
    example: output.h5mu
  - name: "--output_compression"
    type: string
    description: The compression format to be used on the output h5mu object.
    choices: ["gzip", "lzf"]
    required: false
    example: "gzip"
resources:
  - type:  python_script
    path: script.py
  - path: /src/utils/setup_logger.py
  - path: /src/utils/compress_h5mu.py
test_resources:
  - type: python_script
    path: test.py

engines:
- type: docker
  image: python:3.13-slim
  setup:
    - type: apt
      packages: 
        - procps
    - type: python
      __merge__: /src/base/requirements/anndata_mudata.yaml
  __merge__: [/src/base/requirements/python_test_setup.yaml, .]

runners:
- type: executable
- type: nextflow
  directives:
    label: [ singlecpu, lowmem ]