name: "from_10xh5_to_h5mu"
namespace: "convert"
scope: "public"
description: |
  Converts a 10x h5 into an h5mu file.
authors:
  - __merge__: /src/authors/robrecht_cannoodt.yaml
    roles: [ maintainer ]
argument_groups:
  - name: Inputs
    arguments:
      - name: "--input"
        alternatives: ["-i"]
        type: file
        description: A 10x h5 file as generated by Cell Ranger.
        example: raw_feature_bc_matrix.h5
        direction: input
        required: true
      - name: "--input_metrics_summary"
        type: file
        description: A metrics summary csv file as generated by Cell Ranger.
        example: metrics_cellranger.h5
  - name: Outputs
    arguments:
      - name: "--output"
        alternatives: ["-o"]
        type: file
        description: Output h5mu file.
        example: output.h5mu
        direction: output
        __merge__: api_output.yaml
      - name: "--uns_metrics"
        type: string
        description: Name of the .uns slot under which to QC metrics (if any).
        default: "metrics_cellranger"
    __merge__: [., /src/base/h5_compression_argument.yaml]

  - name: Arguments
    arguments:
      - name: "--min_genes"
        type: integer
        example: 100
        description: Minimum number of counts required for a cell to pass filtering.
      - name: "--min_counts"
        type: integer
        example: 1000
        description: Minimum number of genes expressed required for a cell to pass filtering.
resources:
  - type: python_script
    path: script.py
  - path: /src/utils/setup_logger.py
test_resources:
  - type: python_script
    path: test.py
  - path: /resources_test/pbmc_1k_protein_v3

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/scanpy.yaml, .]
  __merge__: [ /src/base/requirements/python_test_setup.yaml, .]
runners:
- type: executable
- type: nextflow
  directives:
    label: [lowmem, singlecpu]