


# =========================================== Sections for the users
input_directory: "%(input_directory)s"
input_extension: "%(input_extension)s"
input_pattern: "%(input_pattern)s"
input_samples:
    file1: "%(file1)s"
    file2: "%(file2)s"

# list of your input file
#samples:
#    file1: "%(file1)s"
#:    file2: "%(file2)s"


#project: "%(project)s"

# if files are required for a pipeline and are within sequana or should
# # be downloaded before the pipeline provide them in this section
# # Note that sequana and url fields are followed by itemised files or links
# using
# # the front dashes
requirements:
    - phiX174.fa


# =========================================== For testing only
# If True, only a subset of the reads (N) are used

fastq_sampling:
    do: no
    N: 100000

# =========================================== Sections related to external tools



# GATK is absent in conda because it is not a free software
# You must set the GATK bin path.
# gatk_bin: "java -jar /path/to/GenomeAnalysisTK.jar"
gatk_bin: GenomeAnalysisTK

# Bwa parameter for reference mapping
bwa_ref:
    reference: "%(reference)s"
    index:
        options: '-a is'
    mem:
        options: '-T 30'
        # -R option for GATK
        read_groups: '@RG\\tID:1\\tSM:1\\tPL:illumina'
        # -t option (number thread)
        threads: 2 

# snpEff parameter
#Results filter options:
#	-fi , -filterInterval: Only analyze changes that intersect with the intervals specified in this file (you may use this option many times)
#	-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
#	-no EffectType: Do not show 'EffectType'. This option can be used several times.
 
snpeff:
    do: yes
    reference:
    options: "-no-downstream -no-upstream"

# Software parameters

bedtools: 
    options: '-d'

freebayes:
    options: '--ploidy 1'

indel_realigner:
    do: yes
    options: ''

mark_duplicates:
    do: yes
    options: ''

report_mapping:
    do: yes
    k: 2
    circular: yes
    window_size: 1001
    high_threshold: 3
    low_threshold: -3

vcf_filter:
    QUAL: 1000
    FREQ: 0.7
    INFO:
        DP: '>= 10'

fastqc:
    options: "--nogroup"

##################################################################
# Use by Phix_removal pipeline to remove reads with the 
# phix found in the bwa_phix:reference section
#
##################################################################
bwa_phix:
    do: yes
    reference: "phiX174.fa"
    index:
        options: '-a is'
    mem:
        options: '-T 30'
        read_groups: '@RG\\tID:1\\tSM:1\\tPL:illumina'
        threads: 2 

#################################################################
# Quality trimming and adapter removal
#   - quality: 0 means no trimming, 30 means keep base with quality 
#       above 30. If paired, you may provide two different values
#       using e.g. "30,32"
#   - m: 20 means discard trimmed reads that are shorter than 20.
#   - tool: only cutadapt supported for now
#   ref: http://cutadapt.readthedocs.io/
#################################################################
cutadapt:
    do: yes
    tool: cutadapt
    fwd: "%(adapter_fwd)s"
    rev: "%(adapter_rev)s"
    m: 20   # cutoff
    mode: "g"   # g for 5' adapter, 
                # a for 3' 
                # b for both 5'/3'
                # In cutadapt, the R1 requires -g and R2 requires -G
                # Here, we use only the small caps and Sequana takes
                # care of using the small/big caps when it matters
    quality: "30"  
    kwargs: "-O 6 --trim-n"


########################################################### Kraken
# For taxonomy. Used in quality_taxon pipeline
kraken:
    database: "%(kraken)s"


# denovo assembly
digital_norm:
    do: yes
    options:
        # kmer size to use
        --ksize: 20
        # when median k-mer coverage level is above the number the read is not kept
        --cutoff: 20
        # number of tables and size of tables. 
        # memory used is i(n_table * max-tablesize) bytes.
        --n_tables: 4
        --max-tablesize: 3e9       

spades:
    threads: 8
    options: '--careful'

quast:
    options: ''

compressor:
    source: fastq.gz
    target: fastq.bz2
    recursive: True

