Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved pipeline summary report & error message #680

Merged
merged 5 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading