Commit 55777e67 authored by Joanna Fourquet's avatar Joanna Fourquet
Browse files

fix multiqc config

parent 5baab76b
......@@ -7,16 +7,18 @@ extra_fn_clean_trim:
- "cleaned_"
- "raw_"
- '_kept_contigs'
- '.count_reads_on_contigs.flagstat'
- '.no_filter.flagstat'
- '.host_filter.flagstat'
- '.count_reads_on_contigs'
- '.no_filter'
- '.host_filter'
- '_scaffolds'
- '.txt'
- '_R1'
- '.contigs'
- '.sort'
- '_select_contigs'
- '_kaiju_MEM_verbose'
- '_sickle'
extra_fn_clean_exts:
- "_select_contigs_cpm"
module_order:
- fastqc:
......
......@@ -326,8 +326,8 @@ if (!params.skip_removal_host && ('01_clean_qc' in step || '02_assembly' in step
output:
set replicateId, file("cleaned_${replicateId}_R1.fastq.gz"), file("cleaned_${replicateId}_R2.fastq.gz") into filter_reads_ch
file("host_filter_flagstat/*.host_filter.flagstat") into host_filter_ch_for_multiqc
file("${replicateId}.no_filter.flagstat") into flagstat_bam_ch_for_multiqc
file("host_filter_flagstat/${replicateId}.host_filter.flagstat") into flagstat_after_host_filter_for_multiqc_ch
file("${replicateId}.no_filter.flagstat") into flagstat_before_filter_for_multiqc_ch
file("${replicateId}_cleaned_R1.nb_bases")
file("${replicateId}_cleaned_R2.nb_bases")
......@@ -350,8 +350,8 @@ if (!params.skip_removal_host && ('01_clean_qc' in step || '02_assembly' in step
}
else {
intermediate_cleaned_ch.set{preprocessed_reads_ch}
Channel.empty().set{host_filter_ch_for_multiqc}
Channel.empty().set{flagstat_bam_ch_for_multiqc}
Channel.empty().set{flagstat_after_host_filter_for_multiqc_ch}
Channel.empty().set{flagstat_before_filter_for_multiqc_ch}
}
preprocessed_reads_ch.into{
......@@ -371,7 +371,8 @@ process fastqc_raw {
set replicateId, file(read1), file(read2) from raw_reads_fastqc
output:
file("${replicateId}") into fastqc_raw_ch_for_multiqc
file("${replicateId}/*.zip") into fastqc_raw_for_multiqc_ch
file("${replicateId}/*.html") into fastqc_raw_ch
when: ('01_clean_qc' in step || '02_assembly' in step || '03_filtering' in step || '04_structural_annot' in step || '05_alignment' in step || '06_func_annot' in step || '07_taxo_affi' in step || '08_binning' in step) && (!params.skip_01_clean_qc)
......@@ -390,7 +391,8 @@ process fastqc_cleaned {
set replicateId, file(read1), file(read2) from clean_reads_for_fastqc_ch
output:
file("cleaned_${replicateId}") into fastqc_cleaned_ch_for_multiqc
file("cleaned_${replicateId}/*.zip") into fastqc_cleaned_for_multiqc_ch
file("cleaned_${replicateId}/*.html") into fastqc_cleaned_ch
when: ('01_clean_qc' in step || '02_assembly' in step || '03_filtering' in step || 'structural' in step || '05_alignment' in step || '06_func_annot' in step || '07_taxo_affi' in step || '08_binning' in step) && (!params.skip_01_clean_qc)
......@@ -589,6 +591,7 @@ process quast {
output:
file("${replicateId}_all_contigs_QC/*") into quast_assembly_ch
file("${replicateId}_all_contigs_QC/report.tsv") into quast_assembly_for_multiqc_ch
when: ('02_assembly' in step || '03_filtering' in step || '04_structural_annot' in step || '05_alignment' in step || '06_func_annot' in step || '07_taxo_affi' in step || '08_binning' in step)
......@@ -615,7 +618,7 @@ process reads_deduplication {
set replicateId, file("${replicateId}_R1_dedup.fastq.gz"), file("${replicateId}_R2_dedup.fastq.gz") into deduplicated_reads_ch, deduplicated_reads_copy_ch
set replicateId, file("${replicateId}.count_reads_on_contigs.idxstats") into (idxstats_filter_logs_ch, idxstats_filter_logs_for_multiqc_ch)
set replicateId, file("${replicateId}.count_reads_on_contigs.flagstat") into flagstat_filter_logs_ch
file("${replicateId}.count_reads_on_contigs.flagstat") into flagstat_filter_logs_for_multiqc_ch
file("${replicateId}.count_reads_on_contigs.flagstat") into flagstat_after_dedup_reads_for_multiqc_ch
file("${replicateId}_dedup_R1.nb_bases")
file("${replicateId}_dedup_R2.nb_bases")
......@@ -650,16 +653,17 @@ process assembly_filter {
val min_cpm from min_contigs_cpm_ch
output:
set replicateId, file("${replicateId}_select_contigs.${min_cpm}.fasta") into select_assembly_ch
set replicateId, file("${replicateId}_discard_contigs.${min_cpm}.fasta") into discard_assembly_ch
set replicateId, file("${replicateId}_select_contigs_cpm${min_cpm}.fasta") into select_assembly_ch
set replicateId, file("${replicateId}_discard_contigs_cpm${min_cpm}.fasta") into discard_assembly_ch
file("${replicateId}_select_contigs_QC/*") into quast_select_contigs_ch
file("${replicateId}_select_contigs_QC/report.tsv") into quast_select_contigs_for_multiqc_ch
when: ('03_filtering' in step)
script:
"""
Filter_contig_per_cpm.py -i ${idxstats} -f ${assembly_file} -c ${min_cpm} -s ${replicateId}_select_contigs.${min_cpm}.fasta -d ${replicateId}_discard_contigs.${min_cpm}.fasta
metaquast.py --threads "${task.cpus}" --rna-finding --max-ref-number 0 --min-contig 0 "${replicateId}_select_contigs.${min_cpm}.fasta" -o "${replicateId}_select_contigs_QC"
Filter_contig_per_cpm.py -i ${idxstats} -f ${assembly_file} -c ${min_cpm} -s ${replicateId}_select_contigs_cpm${min_cpm}.fasta -d ${replicateId}_discard_contigs_cpm${min_cpm}.fasta
metaquast.py --threads "${task.cpus}" --rna-finding --max-ref-number 0 --min-contig 0 "${replicateId}_select_contigs_cpm${min_cpm}.fasta" -o "${replicateId}_select_contigs_QC"
"""
}
......@@ -679,7 +683,8 @@ process prokka {
set replicateId, file(assembly_file) from select_assembly_ch
output:
set replicateId, file("*") into prokka_ch, prokka_for_multiqc_ch
set replicateId, file("*") into prokka_ch
set replicateId, file("PROKKA_${replicateId}/${replicateId}.txt") into prokka_for_multiqc_ch
when: ('04_structural_annot' in step || '05_alignment' in step || '06_func_annot' in step || '07_taxo_affi' in step || '08_binning' in step)
......@@ -1474,23 +1479,23 @@ process multiqc {
input:
file multiqc_config from multiqc_config_ch
file ('*_cutadapt.log') from cutadapt_log_ch_for_multiqc.collect().ifEmpty([])
file ('*_sickle.log') from sickle_log_ch_for_multiqc.collect().ifEmpty([])
file ('raw_*') from fastqc_raw_ch_for_multiqc.collect().ifEmpty([])
file ('cleaned_*') from fastqc_cleaned_ch_for_multiqc.collect().ifEmpty([])
file("*_select_contigs_QC/*") from quast_select_contigs_ch.collect().ifEmpty([])
file("*_all_contigs_QC/*") from quast_assembly_ch.collect().ifEmpty([])
file ('*') from cutadapt_log_ch_for_multiqc.collect().ifEmpty([])
file ('*') from sickle_log_ch_for_multiqc.collect().ifEmpty([])
file ('*') from fastqc_raw_for_multiqc_ch.collect().ifEmpty([])
file ('*') from fastqc_cleaned_for_multiqc_ch.collect().ifEmpty([])
file("*_select_contigs_QC/*") from quast_select_contigs_for_multiqc_ch.collect().ifEmpty([])
file("*_all_contigs_QC/*") from quast_assembly_for_multiqc_ch.collect().ifEmpty([])
file("*") from prokka_for_multiqc_ch.collect().ifEmpty([])
file("*") from kaiju_summary_for_multiqc_ch.collect().ifEmpty([])
file("*.summary") from featureCounts_out_ch_for_multiqc.collect().ifEmpty([])
file("*") from featureCounts_out_ch_for_multiqc.collect().ifEmpty([])
file ('software_versions/*') from software_versions_yaml.collect().ifEmpty([])
file ('short_summary_*.txt') from busco_summary_to_multiqc.collect().ifEmpty([])
file("host_filter_flagstat/*.host_filter.flagstat") from host_filter_ch_for_multiqc.collect().ifEmpty([])
file("*.no_filter.flagstat") from flagstat_bam_ch_for_multiqc.collect().ifEmpty([])
file("*") from flagstat_filter_logs_for_multiqc_ch.collect().ifEmpty([])
file ('*') from busco_summary_to_multiqc.collect().ifEmpty([])
file("host_filter_flagstat/*") from flagstat_after_host_filter_for_multiqc_ch.collect().ifEmpty([])
file("*") from flagstat_before_filter_for_multiqc_ch.collect().ifEmpty([])
file("*") from flagstat_after_dedup_reads_for_multiqc_ch.collect().ifEmpty([])
output:
file "*multiqc_report.html" into ch_multiqc_report
file "multiqc_report.html" into ch_multiqc_report
script:
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment