Skip to content

Commit

Permalink
Merge pull request #1496 from maxulysse/multiple_DOI
Browse files Browse the repository at this point in the history
handle multiple DOIs
  • Loading branch information
maxulysse authored May 3, 2024
2 parents e1cc550 + 28e6b22 commit 1eae2e3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- [#1378](https://github.com/nf-core/sarek/pull/1378) - Improve cloud tests launch workflow to use matrix
- [#1488](https://github.com/nf-core/sarek/pull/1488) - Fixing call to `GATK4_HAPLOTYPECALLER` and thereby also the test-profile `test_full_germline`
- [#1496](https://github.com/nf-core/sarek/pull/1496) - Fix multiple DOI handling in manifest

### Removed

Expand Down
2 changes: 1 addition & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@
},
"utils_nfcore_pipeline": {
"branch": "master",
"git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa",
"git_sha": "92de218a329bfc9a9033116eb5f65fd270e72ba3",
"installed_by": ["subworkflows"]
},
"utils_nfvalidation_plugin": {
Expand Down
12 changes: 10 additions & 2 deletions subworkflows/local/utils_nfcore_sarek_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,16 @@ def methodsDescriptionText(mqc_methods_yaml) {
meta["manifest_map"] = workflow.manifest.toMap()

// Pipeline DOI
meta["doi_text"] = meta.manifest_map.doi ? "(doi: <a href=\'https://doi.org/${meta.manifest_map.doi}\'>${meta.manifest_map.doi}</a>)" : ""
meta["nodoi_text"] = meta.manifest_map.doi ? "": "<li>If available, make sure to update the text to include the Zenodo DOI of version of the pipeline used. </li>"
if (meta.manifest_map.doi) {
// Using a loop to handle multiple DOIs
// Removing `https://doi.org/` to handle pipelines using DOIs vs DOI resolvers
// Removing ` ` since the manifest.doi is a string and not a proper list
def temp_doi_ref = ""
String[] manifest_doi = meta.manifest_map.doi.tokenize(",")
for (String doi_ref: manifest_doi) temp_doi_ref += "(doi: <a href=\'https://doi.org/${doi_ref.replace("https://doi.org/", "").replace(" ", "")}\'>${doi_ref.replace("https://doi.org/", "").replace(" ", "")}</a>), "
meta["doi_text"] = temp_doi_ref.substring(0, temp_doi_ref.length() - 2)
} else meta["doi_text"] = ""
meta["nodoi_text"] = meta.manifest_map.doi ? "" : "<li>If available, make sure to update the text to include the Zenodo DOI of the pipeline version used. </li>"

// Tool references
meta["tool_citations"] = ""
Expand Down
8 changes: 7 additions & 1 deletion subworkflows/nf-core/utils_nfcore_pipeline/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1eae2e3

Please sign in to comment.