# ============================================================================
# Config file for Denovo Assembly
#
# ==========================================[ Sections for the users ]========
#
# One of input_directory, input_pattern and input_samples must be provided
# If input_directory provided, use it otherwise if input_pattern provided,
# use it, otherwise use input_samples.
# If input_extension provided, use it otherwise assume fastq.gz
# ============================================================================
#
input_directory: "%(input_directory)s"
input_readtag: "%(input_readtag)s"
input_extension: "%(input_extension)s"
input_pattern: "%(input_pattern)s"
input_samples:
    file1: "%(file1)s"
    file2: "%(file2)s"

##############################################################################
# Sequencing information section
#
# :Parameters:
# 
# - platform: name of the technology.
# - instrument: name of the instrument.
# - flowcell: name of the flowcell.
#
sequencing:
    platform: "Illumina"
    instrument: "Unknown"
    flowcell: "Unknown"

##############################################################################
# Khmer - Digital Normalisation
# 
# :Parameters:
# 
# - do: if unchecked, this rule is ignored.
# - ksize: kmer size used to normalised the coverage.
# - cutoff: when the median k-mer coverage level is above this number the read
#       is not kept.
# - max_memory_usage: maximum amount of memory to use for data structure.
# - threads: number of threads to be used.
# - options: any options recognised by normalize-by-median.py.
# 
digital_normalisation:
    do: yes
    ksize: 20
    cutoff: 20
    max_memory_usage: 16e9
    threads: 4
    options: ""

##############################################################################
# Spades - De Novo Assembly
# 
# :Parameters:
# 
# - k: comma-separated list of k-mer sizes (must be odd and less than 128).
# - careful: tries to reduce number of mismatches and short indels.
# - only_assembler: runs only assembling (without read error correction).
# - memory: RAM limit for SPAdes in Gb (terminates if exceeded).
# - threads: number of threads to be used.
# - options: any options recognised by spades.py.
# 
spades:
    k: 21,33,55,77,99,127
    careful: yes
    only_assembler: no
    memory: 250
    threads: 8
    options: ""

##############################################################################
# Quast - Compute metrics to assess assembly
#
# :Parameters:
# 
# - reference: Reference genome file (optional).
# - genes_file: Gene positions in the reference genome.
# - map_reads: Map reads on reference file.
# - threads: Number of threads to be used.
# - options: Any options recognised by quast.py.
# 
quast:
    reference: ""
    genes_file: ""
    threads: 4
    options: ""

##############################################################################
# Prokka - Annotate the genome assembly
#
# :Parameters:
#
# - do: If unchecked, this rule is ignored.
# - kingdom: Annotation mode (Archaea|Bacteria|Mitochondria|Viruses)
# - genus: Genus name of the assembly.
# - species: Species name of the assembly.
# - threads: Number of threads used by Prokka.
# - options: Any options recognised by Prokka.
#
prokka:
    do: yes
    kingdom: Bacteria
    genus: ""
    species: ""
    threads: 4
    options: ""

##############################################################################
# Format contigs name and remove contigs with a length lower than a threshold
# 
# :Parameters:
# 
# - threshold: when the contig length is lower than this number, the contig
#       is not kept.
# 
format_contigs:
    threshold: 500

##############################################################################
# BWA - Mapping
#
# :Parameters:
#
# - reference_file: the name of the reference file.
# - index_algorithm: the BWA index algorithm (is or bwtsw).
# - options: any options recognised by BWA MEM tool.
# - threads: number of threads to be used.
# - tmp_directory: temporary directory
#
bwa_mem_assembly:
    index_algorithm: 'is'
    options: '-T 30'
    threads: 2
    tmp_directory: './tmp/'

##############################################################################
# Sambamba - Marks or removes duplicates
#
# :Parameters:
#
# - do: if unchecked, this rule is ignored.
# - remove: boolean if you want remove or not duplicated reads.
# - tmp_directory: set the temporary directory.
#
sambamba_markdup:
    do: yes
    remove: no
    tmp_directory: "./tmp/"

##############################################################################
# Filter reads with a mapping score lower than an integer 
#
# :Parameters:
#
# - do: if unchecked, this rule is ignored.
# - threshold: mapping score threshold (between 0 and 60).
#
sambamba_filter:
    do: yes
    threshold: 30

##############################################################################
# Sequana coverage - Analyse the coverage of the mapping 
#
# :Parameters:
#
# - do: if unchecked, this rule is ignored.
# - k: number of gaussian predicted.
# - circular: if your genome is circular.
# - window_size: window size to compute the running median.
# - low_threshold: threshold to detect low coverage regions.
# - high_threshold: threshold to detect high coverage regions.
# - gc_window_size: window size to compute GC content.
#
sequana_coverage:
    do: yes
    k: 2
    circular: no
    window_size: 30001
    low_threshold: -4.0
    high_threshold: 4.0
    gc_window_size: 201

##############################################################################
# Freebayes - Variant caller
#
# :Parameters:
#
# - do: if unchecked, this rule is ignored.
# - ploidy: set the ploidy of your samples.
# - options: any options recognised by freebayes.
#
freebayes:
    do: yes
    ploidy: 1
    options:

##############################################################################
# Filter VCF
#
# :Parameters:
#
# - freebayes_score: threshold for minimum freebayes score.
# - frequency: threshold for minimum alternative allele frequency.
# - min_depth: threshold for minimum coverage depth.
# - forward_depth: threshold for minimum coverage depth of forward strand.
# - reverse_depth: threshold for minimum coverage depth of reverse strand.
# - strand_ratio: threshold for minimum strand ratio between 0 and 0.5.
#
freebayes_vcf_filter:
    freebayes_score: 20
    frequency: 0.7
    min_depth: 10
    forward_depth: 3
    reverse_depth: 3
    strand_ratio: 0.2
