From cee4b6f3cd7abaacefc9d3c6d640ab293f7c3724 Mon Sep 17 00:00:00 2001 From: MarieLataretu Date: Mon, 18 Jan 2021 12:28:31 +0100 Subject: [PATCH] not the latest report in output/Logs Fixes #126 --- bin/reports.sh | 11 ----------- main.nf | 10 +--------- nextflow.config | 8 +++----- 3 files changed, 4 insertions(+), 25 deletions(-) delete mode 100755 bin/reports.sh diff --git a/bin/reports.sh b/bin/reports.sh deleted file mode 100755 index 2ce3da6..0000000 --- a/bin/reports.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/bash - -# copy final reports to output dir - -OUTPUT_DIR=$1 -REPORTS_DIR=$2 - -mkdir -p $OUTPUT_DIR/Logs - -cp $REPORTS_DIR/execution_report.html $OUTPUT_DIR/Logs -cp $REPORTS_DIR/execution_timeline.html $OUTPUT_DIR/Logs diff --git a/main.nf b/main.nf index 33a3035..5bee532 100755 --- a/main.nf +++ b/main.nf @@ -24,7 +24,7 @@ nextflow.enable.dsl=2 // Parameters sanity checking -Set valid_params = ['max_cores', 'cores', 'memory', 'profile', 'help', 'reads', 'genome', 'annotation', 'deg', 'autodownload', 'pathway', 'species', 'include_species', 'strand', 'mode', 'tpm', 'fastp_additional_params', 'hisat2_additional_params', 'featurecounts_additional_params', 'feature_id_type', 'busco_db', 'dammit_uniref90', 'skip_sortmerna', 'assembly', 'output', 'fastp_dir', 'sortmerna_dir', 'hisat2_dir', 'featurecounts_dir', 'tpm_filter_dir', 'annotation_dir', 'deseq2_dir', 'assembly_dir', 'rnaseq_annotation_dir', 'uniref90_dir', 'multiqc_dir', 'permanentCacheDir', 'condaCacheDir', 'singularityCacheDir', 'softlink_results', 'runinfo', 'cloudProcess', 'permanent-cache-dir', 'conda-cache-dir', 'singularity-cache-dir', 'cloud-process'] // don't ask me why there is 'permanent-cache-dir', 'conda-cache-dir', 'singularity-cache-dir', 'cloud-process' +Set valid_params = ['max_cores', 'cores', 'memory', 'profile', 'help', 'reads', 'genome', 'annotation', 'deg', 'autodownload', 'pathway', 'species', 'include_species', 'strand', 'mode', 'tpm', 'fastp_additional_params', 'hisat2_additional_params', 'featurecounts_additional_params', 'feature_id_type', 'busco_db', 'dammit_uniref90', 'skip_sortmerna', 'assembly', 'output', 'fastp_dir', 'sortmerna_dir', 'hisat2_dir', 'featurecounts_dir', 'tpm_filter_dir', 'annotation_dir', 'deseq2_dir', 'assembly_dir', 'rnaseq_annotation_dir', 'uniref90_dir', 'multiqc_dir', 'nf_runinfo_dir', 'permanentCacheDir', 'condaCacheDir', 'singularityCacheDir', 'softlink_results', 'cloudProcess', 'permanent-cache-dir', 'conda-cache-dir', 'singularity-cache-dir', 'cloud-process'] // don't ask me why there is 'permanent-cache-dir', 'conda-cache-dir', 'singularity-cache-dir', 'cloud-process' def parameter_diff = params.keySet() - valid_params if (parameter_diff.size() != 0){ exit 1, "ERROR: Parameter(s) $parameter_diff is/are not valid in the pipeline!\n" @@ -726,14 +726,6 @@ workflow { } } - -workflow.onComplete { - if (workflow.success) { - // copy execution and timeline HTML reports to output dir - println (['bash', "${workflow.projectDir}/bin/reports.sh", "${params.output}", "${params.runinfo}"].execute().text) - } -} - def helpMSG() { c_green = "\033[0;32m"; c_reset = "\033[0m"; diff --git a/nextflow.config b/nextflow.config index f8b5d7f..8ade6e2 100755 --- a/nextflow.config +++ b/nextflow.config @@ -56,6 +56,7 @@ params { // if the UniRef90 option for dammit is activated via --dammit_uniref90, this parameter will be set to 'uniref90' for the dammit output uniref90_dir = '' multiqc_dir = 'Summary' + nf_runinfo_dir = 'Logs' // location for autodownload data like databases permanentCacheDir = 'nextflow-autodownload-databases' @@ -67,21 +68,18 @@ params { // softlink results instead of copying softlink_results = false - // save execution information - runinfo = "nextflow-run-infos" - cloudProcess = false } timeline { enabled = true - file = "${params.runinfo}/execution_timeline.html" + file = "${params.output}/${params.nf_runinfo_dir}/execution_timeline.html" } report { enabled = true - file = "${params.runinfo}/execution_report.html" + file = "${params.output}/${params.nf_runinfo_dir}/execution_report.html" } profiles {