name: "neighbors_leiden_umap"
namespace: "workflows/multiomics"
scope: "public"
description: "Performs neighborhood search, leiden clustering and run umap on an integrated embedding."
authors:
  - __merge__: /src/authors/dries_schaumont.yaml
    roles: [ author ]
info:
  test_dependencies:
argument_groups:
  - name: "Inputs"
    arguments:
      - name: "--input"
        required: true
        type: file
        description: Path to the sample.
        example: dataset.h5mu
      - name: "--obsm_input"
        type: string
        required: true
        description: The key of the embedding to use as input.
      - name: "--modality"
        description: Which modality to process.
        type: string
        default: "rna"
        required: false
  - name: "Outputs"
    arguments:
      - name: "--output"
        type: file
        required: true
        direction: output
        description: Destination path to the output.
        example: output.h5mu
  - name: Neighbour calculation
    arguments:
      - name: "--uns_neighbors"
        type: string
        required: true
        description: In which .uns slot to store various neighbor output objects.
      - name: "--obsp_neighbor_distances"
        type: string
        required: true
        description: "In which .obsp slot to store the distance matrix between the resulting neighbors."
      - name: "--obsp_neighbor_connectivities"
        type: string
        required: true
        description: "In which .obsp slot to store the connectivities matrix between the resulting neighbors."
  - name: Clustering options
    arguments:
      - name: "--obs_cluster"
        type: string
        required: false
        description: |
          Prefix for the .obs keys under which to add the cluster labels. Newly created columns in .obs will 
          be created from the specified value for '--obs_cluster' suffixed with an underscore and one of the resolutions
          resolutions specified in '--leiden_resolution'.
      - name: "--leiden_resolution"
        type: double
        description: Control the coarseness of the clustering. Higher values lead to more clusters.
        default: [1]
        multiple: true
  - name: Umap options
    arguments:
      - name: "--obsm_umap"
        type: string
        required: false
        description: |
          In which .obsm slot to store the resulting UMAP embedding.
          When not specified, UMAP will not be executed.
dependencies:
  - name: cluster/leiden
  - name: dimred/umap
  - name: neighbors/find_neighbors
  - name: metadata/move_obsm_to_obs
resources:
  - type: nextflow_script
    path: main.nf
    entrypoint: run_wf
  - type: file
    path: /src/workflows/utils/
runners:
  - type: nextflow