diff --git a/conf/modules.config b/conf/modules.config index 5726763c..6fad45aa 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -42,31 +42,35 @@ process { } withName: '.*:CRAMINO_PRE' { + ext.prefix = { "${meta.id}_${meta.type}" } ext.args = '--ubam' publishDir = [ path: { "${params.outdir}/${meta.id}/qc/${meta.type}/cramino_ubam_${meta.replicate}/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.arrow') ? null : filename } ] } withName: '.*:CRAMINO_POST' { + ext.prefix = { "${meta.id}_${meta.type}" } publishDir = [ path: { "${params.outdir}/${meta.id}/qc/${meta.type}/cramino_aln" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.arrow') ? null : filename } ] } withName: '.*:NANOPLOT_PRE' { + ext.prefix = { "${meta.id}_${meta.type}_ubam" } publishDir = [ - path: { "${params.outdir}/${meta.id}/qc/${meta.type}/nanoplot_ubam_${meta.replicate}/" }, + path: { "${params.outdir}/${meta.id}/qc/${meta.type}/nanoplot_ubam_${meta.replicate}" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } withName: '.*:NANOPLOT_POST' { + ext.prefix = { "${meta.id}_${meta.type}_aln" } publishDir = [ path: { "${params.outdir}/${meta.id}/qc/${meta.type}/nanoplot_aln" }, mode: params.publish_dir_mode, diff --git a/modules/nf-core/nanoplot/main.nf b/modules/nf-core/nanoplot/main.nf index 2bb02b20..ba7b9a69 100644 --- a/modules/nf-core/nanoplot/main.nf +++ b/modules/nf-core/nanoplot/main.nf @@ -20,6 +20,7 @@ process NANOPLOT { task.ext.when == null || task.ext.when script: + def prefix = task.ext.prefix ?: "${meta.id}" def args = task.ext.args ?: '' def input_file = ("$ontfile".endsWith(".fastq.gz") || "$ontfile".endsWith(".fq.gz")) ? "--fastq ${ontfile}" : ("$ontfile".endsWith(".txt")) ? "--summary ${ontfile}" : ("$ontfile".endsWith(".arrow")) ? "--arrow ${ontfile}" : '' @@ -29,6 +30,14 @@ process NANOPLOT { -t $task.cpus \\ $input_file + for nanoplot_file in *.html *.png *.txt *.log + do + if [[ -s \$nanoplot_file ]] + then + mv \$nanoplot_file ${prefix}_\$nanoplot_file + fi + done + cat <<-END_VERSIONS > versions.yml "${task.process}": nanoplot: \$(echo \$(NanoPlot --version 2>&1) | sed 's/^.*NanoPlot //; s/ .*\$//') @@ -36,16 +45,17 @@ process NANOPLOT { """ stub: + def prefix = task.ext.prefix ?: "${meta.id}" """ - touch LengthvsQualityScatterPlot_dot.html - touch LengthvsQualityScatterPlot_kde.html - touch NanoPlot-report.html - touch NanoStats.txt - touch Non_weightedHistogramReadlength.html - touch Non_weightedLogTransformed_HistogramReadlength.html - touch WeightedHistogramReadlength.html - touch WeightedLogTransformed_HistogramReadlength.html - touch Yield_By_Length.html + touch ${prefix}_LengthvsQualityScatterPlot_dot.html + touch ${prefix}_LengthvsQualityScatterPlot_kde.html + touch ${prefix}_NanoPlot-report.html + touch ${prefix}_NanoStats.txt + touch ${prefix}_Non_weightedHistogramReadlength.html + touch ${prefix}_Non_weightedLogTransformed_HistogramReadlength.html + touch ${prefix}_WeightedHistogramReadlength.html + touch ${prefix}_WeightedLogTransformed_HistogramReadlength.html + touch ${prefix}_Yield_By_Length.html cat <<-END_VERSIONS > versions.yml diff --git a/nextflow.config b/nextflow.config index b03dbed8..c1315f99 100644 --- a/nextflow.config +++ b/nextflow.config @@ -32,6 +32,7 @@ params { // Skip options skip_qc = false skip_cramino = false + skip_nanoplot = false skip_mosdepth = false skip_bamstats = false skip_ascat = false diff --git a/nextflow_schema.json b/nextflow_schema.json index 0680cc6d..b25ea2ee 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -210,6 +210,10 @@ "skip_m6a": { "type": "boolean", "description": "Skip m6a calling by Fibertools" + }, + "skip_nanoplot": { + "type": "boolean", + "description": "Skip Nanoplot" } } }, diff --git a/tests/.nftignore b/tests/.nftignore index becfbfa3..7a9121a9 100644 --- a/tests/.nftignore +++ b/tests/.nftignore @@ -17,10 +17,11 @@ pipeline_info/*.{html,json,txt,yml} */variants/severus/read_ids.csv */variants/severus/severus.log */variants/severus/{all_SVs,somatic_SVs}/*.{vcf.gz,vcf.gz.tbi} -*/qc/{tumor,normal}/{cramino_aln}/*_cramino.txt -*/qc/{tumor,normal}/{cramino_ubam}_*/*_cramino.txt -*/qc/{tumor,normal}/{nanoplot_ubam}_*/*.html -*/qc/{tumor,normal}/{nanoplot_aln}/*.html -*/qc/{tumor,normal}/{nanoplot_ubam}_*/*.txt -*/qc/{tumor,normal}/{nanoplot_aln}/*.txt -*/qc/{tumor,normal}/{mosdepth}/*.txt +*/variants/phased/*.{vcf.gz,vcf.gz.tbi} +*/qc/{tumor,normal}/cramino_ubam_*/*_cramino.txt +*/qc/{tumor,normal}/cramino_aln/*_cramino.txt +*/qc/{tumor,normal}/nanoplot_ubam_*/*.html +*/qc/{tumor,normal}/nanoplot_aln/*.html +*/qc/{tumor,normal}/nanoplot_ubam_*/*.txt +*/qc/{tumor,normal}/nanoplot_aln/*.txt +*/qc/{tumor,normal}/mosdepth/*.txt diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index 0946f21f..bd36bc15 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -172,66 +172,62 @@ "sample1/qc", "sample1/qc/normal", "sample1/qc/normal/cramino_aln", - "sample1/qc/normal/cramino_aln/sample1.arrow", - "sample1/qc/normal/cramino_aln/sample1_cramino.txt", + "sample1/qc/normal/cramino_aln/sample1_normal_cramino.txt", "sample1/qc/normal/cramino_ubam_1", - "sample1/qc/normal/cramino_ubam_1/sample1.arrow", - "sample1/qc/normal/cramino_ubam_1/sample1_cramino.txt", + "sample1/qc/normal/cramino_ubam_1/sample1_normal_cramino.txt", "sample1/qc/normal/mosdepth", "sample1/qc/normal/mosdepth/sample1.mosdepth.global.dist.txt", "sample1/qc/normal/mosdepth/sample1.mosdepth.summary.txt", "sample1/qc/normal/nanoplot_aln", - "sample1/qc/normal/nanoplot_aln/NanoPlot-report.html", - "sample1/qc/normal/nanoplot_aln/NanoStats.txt", - "sample1/qc/normal/nanoplot_aln/Non_weightedHistogramReadlength.html", - "sample1/qc/normal/nanoplot_aln/Non_weightedLogTransformed_HistogramReadlength.html", - "sample1/qc/normal/nanoplot_aln/PercentIdentityHistogramDynamic_Histogram_percent_identity.html", - "sample1/qc/normal/nanoplot_aln/PercentIdentityvsAlignedReadLength_dot.html", - "sample1/qc/normal/nanoplot_aln/PercentIdentityvsAlignedReadLength_kde.html", - "sample1/qc/normal/nanoplot_aln/WeightedHistogramReadlength.html", - "sample1/qc/normal/nanoplot_aln/WeightedLogTransformed_HistogramReadlength.html", - "sample1/qc/normal/nanoplot_aln/Yield_By_Length.html", + "sample1/qc/normal/nanoplot_aln/sample1_normal_aln_NanoPlot-report.html", + "sample1/qc/normal/nanoplot_aln/sample1_normal_aln_NanoStats.txt", + "sample1/qc/normal/nanoplot_aln/sample1_normal_aln_Non_weightedHistogramReadlength.html", + "sample1/qc/normal/nanoplot_aln/sample1_normal_aln_Non_weightedLogTransformed_HistogramReadlength.html", + "sample1/qc/normal/nanoplot_aln/sample1_normal_aln_PercentIdentityHistogramDynamic_Histogram_percent_identity.html", + "sample1/qc/normal/nanoplot_aln/sample1_normal_aln_PercentIdentityvsAlignedReadLength_dot.html", + "sample1/qc/normal/nanoplot_aln/sample1_normal_aln_PercentIdentityvsAlignedReadLength_kde.html", + "sample1/qc/normal/nanoplot_aln/sample1_normal_aln_WeightedHistogramReadlength.html", + "sample1/qc/normal/nanoplot_aln/sample1_normal_aln_WeightedLogTransformed_HistogramReadlength.html", + "sample1/qc/normal/nanoplot_aln/sample1_normal_aln_Yield_By_Length.html", "sample1/qc/normal/nanoplot_ubam_1", - "sample1/qc/normal/nanoplot_ubam_1/NanoPlot-report.html", - "sample1/qc/normal/nanoplot_ubam_1/NanoStats.txt", - "sample1/qc/normal/nanoplot_ubam_1/Non_weightedHistogramReadlength.html", - "sample1/qc/normal/nanoplot_ubam_1/Non_weightedLogTransformed_HistogramReadlength.html", - "sample1/qc/normal/nanoplot_ubam_1/WeightedHistogramReadlength.html", - "sample1/qc/normal/nanoplot_ubam_1/WeightedLogTransformed_HistogramReadlength.html", - "sample1/qc/normal/nanoplot_ubam_1/Yield_By_Length.html", + "sample1/qc/normal/nanoplot_ubam_1/sample1_normal_ubam_NanoPlot-report.html", + "sample1/qc/normal/nanoplot_ubam_1/sample1_normal_ubam_NanoStats.txt", + "sample1/qc/normal/nanoplot_ubam_1/sample1_normal_ubam_Non_weightedHistogramReadlength.html", + "sample1/qc/normal/nanoplot_ubam_1/sample1_normal_ubam_Non_weightedLogTransformed_HistogramReadlength.html", + "sample1/qc/normal/nanoplot_ubam_1/sample1_normal_ubam_WeightedHistogramReadlength.html", + "sample1/qc/normal/nanoplot_ubam_1/sample1_normal_ubam_WeightedLogTransformed_HistogramReadlength.html", + "sample1/qc/normal/nanoplot_ubam_1/sample1_normal_ubam_Yield_By_Length.html", "sample1/qc/normal/samtools", "sample1/qc/normal/samtools/sample1.flagstat", "sample1/qc/normal/samtools/sample1.idxstats", "sample1/qc/normal/samtools/sample1.stats", "sample1/qc/tumor", "sample1/qc/tumor/cramino_aln", - "sample1/qc/tumor/cramino_aln/sample1.arrow", - "sample1/qc/tumor/cramino_aln/sample1_cramino.txt", + "sample1/qc/tumor/cramino_aln/sample1_tumor_cramino.txt", "sample1/qc/tumor/cramino_ubam_1", - "sample1/qc/tumor/cramino_ubam_1/sample1.arrow", - "sample1/qc/tumor/cramino_ubam_1/sample1_cramino.txt", + "sample1/qc/tumor/cramino_ubam_1/sample1_tumor_cramino.txt", "sample1/qc/tumor/mosdepth", "sample1/qc/tumor/mosdepth/sample1.mosdepth.global.dist.txt", "sample1/qc/tumor/mosdepth/sample1.mosdepth.summary.txt", "sample1/qc/tumor/nanoplot_aln", - "sample1/qc/tumor/nanoplot_aln/NanoPlot-report.html", - "sample1/qc/tumor/nanoplot_aln/NanoStats.txt", - "sample1/qc/tumor/nanoplot_aln/Non_weightedHistogramReadlength.html", - "sample1/qc/tumor/nanoplot_aln/Non_weightedLogTransformed_HistogramReadlength.html", - "sample1/qc/tumor/nanoplot_aln/PercentIdentityHistogramDynamic_Histogram_percent_identity.html", - "sample1/qc/tumor/nanoplot_aln/PercentIdentityvsAlignedReadLength_dot.html", - "sample1/qc/tumor/nanoplot_aln/PercentIdentityvsAlignedReadLength_kde.html", - "sample1/qc/tumor/nanoplot_aln/WeightedHistogramReadlength.html", - "sample1/qc/tumor/nanoplot_aln/WeightedLogTransformed_HistogramReadlength.html", - "sample1/qc/tumor/nanoplot_aln/Yield_By_Length.html", + "sample1/qc/tumor/nanoplot_aln/sample1_tumor_aln_NanoPlot-report.html", + "sample1/qc/tumor/nanoplot_aln/sample1_tumor_aln_NanoStats.txt", + "sample1/qc/tumor/nanoplot_aln/sample1_tumor_aln_Non_weightedHistogramReadlength.html", + "sample1/qc/tumor/nanoplot_aln/sample1_tumor_aln_Non_weightedLogTransformed_HistogramReadlength.html", + "sample1/qc/tumor/nanoplot_aln/sample1_tumor_aln_PercentIdentityHistogramDynamic_Histogram_percent_identity.html", + "sample1/qc/tumor/nanoplot_aln/sample1_tumor_aln_PercentIdentityvsAlignedReadLength_dot.html", + "sample1/qc/tumor/nanoplot_aln/sample1_tumor_aln_PercentIdentityvsAlignedReadLength_kde.html", + "sample1/qc/tumor/nanoplot_aln/sample1_tumor_aln_WeightedHistogramReadlength.html", + "sample1/qc/tumor/nanoplot_aln/sample1_tumor_aln_WeightedLogTransformed_HistogramReadlength.html", + "sample1/qc/tumor/nanoplot_aln/sample1_tumor_aln_Yield_By_Length.html", "sample1/qc/tumor/nanoplot_ubam_1", - "sample1/qc/tumor/nanoplot_ubam_1/NanoPlot-report.html", - "sample1/qc/tumor/nanoplot_ubam_1/NanoStats.txt", - "sample1/qc/tumor/nanoplot_ubam_1/Non_weightedHistogramReadlength.html", - "sample1/qc/tumor/nanoplot_ubam_1/Non_weightedLogTransformed_HistogramReadlength.html", - "sample1/qc/tumor/nanoplot_ubam_1/WeightedHistogramReadlength.html", - "sample1/qc/tumor/nanoplot_ubam_1/WeightedLogTransformed_HistogramReadlength.html", - "sample1/qc/tumor/nanoplot_ubam_1/Yield_By_Length.html", + "sample1/qc/tumor/nanoplot_ubam_1/sample1_tumor_ubam_NanoPlot-report.html", + "sample1/qc/tumor/nanoplot_ubam_1/sample1_tumor_ubam_NanoStats.txt", + "sample1/qc/tumor/nanoplot_ubam_1/sample1_tumor_ubam_Non_weightedHistogramReadlength.html", + "sample1/qc/tumor/nanoplot_ubam_1/sample1_tumor_ubam_Non_weightedLogTransformed_HistogramReadlength.html", + "sample1/qc/tumor/nanoplot_ubam_1/sample1_tumor_ubam_WeightedHistogramReadlength.html", + "sample1/qc/tumor/nanoplot_ubam_1/sample1_tumor_ubam_WeightedLogTransformed_HistogramReadlength.html", + "sample1/qc/tumor/nanoplot_ubam_1/sample1_tumor_ubam_Yield_By_Length.html", "sample1/qc/tumor/samtools", "sample1/qc/tumor/samtools/sample1.flagstat", "sample1/qc/tumor/samtools/sample1.idxstats", @@ -245,6 +241,9 @@ "sample1/variants/clairs/indel.vcf.gz.tbi", "sample1/variants/clairs/snvs.vcf.gz", "sample1/variants/clairs/snvs.vcf.gz.tbi", + "sample1/variants/phased", + "sample1/variants/phased/somatic_smallvariants.vcf.gz", + "sample1/variants/phased/somatic_smallvariants.vcf.gz.tbi", "sample1/variants/severus", "sample1/variants/severus/all_SVs", "sample1/variants/severus/all_SVs/severus_all.vcf.gz", @@ -276,66 +275,62 @@ "sample2/qc", "sample2/qc/normal", "sample2/qc/normal/cramino_aln", - "sample2/qc/normal/cramino_aln/sample2.arrow", - "sample2/qc/normal/cramino_aln/sample2_cramino.txt", + "sample2/qc/normal/cramino_aln/sample2_normal_cramino.txt", "sample2/qc/normal/cramino_ubam_1", - "sample2/qc/normal/cramino_ubam_1/sample2.arrow", - "sample2/qc/normal/cramino_ubam_1/sample2_cramino.txt", + "sample2/qc/normal/cramino_ubam_1/sample2_normal_cramino.txt", "sample2/qc/normal/mosdepth", "sample2/qc/normal/mosdepth/sample2.mosdepth.global.dist.txt", "sample2/qc/normal/mosdepth/sample2.mosdepth.summary.txt", "sample2/qc/normal/nanoplot_aln", - "sample2/qc/normal/nanoplot_aln/NanoPlot-report.html", - "sample2/qc/normal/nanoplot_aln/NanoStats.txt", - "sample2/qc/normal/nanoplot_aln/Non_weightedHistogramReadlength.html", - "sample2/qc/normal/nanoplot_aln/Non_weightedLogTransformed_HistogramReadlength.html", - "sample2/qc/normal/nanoplot_aln/PercentIdentityHistogramDynamic_Histogram_percent_identity.html", - "sample2/qc/normal/nanoplot_aln/PercentIdentityvsAlignedReadLength_dot.html", - "sample2/qc/normal/nanoplot_aln/PercentIdentityvsAlignedReadLength_kde.html", - "sample2/qc/normal/nanoplot_aln/WeightedHistogramReadlength.html", - "sample2/qc/normal/nanoplot_aln/WeightedLogTransformed_HistogramReadlength.html", - "sample2/qc/normal/nanoplot_aln/Yield_By_Length.html", + "sample2/qc/normal/nanoplot_aln/sample2_normal_aln_NanoPlot-report.html", + "sample2/qc/normal/nanoplot_aln/sample2_normal_aln_NanoStats.txt", + "sample2/qc/normal/nanoplot_aln/sample2_normal_aln_Non_weightedHistogramReadlength.html", + "sample2/qc/normal/nanoplot_aln/sample2_normal_aln_Non_weightedLogTransformed_HistogramReadlength.html", + "sample2/qc/normal/nanoplot_aln/sample2_normal_aln_PercentIdentityHistogramDynamic_Histogram_percent_identity.html", + "sample2/qc/normal/nanoplot_aln/sample2_normal_aln_PercentIdentityvsAlignedReadLength_dot.html", + "sample2/qc/normal/nanoplot_aln/sample2_normal_aln_PercentIdentityvsAlignedReadLength_kde.html", + "sample2/qc/normal/nanoplot_aln/sample2_normal_aln_WeightedHistogramReadlength.html", + "sample2/qc/normal/nanoplot_aln/sample2_normal_aln_WeightedLogTransformed_HistogramReadlength.html", + "sample2/qc/normal/nanoplot_aln/sample2_normal_aln_Yield_By_Length.html", "sample2/qc/normal/nanoplot_ubam_1", - "sample2/qc/normal/nanoplot_ubam_1/NanoPlot-report.html", - "sample2/qc/normal/nanoplot_ubam_1/NanoStats.txt", - "sample2/qc/normal/nanoplot_ubam_1/Non_weightedHistogramReadlength.html", - "sample2/qc/normal/nanoplot_ubam_1/Non_weightedLogTransformed_HistogramReadlength.html", - "sample2/qc/normal/nanoplot_ubam_1/WeightedHistogramReadlength.html", - "sample2/qc/normal/nanoplot_ubam_1/WeightedLogTransformed_HistogramReadlength.html", - "sample2/qc/normal/nanoplot_ubam_1/Yield_By_Length.html", + "sample2/qc/normal/nanoplot_ubam_1/sample2_normal_ubam_NanoPlot-report.html", + "sample2/qc/normal/nanoplot_ubam_1/sample2_normal_ubam_NanoStats.txt", + "sample2/qc/normal/nanoplot_ubam_1/sample2_normal_ubam_Non_weightedHistogramReadlength.html", + "sample2/qc/normal/nanoplot_ubam_1/sample2_normal_ubam_Non_weightedLogTransformed_HistogramReadlength.html", + "sample2/qc/normal/nanoplot_ubam_1/sample2_normal_ubam_WeightedHistogramReadlength.html", + "sample2/qc/normal/nanoplot_ubam_1/sample2_normal_ubam_WeightedLogTransformed_HistogramReadlength.html", + "sample2/qc/normal/nanoplot_ubam_1/sample2_normal_ubam_Yield_By_Length.html", "sample2/qc/normal/samtools", "sample2/qc/normal/samtools/sample2.flagstat", "sample2/qc/normal/samtools/sample2.idxstats", "sample2/qc/normal/samtools/sample2.stats", "sample2/qc/tumor", "sample2/qc/tumor/cramino_aln", - "sample2/qc/tumor/cramino_aln/sample2.arrow", - "sample2/qc/tumor/cramino_aln/sample2_cramino.txt", + "sample2/qc/tumor/cramino_aln/sample2_tumor_cramino.txt", "sample2/qc/tumor/cramino_ubam_1", - "sample2/qc/tumor/cramino_ubam_1/sample2.arrow", - "sample2/qc/tumor/cramino_ubam_1/sample2_cramino.txt", + "sample2/qc/tumor/cramino_ubam_1/sample2_tumor_cramino.txt", "sample2/qc/tumor/mosdepth", "sample2/qc/tumor/mosdepth/sample2.mosdepth.global.dist.txt", "sample2/qc/tumor/mosdepth/sample2.mosdepth.summary.txt", "sample2/qc/tumor/nanoplot_aln", - "sample2/qc/tumor/nanoplot_aln/NanoPlot-report.html", - "sample2/qc/tumor/nanoplot_aln/NanoStats.txt", - "sample2/qc/tumor/nanoplot_aln/Non_weightedHistogramReadlength.html", - "sample2/qc/tumor/nanoplot_aln/Non_weightedLogTransformed_HistogramReadlength.html", - "sample2/qc/tumor/nanoplot_aln/PercentIdentityHistogramDynamic_Histogram_percent_identity.html", - "sample2/qc/tumor/nanoplot_aln/PercentIdentityvsAlignedReadLength_dot.html", - "sample2/qc/tumor/nanoplot_aln/PercentIdentityvsAlignedReadLength_kde.html", - "sample2/qc/tumor/nanoplot_aln/WeightedHistogramReadlength.html", - "sample2/qc/tumor/nanoplot_aln/WeightedLogTransformed_HistogramReadlength.html", - "sample2/qc/tumor/nanoplot_aln/Yield_By_Length.html", + "sample2/qc/tumor/nanoplot_aln/sample2_tumor_aln_NanoPlot-report.html", + "sample2/qc/tumor/nanoplot_aln/sample2_tumor_aln_NanoStats.txt", + "sample2/qc/tumor/nanoplot_aln/sample2_tumor_aln_Non_weightedHistogramReadlength.html", + "sample2/qc/tumor/nanoplot_aln/sample2_tumor_aln_Non_weightedLogTransformed_HistogramReadlength.html", + "sample2/qc/tumor/nanoplot_aln/sample2_tumor_aln_PercentIdentityHistogramDynamic_Histogram_percent_identity.html", + "sample2/qc/tumor/nanoplot_aln/sample2_tumor_aln_PercentIdentityvsAlignedReadLength_dot.html", + "sample2/qc/tumor/nanoplot_aln/sample2_tumor_aln_PercentIdentityvsAlignedReadLength_kde.html", + "sample2/qc/tumor/nanoplot_aln/sample2_tumor_aln_WeightedHistogramReadlength.html", + "sample2/qc/tumor/nanoplot_aln/sample2_tumor_aln_WeightedLogTransformed_HistogramReadlength.html", + "sample2/qc/tumor/nanoplot_aln/sample2_tumor_aln_Yield_By_Length.html", "sample2/qc/tumor/nanoplot_ubam_1", - "sample2/qc/tumor/nanoplot_ubam_1/NanoPlot-report.html", - "sample2/qc/tumor/nanoplot_ubam_1/NanoStats.txt", - "sample2/qc/tumor/nanoplot_ubam_1/Non_weightedHistogramReadlength.html", - "sample2/qc/tumor/nanoplot_ubam_1/Non_weightedLogTransformed_HistogramReadlength.html", - "sample2/qc/tumor/nanoplot_ubam_1/WeightedHistogramReadlength.html", - "sample2/qc/tumor/nanoplot_ubam_1/WeightedLogTransformed_HistogramReadlength.html", - "sample2/qc/tumor/nanoplot_ubam_1/Yield_By_Length.html", + "sample2/qc/tumor/nanoplot_ubam_1/sample2_tumor_ubam_NanoPlot-report.html", + "sample2/qc/tumor/nanoplot_ubam_1/sample2_tumor_ubam_NanoStats.txt", + "sample2/qc/tumor/nanoplot_ubam_1/sample2_tumor_ubam_Non_weightedHistogramReadlength.html", + "sample2/qc/tumor/nanoplot_ubam_1/sample2_tumor_ubam_Non_weightedLogTransformed_HistogramReadlength.html", + "sample2/qc/tumor/nanoplot_ubam_1/sample2_tumor_ubam_WeightedHistogramReadlength.html", + "sample2/qc/tumor/nanoplot_ubam_1/sample2_tumor_ubam_WeightedLogTransformed_HistogramReadlength.html", + "sample2/qc/tumor/nanoplot_ubam_1/sample2_tumor_ubam_Yield_By_Length.html", "sample2/qc/tumor/samtools", "sample2/qc/tumor/samtools/sample2.flagstat", "sample2/qc/tumor/samtools/sample2.idxstats", @@ -349,6 +344,9 @@ "sample2/variants/clairs/indel.vcf.gz.tbi", "sample2/variants/clairs/snvs.vcf.gz", "sample2/variants/clairs/snvs.vcf.gz.tbi", + "sample2/variants/phased", + "sample2/variants/phased/somatic_smallvariants.vcf.gz", + "sample2/variants/phased/somatic_smallvariants.vcf.gz.tbi", "sample2/variants/severus", "sample2/variants/severus/all_SVs", "sample2/variants/severus/all_SVs/severus_all.vcf.gz", @@ -378,33 +376,31 @@ "sample3/qc", "sample3/qc/tumor", "sample3/qc/tumor/cramino_aln", - "sample3/qc/tumor/cramino_aln/sample3.arrow", - "sample3/qc/tumor/cramino_aln/sample3_cramino.txt", + "sample3/qc/tumor/cramino_aln/sample3_tumor_cramino.txt", "sample3/qc/tumor/cramino_ubam_1", - "sample3/qc/tumor/cramino_ubam_1/sample3.arrow", - "sample3/qc/tumor/cramino_ubam_1/sample3_cramino.txt", + "sample3/qc/tumor/cramino_ubam_1/sample3_tumor_cramino.txt", "sample3/qc/tumor/mosdepth", "sample3/qc/tumor/mosdepth/sample3.mosdepth.global.dist.txt", "sample3/qc/tumor/mosdepth/sample3.mosdepth.summary.txt", "sample3/qc/tumor/nanoplot_aln", - "sample3/qc/tumor/nanoplot_aln/NanoPlot-report.html", - "sample3/qc/tumor/nanoplot_aln/NanoStats.txt", - "sample3/qc/tumor/nanoplot_aln/Non_weightedHistogramReadlength.html", - "sample3/qc/tumor/nanoplot_aln/Non_weightedLogTransformed_HistogramReadlength.html", - "sample3/qc/tumor/nanoplot_aln/PercentIdentityHistogramDynamic_Histogram_percent_identity.html", - "sample3/qc/tumor/nanoplot_aln/PercentIdentityvsAlignedReadLength_dot.html", - "sample3/qc/tumor/nanoplot_aln/PercentIdentityvsAlignedReadLength_kde.html", - "sample3/qc/tumor/nanoplot_aln/WeightedHistogramReadlength.html", - "sample3/qc/tumor/nanoplot_aln/WeightedLogTransformed_HistogramReadlength.html", - "sample3/qc/tumor/nanoplot_aln/Yield_By_Length.html", + "sample3/qc/tumor/nanoplot_aln/sample3_tumor_aln_NanoPlot-report.html", + "sample3/qc/tumor/nanoplot_aln/sample3_tumor_aln_NanoStats.txt", + "sample3/qc/tumor/nanoplot_aln/sample3_tumor_aln_Non_weightedHistogramReadlength.html", + "sample3/qc/tumor/nanoplot_aln/sample3_tumor_aln_Non_weightedLogTransformed_HistogramReadlength.html", + "sample3/qc/tumor/nanoplot_aln/sample3_tumor_aln_PercentIdentityHistogramDynamic_Histogram_percent_identity.html", + "sample3/qc/tumor/nanoplot_aln/sample3_tumor_aln_PercentIdentityvsAlignedReadLength_dot.html", + "sample3/qc/tumor/nanoplot_aln/sample3_tumor_aln_PercentIdentityvsAlignedReadLength_kde.html", + "sample3/qc/tumor/nanoplot_aln/sample3_tumor_aln_WeightedHistogramReadlength.html", + "sample3/qc/tumor/nanoplot_aln/sample3_tumor_aln_WeightedLogTransformed_HistogramReadlength.html", + "sample3/qc/tumor/nanoplot_aln/sample3_tumor_aln_Yield_By_Length.html", "sample3/qc/tumor/nanoplot_ubam_1", - "sample3/qc/tumor/nanoplot_ubam_1/NanoPlot-report.html", - "sample3/qc/tumor/nanoplot_ubam_1/NanoStats.txt", - "sample3/qc/tumor/nanoplot_ubam_1/Non_weightedHistogramReadlength.html", - "sample3/qc/tumor/nanoplot_ubam_1/Non_weightedLogTransformed_HistogramReadlength.html", - "sample3/qc/tumor/nanoplot_ubam_1/WeightedHistogramReadlength.html", - "sample3/qc/tumor/nanoplot_ubam_1/WeightedLogTransformed_HistogramReadlength.html", - "sample3/qc/tumor/nanoplot_ubam_1/Yield_By_Length.html", + "sample3/qc/tumor/nanoplot_ubam_1/sample3_tumor_ubam_NanoPlot-report.html", + "sample3/qc/tumor/nanoplot_ubam_1/sample3_tumor_ubam_NanoStats.txt", + "sample3/qc/tumor/nanoplot_ubam_1/sample3_tumor_ubam_Non_weightedHistogramReadlength.html", + "sample3/qc/tumor/nanoplot_ubam_1/sample3_tumor_ubam_Non_weightedLogTransformed_HistogramReadlength.html", + "sample3/qc/tumor/nanoplot_ubam_1/sample3_tumor_ubam_WeightedHistogramReadlength.html", + "sample3/qc/tumor/nanoplot_ubam_1/sample3_tumor_ubam_WeightedLogTransformed_HistogramReadlength.html", + "sample3/qc/tumor/nanoplot_ubam_1/sample3_tumor_ubam_Yield_By_Length.html", "sample3/qc/tumor/samtools", "sample3/qc/tumor/samtools/sample3.flagstat", "sample3/qc/tumor/samtools/sample3.idxstats", @@ -419,6 +415,9 @@ "sample3/variants/clairsto/snv.vcf.gz.tbi", "sample3/variants/clairsto/somatic.vcf.gz", "sample3/variants/clairsto/somatic.vcf.gz.tbi", + "sample3/variants/phased", + "sample3/variants/phased/somatic_smallvariants.vcf.gz", + "sample3/variants/phased/somatic_smallvariants.vcf.gz.tbi", "sample3/variants/severus", "sample3/variants/severus/all_SVs", "sample3/variants/severus/all_SVs/severus_all.vcf.gz", @@ -443,42 +442,32 @@ "sample3/vep/somatic/sample3_SOMATIC_VEP.vcf.gz_summary.html" ], [ - "sample1_normal.bam:md5,7714d4b2db4d97b609c9a58f94e9a550", - "sample1_normal.bam.bai:md5,b5e6df2994304fd78ecd2b3b8fea87ee", - "sample1_tumor.bam:md5,b0f1bdae9bbdb901eced7297088a5d1e", - "sample1_tumor.bam.bai:md5,fc1f6cd9556c7d1d08a9a52c7ee97cbb", - "sample1.arrow:md5,df57219f1bea7e7d5538ec4ee87dcf83", - "sample1.arrow:md5,36467bdd847baaa060817928d30bf091", + "sample1_normal.bam:md5,58854f8d427538288322ac20df574fe1", + "sample1_normal.bam.bai:md5,398a33445ef807ebc83c851c3f3c0df6", + "sample1_tumor.bam:md5,0e2ebc65d456e9aa614f5e4714ea2f97", + "sample1_tumor.bam.bai:md5,b92667a80d721b8d515ad099e4f97925", "sample1.flagstat:md5,1c41ea9923945501eb7e41f83a90502d", "sample1.idxstats:md5,902e503387799123ea59255e3fca172c", "sample1.stats:md5,5a76f92088d36f8e93d72351e521b59b", - "sample1.arrow:md5,de5f6de5e459d71d6cd4919eea616943", - "sample1.arrow:md5,b4102a193ca9eb2ebee0cd36b48c138d", "sample1.flagstat:md5,8ff32d733c62c4910bf185ef24bf27cf", "sample1.idxstats:md5,2de140e61f9e86c9c10af20dd565cc93", "sample1.stats:md5,8cec99bd9c1ba4ee22619b66d4fec02a", "breakpoints_double.csv:md5,fd92fe40bc0ab3b836dedc395b80d6e2", "read_qual.txt:md5,78247dfa2ea336eac0e128eba5e9eef4", - "sample2_normal.bam:md5,b2b52d2ff82220cd393fa353cf931207", - "sample2_normal.bam.bai:md5,a82a6a8a6ad1879588befe5c5869d598", - "sample2_tumor.bam:md5,f63adccc34154d53e36766ca30db1512", - "sample2_tumor.bam.bai:md5,015b8dc2ccd1e8f4338c94bc6f81ed40", - "sample2.arrow:md5,6aa5eec1162a077f3bf8537c8f0db952", - "sample2.arrow:md5,04f75058ac7edf6f8dfe33b8bab3b78d", + "sample2_normal.bam:md5,c9b1ac8d2faec01ecb178f0b351af69c", + "sample2_normal.bam.bai:md5,b8f81d2703b1d06128e23b860a9fd635", + "sample2_tumor.bam:md5,2ba9456992d944b63d63e067d5e3bc56", + "sample2_tumor.bam.bai:md5,8342f0fbbc8ce4f4c79aa42c7804df9d", "sample2.flagstat:md5,714d0cc0c213e2640e54a16f3d0e6e7e", "sample2.idxstats:md5,72eb83bb11748dc863fef1a0a5497e4b", "sample2.stats:md5,9afe66549bed997cce97dfa11c0f0cca", - "sample2.arrow:md5,230ab87cb153beb945be51bc2e23f918", - "sample2.arrow:md5,838c7b7fa4e92e44094737f1b8dbbe56", "sample2.flagstat:md5,4344a8745efef9cc2a017024218d61c6", "sample2.idxstats:md5,69467fc02c83a30084736aeea8b785fb", "sample2.stats:md5,7cbbff1faaf2e030470a8c1e69434b48", "breakpoints_double.csv:md5,d3f0957887406fb79f9dcc3707324d8c", "read_qual.txt:md5,8b92ff7dc4536188be159b95525511cd", - "sample3_tumor.bam:md5,24e3b7bee7a0d8a01303f677d2b87b08", - "sample3_tumor.bam.bai:md5,d2038319977bd78352927c16ef3f1a21", - "sample3.arrow:md5,de5f6de5e459d71d6cd4919eea616943", - "sample3.arrow:md5,b4102a193ca9eb2ebee0cd36b48c138d", + "sample3_tumor.bam:md5,7107cfc84eafca8f1ae918e775111090", + "sample3_tumor.bam.bai:md5,d2855691846361e01999895250c835e4", "sample3.flagstat:md5,8ff32d733c62c4910bf185ef24bf27cf", "sample3.idxstats:md5,2de140e61f9e86c9c10af20dd565cc93", "sample3.stats:md5,6825d4e497aef80ed7160afbef5076d9", @@ -486,10 +475,10 @@ "read_qual.txt:md5,b918430d35354dad1d7f02f21e4cd4ed" ] ], + "timestamp": "2026-03-13T14:26:30.747596368", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2026-03-12T15:06:45.544824708" + "nf-test": "0.9.4", + "nextflow": "25.10.0" + } } } \ No newline at end of file diff --git a/workflows/lrsomatic.nf b/workflows/lrsomatic.nf index aa50b0bb..fc61e9c6 100644 --- a/workflows/lrsomatic.nf +++ b/workflows/lrsomatic.nf @@ -156,9 +156,26 @@ workflow LRSOMATIC { downloaded_clair3_models = PREPARE_REFERENCE_FILES.out.downloaded_clair3_models + ch_nanoplot_pre_txt = channel.empty() + if (!params.skip_qc && !params.skip_cramino) { + + // + // Module: CRAMINO + // + CRAMINO_PRE( ch_samplesheet ) - NANOPLOT_PRE(CRAMINO_PRE.out.arrow) + + if (!params.skip_nanoplot) { + + // + // Module: Nanoplot + // + + NANOPLOT_PRE(CRAMINO_PRE.out.arrow) + + } + } ch_samplesheet @@ -494,17 +511,33 @@ workflow LRSOMATIC { ) } - // - // MODULE: CRAMINO - // + + ch_nanoplot_post_txt = channel.empty() + if (!params.skip_qc && !params.skip_cramino) { + // + // MODULE: CRAMINO + // + CRAMINO_POST ( ch_minimap_bam ) - NANOPLOT_POST(CRAMINO_POST.out.arrow) + + if (!params.skip_nanoplot) { + + // + // Module: Nanoplot + // + + NANOPLOT_POST(CRAMINO_POST.out.arrow) + + } + } + + // // Module: MOSDEPTH // @@ -626,7 +659,7 @@ workflow LRSOMATIC { // // MODULE: MultiQC // - summary_params = paramsSummaryMap( + summary_params = paramsSummaryMap( workflow, parameters_schema: "nextflow_schema.json") ch_workflow_summary = channel.value(paramsSummaryMultiqc(summary_params)) ch_multiqc_files = ch_multiqc_files.mix( @@ -654,6 +687,8 @@ workflow LRSOMATIC { ch_multiqc_files = ch_multiqc_files.mix(ch_mosdepth_global.collect{it -> it[1]}.ifEmpty([])) ch_multiqc_files = ch_multiqc_files.mix(ch_mosdepth_summary.collect{it -> it[1]}.ifEmpty([])) + ch_multiqc_files = ch_multiqc_files.mix(ch_nanoplot_pre_txt.collect{it -> it[1]}.ifEmpty([])) + ch_multiqc_files = ch_multiqc_files.mix(ch_nanoplot_post_txt.collect{it -> it[1]}.ifEmpty([])) MULTIQC ( ch_multiqc_files