name: cellranger_atac_mkfastq
namespace: demux
scope: "public"
description: Demultiplex raw sequencing data for ATAC experiments
usage: |
  cellranger_atac_mkfastq \
    --input /path/to/bcl \
    --csv simple_layout_sample_sheet.csv \
    --output /path/to/output
authors:
  - __merge__: /src/authors/vladimir_shitov.yaml
    roles: [ author ]
arguments:
  - type: file
    name: --input
    description: Path of Illumina BCL run folder.
    example: /path/to/bcl
    required: true
  - type: file
    name: --csv
    description: The path to the simple layout sample sheet.
    example: SampleSheet.csv
    required: true
  - type: string
    multiple: true
    name: --lanes
    description: bcl2fastq option. Semicolon-delimited series of lanes to demultiplex. Use this if you have a sample sheet for an entire flow cell but only want to generate a few lanes for further 10x Genomics analysis.
    multiple_sep: ","
    example: 1,3
  - type: string
    multiple: true
    name: --use_bases_mask
    description: bcl2fastq option. Use to clip extra bases off a read if you ran extra cycles for QC.
    multiple_sep: ","
    example: y50n,I6n,Y50n
  - type: boolean_true
    name: --delete_undetermined
    description: bcl2fastq option. Delete the Undetermined FASTQs generated by bcl2fastq. Useful if you are demultiplexing a small number of samples from a large flow cell.
  - type: integer
    name: --barcode_mismatches
    description: bcl2fastq option. Use this option to change the number of allowed mismatches per index adapter (0, 1, 2). 
    default: 1
    min: 0
  - type: file
    name: --output
    direction: output
    description: The folder to store the demux results
    example: "/path/to/output"
    default: fastqs
    required: true
  - type: file
    name: "--reports"
    direction: output
    required: false
    description: Reports directory
    example: reports_dir
resources:
  - type: bash_script
    path: script.sh
  - path: /src/utils/setup_logger.py
test_resources:
  - type: python_script
    path: test.py
  - path: /resources_test/cellranger_atac_tiny_bcl
engines:
  - type: docker
    image: ghcr.io/data-intuitive/cellranger_atac:2.1
    setup:
      - type: docker
        run: |
          DEBIAN_FRONTEND=noninteractive apt update \
          && apt upgrade -y && apt install -y procps && rm -rf /var/lib/apt/lists/*
    test_setup:
      - type: python
        __merge__: [ /src/base/requirements/viashpy.yaml, .]

runners:
  - type: executable
  - type: nextflow
    directives:
      label: [ highmem, highcpu ]
