Commit c47901c1 authored by MARTIN Pierre's avatar MARTIN Pierre
Browse files

multiqc versions fix (nextflow) + multiqc_data folder published

parent 49ac5e5f
...@@ -20,7 +20,7 @@ module_order: ...@@ -20,7 +20,7 @@ module_order:
name: 'Quast primary assembly' name: 'Quast primary assembly'
info: 'This section of the report shows quast results after assembly' info: 'This section of the report shows quast results after assembly'
path_filters: path_filters:
- 'report.tsv' - '*quast_hifi/*/report.tsv'
- prokka - prokka
- featureCounts - featureCounts
......
...@@ -49,12 +49,12 @@ module_order: ...@@ -49,12 +49,12 @@ module_order:
name: 'Quast primary assembly' name: 'Quast primary assembly'
info: 'This section of the report shows quast results after assembly' info: 'This section of the report shows quast results after assembly'
path_filters: path_filters:
- 'report.tsv' - '*quast_primary/*/report.tsv'
- quast: - quast:
name: 'Quast filtered assembly' name: 'Quast filtered assembly'
info: 'This section of the report shows quast results after filtering of assembly' info: 'This section of the report shows quast results after filtering of assembly'
path_filters: path_filters:
- 'report.tsv' - '*quast_filtered/*/report.tsv'
- samtools: - samtools:
name : 'Reads after deduplication' name : 'Reads after deduplication'
info: 'This section reports of deduplicated reads alignement against contigs with bwa.' info: 'This section reports of deduplicated reads alignement against contigs with bwa.'
......
...@@ -22,7 +22,8 @@ regexes = { ...@@ -22,7 +22,8 @@ regexes = {
'Prokka': ['v_prokka.txt', r"prokka (\S+)"], 'Prokka': ['v_prokka.txt', r"prokka (\S+)"],
'Kaiju': ['v_kaiju.txt', r"Kaiju (\S+)"], 'Kaiju': ['v_kaiju.txt', r"Kaiju (\S+)"],
'Samtools': ['v_samtools.txt', r"samtools (\S+)"], 'Samtools': ['v_samtools.txt', r"samtools (\S+)"],
'Bedtools': ['v_bedtools.txt', r"bedtools v(\S+)"] 'Bedtools': ['v_bedtools.txt', r"bedtools v(\S+)"],
'Eggnog-Mapper': ['v_eggnogmapper.txt', r"emapper-(\S+)"]
} }
results = OrderedDict() results = OrderedDict()
results['metagWGS'] = '<span style="color:#999999;\">N/A</span>' results['metagWGS'] = '<span style="color:#999999;\">N/A</span>'
...@@ -44,6 +45,7 @@ results['Prokka'] = '<span style="color:#999999;\">N/A</span>' ...@@ -44,6 +45,7 @@ results['Prokka'] = '<span style="color:#999999;\">N/A</span>'
results['Kaiju'] = '<span style="color:#999999;\">N/A</span>' results['Kaiju'] = '<span style="color:#999999;\">N/A</span>'
results['Samtools'] = '<span style="color:#999999;\">N/A</span>' results['Samtools'] = '<span style="color:#999999;\">N/A</span>'
results['Bedtools'] = '<span style="color:#999999;\">N/A</span>' results['Bedtools'] = '<span style="color:#999999;\">N/A</span>'
results['Eggnog-Mapper'] = '<span style="color:#999999;\">N/A</span>'
# Search each file using its regex # Search each file using its regex
for k, v in regexes.items(): for k, v in regexes.items():
......
...@@ -219,6 +219,7 @@ workflow { ...@@ -219,6 +219,7 @@ workflow {
// Shared report // Shared report
ch_prokka_report = Channel.empty() ch_prokka_report = Channel.empty()
ch_quant_report = Channel.empty() ch_quant_report = Channel.empty()
ch_v_eggnogmapper = Channel.empty()
if ( params.type.toUpperCase() == "SR" ) { if ( params.type.toUpperCase() == "SR" ) {
ch_multiqc_config = file(params.sr_multiqc_config, checkIfExists: true) ch_multiqc_config = file(params.sr_multiqc_config, checkIfExists: true)
...@@ -285,7 +286,7 @@ workflow { ...@@ -285,7 +286,7 @@ workflow {
ch_quant_report = SH.out.quant_report ch_quant_report = SH.out.quant_report
ch_v_eggnogmapper = SH.out.v_eggnogmapper ch_v_eggnogmapper = SH.out.v_eggnogmapper
GET_SOFTWARE_VERSIONS( ch_v_eggnogmapper ) GET_SOFTWARE_VERSIONS( ch_v_eggnogmapper.ifEmpty([]).first() )
ch_software_versions = GET_SOFTWARE_VERSIONS.out.yaml ch_software_versions = GET_SOFTWARE_VERSIONS.out.yaml
MULTIQC ( MULTIQC (
......
...@@ -10,7 +10,6 @@ process INDIVIDUAL_CD_HIT { ...@@ -10,7 +10,6 @@ process INDIVIDUAL_CD_HIT {
output: output:
path("${sampleId}.cd-hit-est.${pct_id}.fasta"), emit: clstr_fasta path("${sampleId}.cd-hit-est.${pct_id}.fasta"), emit: clstr_fasta
path("${sampleId}.cd-hit-est.${pct_id}.table_cluster_contigs.txt"), emit: clstr_table path("${sampleId}.cd-hit-est.${pct_id}.table_cluster_contigs.txt"), emit: clstr_table
path("${sampleId}.cd-hit-est.${pct_id}.fasta.clstr")
script: script:
""" """
...@@ -32,7 +31,6 @@ process GLOBAL_CD_HIT { ...@@ -32,7 +31,6 @@ process GLOBAL_CD_HIT {
output: output:
path "All-cd-hit-est.${pct_id}.fasta" path "All-cd-hit-est.${pct_id}.fasta"
path "All-cd-hit-est.${pct_id}.fasta.clstr"
path "table_clstr.txt", emit: clstr_table path "table_clstr.txt", emit: clstr_table
// when: ('06_func_annot' in step) // when: ('06_func_annot' in step)
......
...@@ -26,26 +26,26 @@ process FASTQC_CLEANED { ...@@ -26,26 +26,26 @@ process FASTQC_CLEANED {
tuple val(sampleId), path(read1), path(read2) tuple val(sampleId), path(read1), path(read2)
output: output:
path "cleaned_${sampleId}/*.zip", emit: zip path "${sampleId}/*.zip", emit: zip
path "cleaned_${sampleId}/*.html", emit: html path "${sampleId}/*.html", emit: html
script: script:
""" """
mkdir cleaned_${sampleId}; fastqc --nogroup --quiet -o cleaned_${sampleId} --threads ${task.cpus} ${read1} ${read2} mkdir ${sampleId}; fastqc --nogroup --quiet -o ${sampleId} --threads ${task.cpus} ${read1} ${read2}
""" """
} }
process FASTQC_HIFI { process FASTQC_HIFI {
tag "${sampleId}" tag "${sampleId}"
label 'FASTQC' label 'FASTQC'
publishDir "${params.outdir}/04_structural_annot/fastqc", mode: 'copy' publishDir "${params.outdir}/04_structural_annot/fastqc_hifi", mode: 'copy'
input: input:
tuple val(sampleId), path(read) tuple val(sampleId), path(read)
output: output:
path "hifi_${sampleId}/*.zip", emit: zip path "${sampleId}/*.zip", emit: zip
path "hifi_${sampleId}/*.html", emit: html path "${sampleId}/*.html", emit: html
script: script:
""" """
......
...@@ -15,7 +15,7 @@ process GET_SOFTWARE_VERSIONS { ...@@ -15,7 +15,7 @@ process GET_SOFTWARE_VERSIONS {
script: script:
""" """
echo $workflow.manifest.version > v_pipeline.txt echo $workflow.manifest.version > v_pipeline.txt
echo $workflow.manifest.nextflowVersion > v_nextflow.txt echo $workflow.nextflow.version > v_nextflow.txt
echo \$(bwa 2>&1) &> v_bwa.txt echo \$(bwa 2>&1) &> v_bwa.txt
cutadapt --version &> v_cutadapt.txt cutadapt --version &> v_cutadapt.txt
sickle --version &> v_sickle.txt sickle --version &> v_sickle.txt
......
...@@ -37,8 +37,6 @@ process KAIJU { ...@@ -37,8 +37,6 @@ process KAIJU {
} }
process MERGE_KAIJU { process MERGE_KAIJU {
tag "${sampleId}"
publishDir "${params.outdir}/01_clean_qc/01_3_taxonomic_affiliation_reads", mode: 'copy' publishDir "${params.outdir}/01_clean_qc/01_3_taxonomic_affiliation_reads", mode: 'copy'
input: input:
......
process ASSEMBLY_QUAST { process ASSEMBLY_QUAST {
tag "${sampleId}" tag "${sampleId}"
label 'QUAST' label 'QUAST'
publishDir "${params.outdir}/02_assembly", mode: 'copy' publishDir "${params.outdir}/02_assembly/quast_primary", mode: 'copy'
input: input:
tuple val(sampleId), path(assembly) tuple val(sampleId), path(assembly)
output: output:
path "${sampleId}_all_contigs_QC/*", emit: all path "${sampleId}/*", emit: all
path "${sampleId}_all_contigs_QC/${sampleId}_all_report.tsv", emit: report path "${sampleId}/report.tsv", emit: report
script: script:
""" """
mkdir ${sampleId}_all_contigs_QC/ mkdir ${sampleId}/
touch ${sampleId}_all_contigs_QC/report.tsv touch ${sampleId}/report.tsv
metaquast.py --threads ${task.cpus} --rna-finding --max-ref-number 0 --min-contig 0 ${assembly} -o ${sampleId}_all_contigs_QC metaquast.py --threads ${task.cpus} --rna-finding --max-ref-number 0 --min-contig 0 ${assembly} -o ${sampleId}
mv ${sampleId}_all_contigs_QC/report.tsv ${sampleId}_hifi_contigs_QC/${sampleId}_all_report.tsv
""" """
} }
process FILTERED_QUAST { process FILTERED_QUAST {
tag "${sampleId}" tag "${sampleId}"
label 'QUAST' label 'QUAST'
publishDir "${params.outdir}/03_filtering", mode: 'copy' publishDir "${params.outdir}/03_filtering/quast_filtered", mode: 'copy'
input: input:
tuple val(sampleId), path(assembly) tuple val(sampleId), path(assembly)
output: output:
path "${sampleId}_select_contigs_QC/*", emit: all path "${sampleId}/*", emit: all
path "${sampleId}_select_contigs_QC/${sampleId}_select_report.tsv", emit: report path "${sampleId}/report.tsv", emit: report
script: script:
""" """
mkdir ${sampleId}_select_contigs_QC/ mkdir ${sampleId}/
touch ${sampleId}_select_contigs_QC/select_report.tsv touch ${sampleId}/report.tsv
metaquast.py --threads ${task.cpus} --rna-finding --max-ref-number 0 --min-contig 0 ${assembly} -o ${sampleId}_select_contigs_QC metaquast.py --threads ${task.cpus} --rna-finding --max-ref-number 0 --min-contig 0 ${assembly} -o ${sampleId}
mv ${sampleId}_select_contigs_QC/report.tsv ${sampleId}_hifi_contigs_QC/${sampleId}_select_report.tsv
""" """
} }
process HIFI_QUAST { process HIFI_QUAST {
tag "${sampleId}" tag "${sampleId}"
label 'QUAST' label 'QUAST'
publishDir "${params.outdir}/04_structural_annot", mode: 'copy' publishDir "${params.outdir}/04_structural_annot/quast_hifi", mode: 'copy'
input: input:
tuple val(sampleId), path(assembly) tuple val(sampleId), path(assembly)
output: output:
path "${sampleId}_hifi_contigs_QC/*", emit: all path "${sampleId}/*", emit: all
path "${sampleId}_hifi_contigs_QC/${sampleId}_hifi_report.tsv", emit: report path "${sampleId}/report.tsv", emit: report
script: script:
""" """
mkdir ${sampleId}_hifi_contigs_QC/ mkdir ${sampleId}/
touch ${sampleId}_hifi_contigs_QC/report.tsv touch ${sampleId}/report.tsv
metaquast.py --threads ${task.cpus} --rna-finding --max-ref-number 0 --min-contig 0 ${assembly} -o ${sampleId}_hifi_contigs_QC metaquast.py --threads ${task.cpus} --rna-finding --max-ref-number 0 --min-contig 0 ${assembly} -o ${sampleId}
mv ${sampleId}_hifi_contigs_QC/report.tsv ${sampleId}_hifi_contigs_QC/${sampleId}_hifi_report.tsv
""" """
} }
\ No newline at end of file
...@@ -12,15 +12,16 @@ process MULTIQC { ...@@ -12,15 +12,16 @@ process MULTIQC {
path fastqc_clean_report path fastqc_clean_report
path kaiju_report path kaiju_report
path dedup_report path dedup_report
path assembly_report path 'quast_primary/*/report.tsv'
path filtered_report path 'quast_filtered/*/report.tsv'
path hifi_fastqc_report path hifi_fastqc_report
path hifi_quast_report path 'quast_hifi/*/report.tsv'
path prokka_report path prokka_report
path quant_report path quant_report
output: output:
path "multiqc_report.html", emit: report path "multiqc_report.html", emit: report
path "multiqc_data/*"
script: script:
""" """
......
process READS_DEDUPLICATION { process READS_DEDUPLICATION {
tag "${sampleId}"
publishDir "${params.outdir}/02_assembly", mode: 'copy', pattern: '*.fastq.gz' publishDir "${params.outdir}/02_assembly", mode: 'copy', pattern: '*.fastq.gz'
publishDir "${params.outdir}/02_assembly/logs", mode: 'copy', pattern: '*.idxstats' publishDir "${params.outdir}/02_assembly/logs", mode: 'copy', pattern: '*.idxstats'
publishDir "${params.outdir}/02_assembly/logs", mode: 'copy', pattern: '*.flagstat' publishDir "${params.outdir}/02_assembly/logs", mode: 'copy', pattern: '*.flagstat'
......
...@@ -81,7 +81,7 @@ workflow DATABASES { ...@@ -81,7 +81,7 @@ workflow DATABASES {
} }
process INDEX_HOST { process INDEX_HOST {
publishDir "${params.databases}/index_host" , mode: 'copy' publishDir "${params.databases}/index_host"
input: input:
path fasta path fasta
...@@ -96,7 +96,7 @@ process INDEX_HOST { ...@@ -96,7 +96,7 @@ process INDEX_HOST {
} }
process INDEX_KAIJU { process INDEX_KAIJU {
publishDir "${params.databases}/kaiju_db", mode: 'copy' publishDir "${params.databases}/kaiju_db"
input: input:
val database val database
...@@ -115,7 +115,7 @@ process INDEX_KAIJU { ...@@ -115,7 +115,7 @@ process INDEX_KAIJU {
} }
process EGGNOG_MAPPER_DB { process EGGNOG_MAPPER_DB {
publishDir "${params.databases}/eggnog_db", mode: 'copy' publishDir "${params.databases}/eggnog_db"
label 'EGGNOG' label 'EGGNOG'
output: output:
...@@ -129,7 +129,7 @@ process EGGNOG_MAPPER_DB { ...@@ -129,7 +129,7 @@ process EGGNOG_MAPPER_DB {
} }
process DOWNLOAD_TAXONOMY_DB { process DOWNLOAD_TAXONOMY_DB {
publishDir "${params.databases}/taxonomy_db", mode: 'copy' publishDir "${params.databases}/taxonomy_db"
input: input:
val accession2taxid val accession2taxid
......
...@@ -46,6 +46,8 @@ workflow SHARED { ...@@ -46,6 +46,8 @@ workflow SHARED {
ch_sam_coverage = S05_ALIGNMENT.out.sam_coverage ch_sam_coverage = S05_ALIGNMENT.out.sam_coverage
} }
ch_quant_report = Channel.empty()
ch_v_eggnogmapper = Channel.empty()
if ( !params.stop_at_clean && !params.stop_at_assembly && !params.stop_at_filtering && !params.stop_at_structural_annot && !params.skip_func_annot ) { if ( !params.stop_at_clean && !params.stop_at_assembly && !params.stop_at_filtering && !params.stop_at_structural_annot && !params.skip_func_annot ) {
println("S06_FUNC_ANNOT") println("S06_FUNC_ANNOT")
S06_FUNC_ANNOT ( ch_prokka_ffn, ch_prokka_faa, ch_prokka_gff, ch_bam, ch_m8, eggnog_db ) S06_FUNC_ANNOT ( ch_prokka_ffn, ch_prokka_faa, ch_prokka_gff, ch_bam, ch_m8, eggnog_db )
...@@ -53,10 +55,6 @@ workflow SHARED { ...@@ -53,10 +55,6 @@ workflow SHARED {
ch_v_eggnogmapper = S06_FUNC_ANNOT.out.v_eggnogmapper ch_v_eggnogmapper = S06_FUNC_ANNOT.out.v_eggnogmapper
} }
else {
ch_quant_report = Channel.empty()
}
if ( !params.stop_at_clean && !params.stop_at_assembly && !params.stop_at_filtering && !params.stop_at_structural_annot && !params.skip_taxo_affi ) { if ( !params.stop_at_clean && !params.stop_at_assembly && !params.stop_at_filtering && !params.stop_at_structural_annot && !params.skip_taxo_affi ) {
println("S07_TAXO_AFFI") println("S07_TAXO_AFFI")
S07_TAXO_AFFI ( taxonomy, ch_m8, ch_sam_coverage, ch_prot_length) S07_TAXO_AFFI ( taxonomy, ch_m8, ch_sam_coverage, ch_prot_length)
......
Supports Markdown
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