#############################################################################
#
#   __________________________________________________________________
#  | WARNING: ONLY CHANGE THIS FILE IF YOU KNOW WHAT YOU'RE DOING!!!  |
#  |          ZARP DOES NOT GUARANTEE SENSIBLE RESULTS IF PARAMETERS  |
#  |          ARE CHANGED HERE.                                       |
#  |__________________________________________________________________|
#
# RULE CONFIGURATION
#
# For RUN SPECIFIC PARAMETERS (sample specific parameters have to be
# defined in the samples table!)
#
# Specify path to this file in main config.yaml under key 'rule_config'
#
# One top-level keyword per RULE (not per tool, as one tool might be used
# with different settings by more than one rule)
#
# Parameters have to be specified exactly like they have to appear on the
# command line call (e.g. -n or --name)
#
# All values need to be QUOTED STRINGS; to specify flags (i.e., parameters
# without values), specify an empty string as value.
#
# Note: number of threads has to be set in the respective Snakefile
#
#############################################################################


# Specify parameters for individual rules:

################################################
# MAIN SNAKEFILE / SEQUENCING-MODE INDEPENDENT #
################################################

# start: No parameters to change here

fastqc:

create_index_star:

extract_transcriptome:

# concatenate_transcriptome_and_genome: No parameters to change here

create_index_salmon:

create_index_kallisto:

extract_transcripts_as_bed12:

index_genomic_alignment_samtools:

calculate_TIN_scores:
    # Minimum number of reads mapped to a transcript (default 10, ZARP
    # recommends 0)
    -c: '0'

salmon_quantmerge_genes:

salmon_quantmerge_transcripts:

kallisto_merge_genes:
    --verbose: ''

kallisto_merge_transcripts:
    --verbose: ''

pca_salmon:
    --verbose: ''

pca_kallisto:
    --verbose: ''

star_rpm:

# rename_star_rpm_for_alfa: No parameters to change here

generate_alfa_index:

alfa_qc:

prepare_multiqc_config:

multiqc_report:

sort_bed_4_big:

prepare_bigWig:

##########################################
# SEQUENCING-MODE SPECIFIC               #
# single-end: rule name without prefix,  #
# paired-end: rule name with prefix 'pe' #
##########################################

remove_adapters_cutadapt:
    # Search for all the given adapter sequences repeatedly, either until no
    # adapter match was found or until n rounds have been performed (default 1,
    # ZARP recommends 2)
    -n: '2'
    # Discard processed reads that are shorter than m; note that cutadapt uses
    # a default value of m=0, causing reads without any nucleotides remaining
    # after proessing to be retained; as "empty reads" will cause errors in
    # downstream applications in ZARP, we have changed the default to m=1,
    # meaning that only read fragments of at least 1 nt will be retained after
    # processing. The default will be overridden by the value specified here,
    # but for the reason stated above, we strongly recommend NOT to set m=0;
    # cf. https://cutadapt.readthedocs.io/en/stable/guide.html#filtering-reads
    -m: '10'

pe_remove_adapters_cutadapt:
    # Search for all the given adapter sequences repeatedly, either until no
    # adapter match was found or until n rounds have been performed (default 1,
    # ZARP recommends 2)
    -n: '2'
    # Discard processed reads that are shorter than m; note that cutadapt uses
    # a default value of m=0, causing reads without any nucleotides remaining
    # after proessing to be retained; as "empty reads" will cause errors in
    # downstream applications in ZARP, we have changed the default to m=1,
    # meaning that only read fragments of at least 1 nt will be retained after
    # processing. The default will be overridden by the value specified here,
    # but for the reason stated above, we strongly recommend NOT to set m=0;
    # cf. https://cutadapt.readthedocs.io/en/stable/guide.html#filtering-reads
    -m: '10'

remove_polya_cutadapt:
    # Discard processed reads that are shorter than m; note that cutadapt uses
    # a default value of m=0, causing reads without any nucleotides remaining
    # after proessing to be retained; as "empty reads" will cause errors in
    # downstream applications in ZARP, we have changed the default to m=1,
    # meaning that only read fragments of at least 1 nt will be retained after
    # processing. The default will be overridden by the value specified here,
    # but for the reason stated above, we strongly recommend NOT to set m=0;
    # cf. https://cutadapt.readthedocs.io/en/stable/guide.html#filtering-reads
    -m: '10'
    # Minimal overlap of adapter and read (default 3, ZARP recommends 1 in
    # order to remove all 3' As)
    -O: '1'

pe_remove_polya_cutadapt:
    # Discard processed reads that are shorter than m; note that cutadapt uses
    # a default value of m=0, causing reads without any nucleotides remaining
    # after proessing to be retained; as "empty reads" will cause errors in
    # downstream applications in ZARP, we have changed the default to m=1,
    # meaning that only read fragments of at least 1 nt will be retained after
    # processing. The default will be overridden by the value specified here,
    # but for the reason stated above, we strongly recommend NOT to set m=0;
    # cf. https://cutadapt.readthedocs.io/en/stable/guide.html#filtering-reads
    -m: '10'
    # Minimal overlap of adapter and read (default 3, ZARP recommends 1 in
    # order to remove all 3' As)
    -O: '1'

map_genome_star:
    # The score range below the maximum score for multimapping alignments
    # (default 1, ZARP recommends 0)
    --outFilterMultimapScoreRange: '0'
    # Keep only those reads that contain junctions that passed filtering into
    # "SJ.out.tab" (default 'Normal', ZARP recommends 'BySJout', as this
    # reduces the number of spurious junctions )
    --outFilterType: 'BySJout'

pe_map_genome_star:
    # The score range below the maximum score for multimapping alignments
    # (default 1, ZARP recommends 0)
    --outFilterMultimapScoreRange: '0'
    # Keep only those reads that contain junctions that passed filtering into
    # "SJ.out.tab" (default 'Normal', ZARP recommends 'BySJout', as this
    # reduces the number of spurious junctions )
    --outFilterType: 'BySJout'

quantification_salmon:
    # Correct for sequence specific biases; cf.
    # https://salmon.readthedocs.io/en/latest/salmon.html#seqbias
    --seqBias: ''
    # Enable selective alignment of the sequencing reads when mapping them to
    # the transcriptome; this can improve both the sensitivity and specificity
    # of mapping and, as a result, can improve quantification accuracy; cf.
    # https://salmon.readthedocs.io/en/latest/salmon.html#validatemappings
    --validateMappings: ''

pe_quantification_salmon:
    # Correct for sequence specific biases, cf.
    # https://salmon.readthedocs.io/en/latest/salmon.html#seqbias
    --seqBias: ''
    # Enable selective alignment of the sequencing reads when mapping them to
    # the transcriptome; this can improve both the sensitivity and specificity
    # of mapping and, as a result, can improve quantification accuracy; cf.
    # https://salmon.readthedocs.io/en/latest/salmon.html#validatemappings
    --validateMappings: ''
    # Write out the names of reads (or mates in paired-end reads) that do not
    # map to the transcriptome. For paired-end libraries this gives flags that
    # indicate how a read failed to map
    --writeUnmappedNames: ''

genome_quantification_kallisto:

pe_genome_quantification_kallisto: