name: subset_h5mu
namespace: "filter"
scope: "public"
description: |
  Create a subset of a mudata file by selecting the first number of observations
authors:
  - __merge__: /src/authors/dries_schaumont.yaml
    roles: [ maintainer ]
arguments:
  - name: "--input"
    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: "--output"
    type: file
    description: Output h5mu file.
    direction: output
    example: output.h5mu
  - name: "--number_of_observations"
    type: integer
    description: Number of observations to be selected from the h5mu file.
    example: 5
__merge__: [., /src/base/h5_compression_argument.yaml]

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/pbmc_1k_protein_v3_filtered_feature_bc_matrix.h5mu

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

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