Skip to content

Commit

Permalink
Remove unused code from utils_nfcore_pipeline swf (#7094)
Browse files Browse the repository at this point in the history
remove unused code from utils_nfcore_pipeline swf
  • Loading branch information
mirpedrol authored Nov 29, 2024
1 parent 219299d commit 081e10e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 124 deletions.
42 changes: 0 additions & 42 deletions subworkflows/nf-core/utils_nfcore_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,6 @@ def checkProfileProvided(nextflow_cli_args) {
}
}

//
// Citation string for pipeline
//
def workflowCitation() {
def temp_doi_ref = ""
def manifest_doi = workflow.manifest.doi.tokenize(",")
// Handling 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
manifest_doi.each { doi_ref ->
temp_doi_ref += " https://doi.org/${doi_ref.replace('https://doi.org/', '').replace(' ', '')}\n"
}
return "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" + "* The pipeline\n" + temp_doi_ref + "\n" + "* The nf-core framework\n" + " https://doi.org/10.1038/s41587-020-0439-x\n\n" + "* Software dependencies\n" + " https://github.com/${workflow.manifest.name}/blob/master/CITATIONS.md"
}

//
// Generate workflow version string
//
Expand Down Expand Up @@ -150,33 +135,6 @@ def paramsSummaryMultiqc(summary_params) {
return yaml_file_text
}

//
// nf-core logo
//
def nfCoreLogo(monochrome_logs=true) {
def colors = logColours(monochrome_logs) as Map
String.format(
"""\n
${dashedLine(monochrome_logs)}
${colors.green},--.${colors.black}/${colors.green},-.${colors.reset}
${colors.blue} ___ __ __ __ ___ ${colors.green}/,-._.--~\'${colors.reset}
${colors.blue} |\\ | |__ __ / ` / \\ |__) |__ ${colors.yellow}} {${colors.reset}
${colors.blue} | \\| | \\__, \\__/ | \\ |___ ${colors.green}\\`-._,-`-,${colors.reset}
${colors.green}`._,._,\'${colors.reset}
${colors.purple} ${workflow.manifest.name} ${getWorkflowVersion()}${colors.reset}
${dashedLine(monochrome_logs)}
""".stripIndent()
)
}

//
// Return dashed line
//
def dashedLine(monochrome_logs=true) {
def colors = logColours(monochrome_logs) as Map
return "-${colors.dim}----------------------------------------------------${colors.reset}-"
}

//
// ANSII colours used for terminal logging
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,58 +41,6 @@ nextflow_function {
}
}

test("Test Function workflowCitation") {

function "workflowCitation"

then {
assertAll(
{ assert function.success },
{ assert snapshot(function.result).match() }
)
}
}

test("Test Function nfCoreLogo") {

function "nfCoreLogo"

when {
function {
"""
input[0] = false
"""
}
}

then {
assertAll(
{ assert function.success },
{ assert snapshot(function.result).match() }
)
}
}

test("Test Function dashedLine") {

function "dashedLine"

when {
function {
"""
input[0] = false
"""
}
}

then {
assertAll(
{ assert function.success },
{ assert snapshot(function.result).match() }
)
}
}

test("Test Function without logColours") {

function "logColours"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,6 @@
},
"timestamp": "2024-02-28T12:02:59.729647"
},
"Test Function nfCoreLogo": {
"content": [
"\n\n-\u001b[2m----------------------------------------------------\u001b[0m-\n \u001b[0;32m,--.\u001b[0;30m/\u001b[0;32m,-.\u001b[0m\n\u001b[0;34m ___ __ __ __ ___ \u001b[0;32m/,-._.--~'\u001b[0m\n\u001b[0;34m |\\ | |__ __ / ` / \\ |__) |__ \u001b[0;33m} {\u001b[0m\n\u001b[0;34m | \\| | \\__, \\__/ | \\ |___ \u001b[0;32m\\`-._,-`-,\u001b[0m\n \u001b[0;32m`._,._,'\u001b[0m\n\u001b[0;35m nextflow_workflow v9.9.9\u001b[0m\n-\u001b[2m----------------------------------------------------\u001b[0m-\n"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-02-28T12:03:10.562934"
},
"Test Function workflowCitation": {
"content": [
"If you use nextflow_workflow for your analysis please cite:\n\n* The pipeline\n https://doi.org/10.5281/zenodo.5070524\n\n* The nf-core framework\n https://doi.org/10.1038/s41587-020-0439-x\n\n* Software dependencies\n https://github.com/nextflow_workflow/blob/master/CITATIONS.md"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-02-28T12:03:07.019761"
},
"Test Function without logColours": {
"content": [
{
Expand Down Expand Up @@ -95,16 +75,6 @@
},
"timestamp": "2024-02-28T12:03:17.969323"
},
"Test Function dashedLine": {
"content": [
"-\u001b[2m----------------------------------------------------\u001b[0m-"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-02-28T12:03:14.366181"
},
"Test Function with logColours": {
"content": [
{
Expand Down

0 comments on commit 081e10e

Please sign in to comment.