# ============================================================================
# Config file for  Variant Calling
#
# ==========================================[ 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"

##############################################################################
# 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_ref:
    reference: "%(reference)s"
    index_algorithm: 'is'
    options: '-T 30'
    threads: 2
    tmp_directory: './tmp/'

##############################################################################
# SnpEff - Annotate variants detected
#
# :Parameters:
#
# - do: if unchecked, this rule is ignored.
# - reference: genbank file.
# - options: any options recognised by snpEff.
#
#   Results filter options:
#	    -no-downstream: Do not show DOWNSTREAM changes
#	    -no-intergenic: Do not show INTERGENIC changes
#	    -no-intron: Do not show INTRON changes
#	    -no-upstream: Do not show UPSTREAM changes
#	    -no-utr: Do not show 5_PRIME_UTR or 3_PRIME_UTR changes
#
snpeff:
    do: no
    reference:
    options: "-no-downstream -no-upstream"

##############################################################################
# Freebayes - Variant caller
#
# :Parameters:
#
# - ploidy: set the ploidy of your samples.
# - options: any options recognised by freebayes.
#
freebayes:
    ploidy: 1
    options:

##############################################################################
# Joint Freebayes - Variant caller
#
# :Parameters:
#
# - options: any options recognised by freebayes.
#
joint_freebayes:
    do: yes
    options:

##############################################################################
# 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

##############################################################################
# Filter VCF
#
# :Parameters:
#
# - freebayes_score: threshold for minimum freebayes quality 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

##############################################################################
# Filter Joint VCF
#
# :Parameters:
#
# - freebayes_score: threshold for minimum freebayes score.
# - frequency: threshold for minimum alternative allele frequency.
# - min_depth: threshold for minimum coverage depth.
#
joint_freebayes_vcf_filter:
    freebayes_score: 200
    frequency: 0.8
    min_depth: 20
