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