name: "getchromsizes"
info:
  migration_info:
    git_repo: https://github.com/nf-core/rnaseq.git
    paths: [modules/nf-core/custom/getchromsizes/main.nf, modules/nf-core/custom/getchromsizes/meta.yml]
    last_sha: 54721c6946daf6d602d7069dc127deef9cbe6b33
description: | 
  Generates a FASTA file of chromosome sizes and a fasta index file.

argument_groups:
- name: "Input"
  arguments: 
  - name: "--fasta"
    type: file
    description: Genome fasta files
  
- name: "Output"
  arguments: 
  - name: "--sizes"
    type: file
    direction: output
    description: File containing chromosome lengths
  - name: "--fai"
    type: file
    description: FASTA index file
    direction: output
  - name: "--gzi" # optional
    type: file
    description: Optional gzip index file for compressed inputs
    direction: output

resources:
  - type: bash_script
    path: script.sh
test_resources:
  - type: bash_script
    path: test.sh
  - path: /testData/minimal_test/reference/genome.fasta
  
engines:
- type: docker
  image: ubuntu:22.04
  setup:
    - type: docker
      run: | 
        apt-get update && \
        apt-get install -y autoconf automake make gcc perl zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev libssl-dev libncurses5-dev curl bzip2 && \
        curl -fsSL https://github.com/samtools/samtools/releases/download/1.18/samtools-1.18.tar.bz2 -o samtools-1.18.tar.bz2 && \
        tar -xjf samtools-1.18.tar.bz2 && \
        rm samtools-1.18.tar.bz2 && \
        cd samtools-1.18 && \
        ./configure && \
        make && \
        make install
runners:
  - type: executable
  - type: nextflow