report_comment: >
  This report has been generated by the <a href="https://github.com/nf-core/crisprseq/releases/tag/2.1.1" target="_blank">nf-core/crisprseq</a>
  analysis pipeline. For information about how to interpret these results, please see the
  <a href="https://nf-co.re/crisprseq/2.1.1/docs/output" target="_blank">documentation</a>.
report_section_order:
  "nf-core-crisprseq-methods-description":
    order: -1000
  software_versions:
    order: -1001
  "nf-core-crisprseq-summary":
    order: -1002

export_plots: true

# Modules to run
run_modules:
  - custom_content
  - fastqc
  - cutadapt

# Custom tables and plots
custom_data:
  # Summary of edition plot
  edition_plot:
    plot_type: "bargraph"
    file_format: "csv"
    section_name: "RESULTS: Type of edition"
    description: |
      Number of reads classified according to edition types.
      Reads are classified between WT (without an edit), template based modifications and indels.
      Indels are divided between deletions, insertions and delins (deletion + insertion).
      Deletions and insertions can be out of frame or in frame
    categories:
      Wt:
        name: "WT reads"
        color: "#C0C0C0"
      Template-based:
        name: "Template-based modifications"
        color: "#E9AF82"
      Delins:
        name: "DelIns"
        color: "#D5B1F5"
      Ins_inframe:
        name: "Insertions in frame"
        color: "#B5D5C1"
      Ins_outframe:
        name: "Insertions out of frame"
        color: "#80D09F"
      Dels_inframe:
        name: "Deletions in frame"
        color: "#BFD0EB"
      Dels_outframe:
        name: "Deletions out of frame"
        color: "#699AE9"
    pconfig:
      id: "edition_bargraph"
      title: "Reads by edition type"
      ylab: "Read count"
  # Indels QC plot
  indel_qc_plot:
    plot_type: "bargraph"
    file_format: "csv"
    section_name: "RESULTS: QC of indels"
    description: |
      Number of reads classified between WT and containing indels.
      Both types are classified between passing the filtering steps or not.
      Indel reads passing the filtering steps are divided input:
        reads with a modification above the error rate and located in the common edit window;
        above the error rate but not in the edit region;
        below the error rate and within the edit region;
        below the error rate and not in the the edit region;
    categories:
      Wt NOT passing filter:
        name: "WT reads not passing filtering steps"
        color: "#302F2F"
      Wt passing filter:
        name: "WT reads passing filtering steps"
        color: "#C0C0C0"
      Indels NOT passing filter:
        name: "Reads with indels not passing filtering steps"
        color: "#696868"
      Above error & in pick:
        name: "Reads with indels above the error rate and within the edition region"
        color: "#80D09F"
      NOT above error & in pick:
        name: "Reads with indels below the error rate and within the edition region"
        color: "#FFB570"
      Above error & NOT in pick:
        name: "Reads with indels above the error rate and outside the edition region"
        color: "#F89D47"
      NOT above error & NOT in pick:
        name: "Reads with indels below the error rate and outside the edition region"
        color: "#EB5555"
    pconfig:
      id: "indelqc_bargraph"
      title: "Read indels quality control"
      ylab: "Read count"
  # Read processing summary table
  read_processing:
    id: "read_processing"
    section_name: "Read processing summary"
    plot_type: "table"
    description: |
      Table showing the number of input raw reads per sample and the percentage of reads after each processing step:
        reads merged with Pear;
        reads passing quality filters;
        number of resulting clusters after UMI clustering of reads;
        number of aligned reads
    pconfig:
      id: "read_processing"
      namespace: "Read processing summary"
      table_title: "Read processing summary"
    headers:
      Raw reads:
        title: "Raw reads"
        description: "Number of input raw reads"
        format: "{:,.0f}"
        scale: "PuBu"
      Merged reads:
        title: "Merged reads"
        description: "Percentage of merged reads"
        suffix: "%"
        max: 100
        min: 0
        scale: "RdYlGn"
      Quality filtered reads:
        title: "Quality reads"
        description: "Percentage of reads passing the quality filter"
        suffix: "%"
        max: 100
        min: 0
        scale: "RdYlGn"
      Clustered reads:
        title: "Clusters"
        description: "Number of UMI clusters after read clustering"
        format: "{:,.0f}"
        scale: "PuBu"
      Aligned reads:
        title: "Aligned reads"
        description: "Percentage of aligned reads or UMI clusters"
        suffix: "%"
        max: 100
        min: 0
        scale: "RdYlGn"

sp:
  edition_plot:
    fn: "*_edits.csv"
  indel_qc_plot:
    fn: "*_QC-indels.csv"
  read_processing:
    fn: "*_reads-summary.csv"
  cutadapt:
    fn: "*.cutadapt.log"

# Define the order of sections
module_order:
  - fastqc
  - cutadapt
  - custom_content

# Set the order of custom code plots and tables
custom_content:
  order:
    - read_processing
    - edition_plot
    - indel_qc_plot

# Order of table columns
table_columns_placement:
  Read processing summary:
    Raw reads: 100
    Merged reads: 200
    Quality filtered reads: 300
    Clustered reads: 400
    Aligned reads: 500

# Add a comment to cutadapt section showing filtered reads
section_comments:
  cutadapt_filtered_reads: "Cutadapt is selecting reads passing quality filters."
