Skip to content

Commit

Permalink
Merge pull request #680 from d4straub/fix-report
Browse files Browse the repository at this point in the history
Improved pipeline summary report & error message
  • Loading branch information
d4straub authored Dec 19, 2023
2 parents de53107 + f1ae7cb commit 709dea9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#673](https://github.com/nf-core/ampliseq/pull/673) - Fix logic relating to generation of qiime2 taxonomy part of summary report
- [#676](https://github.com/nf-core/ampliseq/pull/676) - Phyloseq sometimes only produced one of multiple output files
- [#679](https://github.com/nf-core/ampliseq/pull/679) - Prevent masking low complexity regions by VSEARCH with lower case letters
- [#680](https://github.com/nf-core/ampliseq/pull/680) - Improved pipeline summary report & error messages

### `Dependencies`

Expand Down
17 changes: 6 additions & 11 deletions assets/report_template.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,13 @@ supporting denoising of any amplicon and supports a variety of taxonomic databas

```{r, results='asis'}
if ( !isFALSE(params$metadata) ) {
cat(paste0("
# Data input and Metadata
Pipeline input was saved to the [input](../input) directory.
"))
cat("# Data input and Metadata\n\n")
} else {
cat(paste0("
# Data input
cat("# Data input\n\n")
}
Pipeline input was saved in folder [input](../input).
"))
if ( !isFALSE(params$metadata) || !isFALSE(params$input_samplesheet) ) {
cat("Pipeline input was saved in folder [input](../input).\n\n")
}
if ( !isFALSE(params$input_samplesheet) ) {
Expand Down Expand Up @@ -262,8 +258,7 @@ the denoising tool or sequences might be lost due to being labelled as PCR chime
# import tsv
cutadapt_summary <- read.table(file = params$cutadapt_summary, header = TRUE, sep = "\t")
cutadapt_passed_col <- as.numeric(substr(
cutadapt_summary$cutadapt_passing_filters_percent, 1, 4))
cutadapt_passed_col <- as.numeric( gsub("%","",cutadapt_summary$cutadapt_passing_filters_percent) )
cutadapt_max_discarded <- round( 100 - min(cutadapt_passed_col), 1 )
cutadapt_avg_passed <- round(mean(cutadapt_passed_col),1)
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/parse_input.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ workflow PARSE_INPUT {
//Check folders in folder when multiple_sequencing_runs
folders = multiple_sequencing_runs ? "/*" : ""
error_message = "\nCannot find any reads matching: \"${input}${folders}${extension}\"\n"
error_message += "Please revise the input folder (\"--input\"): \"${input}\"\n"
error_message += "Please revise the input folder (\"--input_folder\"): \"${input}\"\n"
error_message += "and the input file pattern (\"--extension\"): \"${extension}\"\n"
error_message += "*Please note: Path needs to be enclosed in quotes!*\n"
error_message += multiple_sequencing_runs ? "If you do not have multiple sequencing runs, please do not use \"--multiple_sequencing_runs\"!\n" : "If you have multiple sequencing runs, please add \"--multiple_sequencing_runs\"!\n"
Expand Down

0 comments on commit 709dea9

Please sign in to comment.