name: clr
namespace: "transform"
scope: "public"
description: |
  Perform CLR normalization on CITE-seq data (Stoeckius et al., 2017).
authors:
  - __merge__: /src/authors/dries_schaumont.yaml
    roles: [ maintainer ]
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: "prot"
    required: false
  - name: "--output"
    alternatives: ["-o"]
    type: file
    description: Output h5mu file.
    direction: output
    required: true
    default: output.h5mu
  - name: "--input_layer"
    type: string
    description: "Input layer to use. By default, .X is used."
  - name: "--output_layer"
    type: string
    description: Output layer to use. By default, use X.
    required: false
  - name: "--axis"
    type: integer
    description: |
      Axis across which CLR is performed. If set to 0, CLR is performed across observations (cells).
      If set to 1, CLR is performed across features (genes).
    default: 0
    required: false
    choices: [0, 1]
__merge__: [., /src/base/h5_compression_argument.yaml]

resources:
  - type: python_script
    path: script.py
  - path: /src/utils/compress_h5mu.py
test_resources:
  - type: python_script
    path: test.py
  - path: /resources_test/pbmc_1k_protein_v3

engines:
- type: docker
  image: python:3.13-slim
  setup:
    - type: apt
      packages: 
        - procps
    - type: python
      __merge__: [/src/base/requirements/anndata_mudata.yaml, /src/base/requirements/scanpy.yaml, .]
      packages:
        - muon~=0.1.7
  test_setup:
    - type: python
      __merge__: [ /src/base/requirements/viashpy.yaml, .]

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

