Skip to content

Commit

Permalink
Merge pull request #487 from drpatelh/dsl2
Browse files Browse the repository at this point in the history
Fix #281
  • Loading branch information
drpatelh authored Nov 6, 2020
2 parents 9848e2c + 9c62778 commit a8fa490
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* Updated pipeline template to nf-core/tools `1.11`
* Added multi-core TrimGalore support [#344](https://github.com/nf-core/rnaseq/issues/344)
* Add nag to cite the pipeline in summary [#281](https://github.com/nf-core/rnaseq/issues/281)
* Fixes an issue where MultiQC fails to run with `--skip_biotype_qc` option [#353](https://github.com/nf-core/rnaseq/issues/353)
* Fixes missing Qualimap parameter `-p` [#351](https://github.com/nf-core/rnaseq/issues/351)
* Fixes broken links [#357](https://github.com/nf-core/rnaseq/issues/357)
Expand Down
2 changes: 1 addition & 1 deletion CITATIONS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# nf-core/chipseq: Citations
# nf-core/rnaseq: Citations

## [nf-core](https://www.ncbi.nlm.nih.gov/pubmed/32055031/)

Expand Down
12 changes: 12 additions & 0 deletions lib/Checks.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ class Checks {
}
}

// Citation string
private static String citation(workflow) {
return "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" +
"* The pipeline\n" +
" https://doi.org/10.5281/zenodo.1400710\n\n" +
"* The nf-core framework\n" +
" https://dx.doi.org/10.1038/s41587-020-0439-x\n" +
" https://rdcu.be/b1GjZ\n\n" +
"* Software dependencies\n" +
" https://github.com/${workflow.manifest.name}/blob/master/CITATIONS.md"
}

// Print a warning after SRA download has completed
static void sra_download(log) {
log.warn "=============================================================================\n" +
Expand Down
16 changes: 9 additions & 7 deletions lib/Schema.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Schema {
* Beautify parameters for --help
*/
private static String params_help(workflow, params, json_schema, command) {
String output = Headers.nf_core(workflow, params.monochrome_logs)
String output = Headers.nf_core(workflow, params.monochrome_logs) + "\n"
output += "Typical pipeline command:\n\n"
output += " ${command}\n\n"
def params_map = params_load(json_schema)
Expand All @@ -99,8 +99,9 @@ class Schema {
}
output += "\n"
}
output = output.strip()
output += "\n" + Headers.dashed_line(params.monochrome_logs)
output += Headers.dashed_line(params.monochrome_logs)
output += "\n\n" + Checks.citation(workflow)
output += "\n\n" + Headers.dashed_line(params.monochrome_logs)
return output
}

Expand Down Expand Up @@ -173,14 +174,14 @@ class Schema {
}
params_summary.put(group, sub_params)
}
return [ 'Core Nextflow workflow options' : workflow_summary ] << params_summary
return [ 'Core Nextflow options' : workflow_summary ] << params_summary
}

/*
* Beautify parameters for summary and return as string
*/
private static String params_summary_log(workflow, params, json_schema) {
String output = Headers.nf_core(workflow, params.monochrome_logs)
String output = Headers.nf_core(workflow, params.monochrome_logs) + "\n"
def params_map = params_summary_map(workflow, params, json_schema)
def max_chars = params_max_chars(params_map)
for (group in params_map.keySet()) {
Expand All @@ -193,8 +194,9 @@ class Schema {
output += "\n"
}
}
output = output.strip()
output += "\n" + Headers.dashed_line(params.monochrome_logs)
output += Headers.dashed_line(params.monochrome_logs)
output += "\n\n" + Checks.citation(workflow)
output += "\n\n" + Headers.dashed_line(params.monochrome_logs)
return output
}

Expand Down

0 comments on commit a8fa490

Please sign in to comment.