name: bedtools_summary
namespace: bedtools
description: |
  Report summary statistics of genomic intervals in a file.
  
  bedtools summary analyzes genomic intervals and provides comprehensive statistics 
  including total number of features, total length covered, average feature size, 
  and other descriptive metrics. This tool is essential for quality control and 
  exploratory data analysis of genomic datasets, helping researchers understand 
  the distribution and characteristics of their interval data.
  
  This tool is commonly used for:
  - Quality control assessment of genomic interval datasets
  - Exploratory data analysis of ChIP-seq peaks, gene annotations, or variant calls
  - Comparative analysis of interval characteristics between samples
  - Data preprocessing and validation before downstream analysis
  - Generating summary reports for genomic studies
  - Statistical characterization of genomic features

keywords: [genomics, intervals, statistics, summary, analysis, quality-control, metrics]
links:
  homepage: https://bedtools.readthedocs.io/en/latest/content/tools/summary.html
  documentation: https://bedtools.readthedocs.io/en/latest/content/tools/summary.html
  repository: https://github.com/arq5x/bedtools2
references:
  doi: 10.1093/bioinformatics/btq033
license: MIT
requirements:
  commands: [bedtools]
authors:
  - __merge__: /src/_authors/robrecht_cannoodt.yaml
    roles: [author, maintainer]

argument_groups:
  - name: Inputs
    arguments:
      - name: --input
        alternatives: [-i]
        type: file
        description: |
          Input file containing genomic intervals for statistical analysis.
          
          **Format:** BED, GFF, VCF, or BAM file with genomic coordinates
          **Content:** Genomic intervals to be analyzed for summary statistics
          **Usage:** Each interval contributes to the overall statistical summary
          **Requirements:** Standard genomic interval format with chromosome, start, end coordinates
          **Analysis:** Statistics computed across all intervals in the file
        required: true
        example: genomic_features.bed

      - name: --genome
        alternatives: [-g]
        type: file
        description: |
          Genome file with chromosome names and lengths.
          
          **Format:** Tab-delimited file with chromosome names and sizes
          **Structure:** Each line contains: <chromName><TAB><chromSize>
          **Purpose:** Provides reference genome context for statistical calculations
          **Example lines:** "chr1\t249250621" or "chr2\t243199373"
          **Usage:** Used to calculate genome coverage percentages and context statistics
        required: true
        example: genome.txt

  - name: Outputs
    arguments:
      - name: --output
        type: file
        description: |
          Output file with summary statistics of the genomic intervals.
          
          **Format:** Tab-delimited text file with statistical metrics
          **Content:** Comprehensive summary including count, total length, average size, etc.
          **Columns:** Various statistical measures of the interval dataset
          **Usage:** Results suitable for further analysis or reporting
        required: true
        direction: output
        example: interval_summary.txt

  - name: Analysis Options
    arguments: []

resources:
  - type: bash_script
    path: script.sh
test_resources:
  - type: bash_script
    path: test.sh
  - path: /src/_utils/test_helpers.sh

engines:
  - type: docker
    image: quay.io/biocontainers/bedtools:2.31.1--h13024bc_3
    setup:
      - type: docker
        run: |
          bedtools --version 2>&1 | head -1 | sed 's/.*bedtools v/bedtools: /' > /var/software_versions.txt

runners:
  - type: executable
  - type: nextflow
