name: velocyto
namespace: "velocity"
scope: "public"
description: "Runs the velocity analysis on a BAM file, outputting a loom file."
authors:
  - __merge__: /src/authors/robrecht_cannoodt.yaml
    roles: [ maintainer ]
arguments:
  - name: "--input"
    alternatives: [-i]
    type: file
    direction: input
    description: "Path to BAM file"
    required: true
    example: input.bam
  - name: "--transcriptome"
    alternatives: [-t]
    type: file
    direction: input
    description: "Path to GTF file"
    required: true
    example: transcriptome.gtf
  - name: "--barcode"
    alternatives: [-b]
    type: file
    example: barcodes.txt
    direction: input
    description: |
      Valid barcodes file, to filter the bam. If --bcfile is not specified all the cell barcodes will be included.
      Cell barcodes should be specified in the bcfile as the 'CB' tag for each read
    required: false
  - name: "--without_umi"
    type: boolean_true
    description: "foo"
  - name: "--output"
    alternatives: [-o]
    required: true
    type: file
    direction: output
    description: "Velocyto loom file"
    example: output.loom
  - name: "--logic"
    alternatives: ["-l"]
    type: string
    required: false
    choices: ["Default", "Permissive10X", "Intermediate10X", "ValidatedIntrons10X", "Stricter10X", "ObservedSpanning10X", "Discordant10X", "SmartSeq2"]
    default: Default
    description: "The logic to use for the filtering."
resources:
  - type: bash_script
    path: script.sh
  - path: setup.py.patch

test_resources:
  - type: python_script
    path: test.py
  - path: /resources_test/cellranger_tiny_fastq
  - path: /resources_test/rna_velocity
  - path: /resources_test/reference_gencodev41_chr1

engines:
  - type: docker
    image: python:3.13
    setup:
      - type: docker
        copy: ["setup.py.patch /opt/setup.py.patch"]
      - type: apt
        packages:
          - build-essential
          - file
          - git
      - type: python
        pip:
          - numpy
          - Cython
      - type: docker
        run: |
          git clone --depth 1 https://github.com/velocyto-team/velocyto.py /tmp/velocyto.py && cd /tmp/velocyto.py && git checkout 56efe891ec3d383d83ad45360f58350c12824c4d && git apply /opt/setup.py.patch && pip install .
      - type: apt
        packages:
          - samtools
    test_setup:
      - type: python
        __merge__: [ /src/base/requirements/viashpy.yaml, .]
runners:
  - type: executable
  - type: nextflow
    directives:
      label: [highmem, lowcpu]