Skip to content

Commit

Permalink
Merge pull request nf-core#413 from nf-core/update-multiqc-freyja
Browse files Browse the repository at this point in the history
Update multiqc & add freyja to MQC
  • Loading branch information
Joon-Klaps authored Jan 25, 2024
2 parents de5146a + 33e7256 commit d915206
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 11 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Thank you to everyone else that has contributed by reporting bugs, enhancements
- [[PR #387](https://github.com/nf-core/viralrecon/pull/387)] - Software closes gracefully when encountering an error
- [[PR #395](https://github.com/nf-core/viralrecon/pull/395)] - Remove minia from default assemblers because it is unreliable
- [[PR #393](https://github.com/nf-core/viralrecon/pull/393)] - Changed primer set to params
- [[PR [#405](https://github.com/nf-core/viralrecon/issues/405)]] - Including parameter `depthcutoff` to freyja demix and boot
- [[PR #405](https://github.com/nf-core/viralrecon/pull/412)] - Including parameter `depthcutoff` to freyja demix and boot
- [[PR #413](https://github.com/nf-core/viralrecon/pull/413)] - Update multiqc module & include freyja in report

### Parameters

Expand All @@ -44,6 +45,7 @@ Note, since the pipeline is now using Nextflow DSL2, each process will be run wi
| Dependency | Old version | New version |
| ---------- | ----------- | ----------- |
| `freyja` | | 1.3.12 |
| `multiqc` | 1.14 | 1.19 |

> **NB:** Dependency has been **updated** if both old and new version information is present.
>
Expand Down
6 changes: 6 additions & 0 deletions assets/multiqc_config_illumina.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ run_modules:
- quast
- pangolin
- cutadapt
- freyja

module_order:
- fastqc:
Expand Down Expand Up @@ -62,6 +63,11 @@ module_order:
info: "This section of the report shows Pangolin lineage analysis results for the called variants."
path_filters:
- "./variants/*.pangolin.csv"
- freyja:
name: "VARIANTS: Freyja"
info: "This section of the report shows relative lineage abundances from mixed SARS-CoV-2 samples from Freyja demix."
path_filters:
- "./freyja_demix/*.tsv"
- bcftools:
name: "VARIANTS: BCFTools"
info: "This section of the report shows BCFTools stats results for the called variants."
Expand Down
4 changes: 4 additions & 0 deletions assets/multiqc_config_nanopore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ run_modules:
- snpeff
- quast
- pangolin
- freyja

module_order:
- pangolin:
Expand All @@ -26,6 +27,9 @@ module_order:
path_filters:
- "./samtools_stats/*"
- mosdepth
- freyja:
path_filters:
- "./freyja_demix/*.tsv"
- bcftools:
path_filters:
- "./bcftools_stats/*.txt"
Expand Down
1 change: 1 addition & 0 deletions conf/modules_illumina.config
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ if (!params.skip_variants) {
publishDir = [
path: { "${params.outdir}/variants/freyja/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
]
}
}
Expand Down
1 change: 1 addition & 0 deletions conf/modules_nanopore.config
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ if (!params.skip_freyja) {
publishDir = [
path: { "${params.outdir}/${params.artic_minion_caller}/freyja/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
]
}
}
Expand Down
Binary file added docs/images/freyja_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ Phylogenetic Assignment of Named Global Outbreak LINeages ([Pangolin](https://gi

[Freyja](https://github.com/andersen-lab/Freyja) is a tool to recover relative lineage abundances from mixed SARS-CoV-2 samples from a sequencing dataset (BAM aligned to the Hu-1 reference). The method uses lineage-determining mutational "barcodes" derived from the [UShER](https://usher-wiki.readthedocs.io/en/latest/#) global phylogenetic tree as a basis set to solve the constrained (unit sum, non-negative) de-mixing problem.

<p align="center"><img src="images/freyja_screenshot.png" alt="Freyja screenshot"></p>

### Nanopore: ASCIIGenome

<details markdown="1">
Expand Down Expand Up @@ -641,6 +643,8 @@ iVar outputs a tsv format which is not compatible with downstream analysis such

[Freyja](https://github.com/andersen-lab/Freyja) is a tool to recover relative lineage abundances from mixed SARS-CoV-2 samples from a sequencing dataset (BAM aligned to the Hu-1 reference). The method uses lineage-determining mutational "barcodes" derived from the [UShER](https://usher-wiki.readthedocs.io/en/latest/#) global phylogenetic tree as a basis set to solve the constrained (unit sum, non-negative) de-mixing problem.

<p align="center"><img src="images/freyja_screenshot.png" alt="Freyja screenshot"></p>

### ASCIIGenome

<details markdown="1">
Expand Down
7 changes: 4 additions & 3 deletions modules/local/multiqc_illumina.nf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
process MULTIQC {
label 'process_medium'

conda "bioconda::multiqc=1.14"
conda "bioconda::multiqc=1.19"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' :
'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/multiqc:1.19--pyhdfd78af_0' :
'quay.io/biocontainers/multiqc:1.19--pyhdfd78af_0' }"

input:
path 'multiqc_config.yaml'
Expand Down Expand Up @@ -32,6 +32,7 @@ process MULTIQC {
path ('assembly_spades/*')
path ('assembly_unicycler/*')
path ('assembly_minia/*')
path ('freyja_demix/*')

output:
path "*multiqc_report.html" , emit: report
Expand Down
7 changes: 4 additions & 3 deletions modules/local/multiqc_nanopore.nf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
process MULTIQC {
label 'process_medium'

conda "bioconda::multiqc=1.14"
conda "bioconda::multiqc=1.19"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' :
'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/multiqc:1.19--pyhdfd78af_0' :
'quay.io/biocontainers/multiqc:1.19--pyhdfd78af_0' }"

input:
path 'multiqc_config.yaml'
Expand All @@ -25,6 +25,7 @@ process MULTIQC {
path ('snpeff/*')
path pangolin_lineage
path nextclade_clade
path ('freyja_demix/*')

output:
path "*multiqc_report.html", emit: report
Expand Down
7 changes: 5 additions & 2 deletions workflows/illumina.nf
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ workflow ILLUMINA {
//
// SUBWORKFLOW: Determine variants with Freyja
//
ch_freyja_multiqc = Channel.empty()
if (!params.skip_variants && !params.skip_freyja) {
BAM_VARIANT_DEMIX_BOOT_FREYJA(
ch_bam,
Expand All @@ -486,7 +487,8 @@ workflow ILLUMINA {
params.freyja_barcodes,
params.freyja_lineages,
)
ch_versions= ch_versions.mix(BAM_VARIANT_DEMIX_BOOT_FREYJA.out.versions)
ch_versions = ch_versions.mix(BAM_VARIANT_DEMIX_BOOT_FREYJA.out.versions)
ch_freyja_multiqc = BAM_VARIANT_DEMIX_BOOT_FREYJA.out.demix
}

//
Expand Down Expand Up @@ -670,7 +672,8 @@ workflow ILLUMINA {
ch_cutadapt_multiqc.collect{it[1]}.ifEmpty([]),
ch_spades_quast_multiqc.collect{it[1]}.ifEmpty([]),
ch_unicycler_quast_multiqc.collect{it[1]}.ifEmpty([]),
ch_minia_quast_multiqc.collect{it[1]}.ifEmpty([])
ch_minia_quast_multiqc.collect{it[1]}.ifEmpty([]),
ch_freyja_multiqc.collect{it[1]}.ifEmpty([]),
)
multiqc_report = MULTIQC.out.report.toList()
}
Expand Down
7 changes: 5 additions & 2 deletions workflows/nanopore.nf
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ workflow NANOPORE {
//
// SUBWORKFLOW: Determine variants with Freyja
//
ch_freyja_multiqc = Channel.empty()
if (!params.skip_freyja) {
BAM_VARIANT_DEMIX_BOOT_FREYJA(
ARTIC_MINION.out.bam_primertrimmed,
Expand All @@ -453,7 +454,8 @@ workflow NANOPORE {
params.freyja_barcodes,
params.freyja_lineages,
)
ch_versions= ch_versions.mix(BAM_VARIANT_DEMIX_BOOT_FREYJA.out.versions)
ch_versions = ch_versions.mix(BAM_VARIANT_DEMIX_BOOT_FREYJA.out.versions)
ch_freyja_multiqc = BAM_VARIANT_DEMIX_BOOT_FREYJA.out.demix
}

//
Expand Down Expand Up @@ -564,7 +566,8 @@ workflow NANOPORE {
ch_quast_multiqc.collect{it[1]}.ifEmpty([]),
ch_snpeff_multiqc.collect{it[1]}.ifEmpty([]),
ch_pangolin_multiqc.collect{it[1]}.ifEmpty([]),
ch_nextclade_multiqc.collectFile(name: 'nextclade_clade_mqc.tsv').ifEmpty([])
ch_nextclade_multiqc.collectFile(name: 'nextclade_clade_mqc.tsv').ifEmpty([]),
ch_freyja_multiqc.collect{it[1]}.ifEmpty([]),
)
multiqc_report = MULTIQC.out.report.toList()
}
Expand Down

0 comments on commit d915206

Please sign in to comment.