name: samtools
namespace: genetic_demux
scope: "public"
description: Filter the BAM according to the instruction of scSplit via Samtools.
authors:
  - __merge__: /src/authors/xichen_wu.yaml
    roles: [ author ]
arguments:
  - name: "--bam"
    type: file
    required: true
    description: "Input bam file for filtering."
  - name: "--output"
    type: file
    direction: output
    description: "Samtools output directory."
    example: "samtools_out/"
resources:
  - type: bash_script
    path: script.sh
test_resources:
  - type: bash_script
    path: test.sh
  - path: ../../../resources_test/demuxafy_test_data

engines:
- type: docker
  image: python:3.12
  setup:
  - type: apt
    packages: [ wget, gcc, make, libbz2-dev, zlib1g-dev, libncurses5-dev, libncursesw5-dev, liblzma-dev]
  - type: docker
    run: wget https://github.com/samtools/samtools/releases/download/1.16.1/samtools-1.16.1.tar.bz2 && tar jxf samtools-1.16.1.tar.bz2 && rm samtools-1.16.1.tar.bz2 && cd samtools-1.16.1 && make prefix=/usr/local install
  - type: python
    pip: [ umi_tools ]

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