name: controlfreec_freec
description: Copy number and genotype annotation from whole genome and whole exome sequencing data
keywords:
  - cna
  - cnv
  - somatic
  - single
  - tumor-only
tools:
  - controlfreec/freec:
      description: Copy number and genotype annotation from whole genome and whole exome sequencing data.
      homepage: http://boevalab.inf.ethz.ch/FREEC
      documentation: http://boevalab.inf.ethz.ch/FREEC/tutorial.html
      tool_dev_url: https://github.com/BoevaLab/FREEC/
      doi: "10.1093/bioinformatics/btq635"
      licence: ["GPL >=2"]
input:
  - args:
      type: map
      description: |
        Groovy Map containing tool parameters. MUST follow the structure/keywords below and be provided via modules.config.
        Parameters marked as (optional) can be removed from the map, if they are not set. All values must be surrounded by quotes, meta map parameters can be set with, i.e. `sex = meta.sex`:
        For default values, please check the documentation above.

        ```
        {
          [
            "general" :[
                "bedgraphoutput": (optional),
                "breakpointthreshold": (optional),
                "breakpointtype": (optional),
                "coefficientofvariation": (optional),
                "contamination": (optional),
                "contaminationadjustment": (optional),
                "degree": (optional),
                "forcegccontentnormalization": (optional),
                "gccontentprofile": (optional),
                "intercept": (optional),
                "mincnalength": (optional),
                "minmappabilityperwindow": (optional),
                "minexpectedgc": (optional),
                "maxexpectedgc": (optional),
                "minimalsubclonepresence": (optional),
                "noisydata": (optional),
                "ploidy": (optional),
                "printNA": (optional),
                "readcountthreshold": (optional),
                "sex": (optional),
                "step": (optional),
                "telocentromeric": (optional),
                "uniquematch": (optional),
                "window": (optional)
            ],
            "control":[
                "inputformat": (required),
                "mateorientation": (optional),
            ],
            "sample":[
                "inputformat": (required),
                "mateorientation": (optional),
            ],
            "BAF":[
                "minimalcoverageperposition": (optional),
                "minimalqualityperposition": (optional),
                "shiftinquality": (optional)
            ]
          ]
        }
        ```
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - mateFile_normal:
      type: file
      description: File with mapped reads
      pattern: "*.{sam,bam,pileup(.gz),bowtie(.gz),eland(.gz),arachne(.gz),psl(.gz),bed(.gz)}"
  - mateFile_tumor:
      type: file
      description: File with mapped reads
      pattern: "*.{sam,bam,pileup(.gz),bowtie(.gz),eland(.gz),arachne(.gz),psl(.gz),bed(.gz)}"
  - cpn_normal:
      type: file
      description: Raw copy number profiles (optional)
      pattern: "*.cpn"
  - cpn_tumor:
      type: file
      description: Raw copy number profiles (optional)
      pattern: "*.cpn"
  - minipileup_normal:
      type: file
      description: miniPileup file from previous run (optional)
      pattern: "*.pileup"
  - minipileup_tumor:
      type: file
      description: miniPileup file from previous run (optional)
      pattern: "*.pileup"
  - fasta:
      type: file
      description: Reference file (optional; required if args 'makePileup' is set)
      pattern: "*.{fasta,fna,fa}"
  - fai:
      type: file
      description: Fasta index
      pattern: "*.fai"
  - snp_position:
      type: file
      description: Path to a BED or VCF file with SNP positions to create a mini pileup file from the initial BAM file provided in mateFile (optional)
      pattern: "*.{bed,vcf}"
  - known_snps:
      type: file
      description: File with known SNPs
      pattern: "*.{vcf,vcf.gz}"
  - known_snps_tbi:
      type: file
      description: Index of known_snps
      pattern: "*.tbi"
  - chr_directory:
      type: file
      description: Path to directory with chromosome fasta files (optional, required if gccontentprofile is not provided)
      pattern: "*/"
  - mappability:
      type: file
      description: Contains information of mappable positions (optional)
      pattern: "*.gem"
  - target_bed:
      type: file
      description: Sorted bed file containing capture regions (optional)
      pattern: "*.bed"
output:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - versions:
      type: file
      description: File containing software versions
      pattern: "versions.yml"
  - bedgraph:
      type: file
      description: Bedgraph format for the UCSC genome browser
      pattern: ".bedgraph"
  - control_cpn:
      type: file
      description: files with raw copy number profiles
      pattern: "*_control.cpn"
  - sample_cpn:
      type: file
      description: files with raw copy number profiles
      pattern: "*_sample.cpn"
  - gcprofile_cpn:
      type: file
      description: file with GC-content profile.
      pattern: "GC_profile.*.cpn"
  - BAF:
      type: file
      description: file B-allele frequencies for each possibly heterozygous SNP position
      pattern: "*_BAF.txt"
  - CNV:
      type: file
      description: file with coordinates of predicted copy number alterations.
      pattern: "*_CNVs"
  - info:
      type: file
      description: parsable file with information about FREEC run
      pattern: "*_info.txt"
  - ratio:
      type: file
      description: file with ratios and predicted copy number alterations for each window
      pattern: "*_ratio.txt"
  - config:
      type: file
      description: Config file used to run Control-FREEC
      pattern: "config.txt"
authors:
  - "@FriederikeHanssen"
maintainers:
  - "@FriederikeHanssen"
