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

Fix large comment block headers so they don't cause phantom merge con… #6755

Merged
merged 3 commits into from
Oct 9, 2024
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
10 changes: 5 additions & 5 deletions modules/nf-core/ensemblvep/filtervep/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
========================================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running tests
========================================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
params {
vep_cache_version = "112"
vep_genome = "WBcel235"
vep_species = "caenorhabditis_elegans"
vep_cache_version = "112"
vep_genome = "WBcel235"
vep_species = "caenorhabditis_elegans"
}
8 changes: 4 additions & 4 deletions modules/nf-core/ensemblvep/filtervep/tests/tab.gz.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
========================================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running tests
========================================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

process {
Expand All @@ -13,12 +13,12 @@ process {
}

withName: ENSEMBLVEP_VEP {
ext.args = '--tab'
ext.args = '--tab'
ext.prefix = { "${meta.id}_vep" }
}

withName: ENSEMBLVEP_FILTERVEP {
ext.args = '--filter "Feature_type is Transcript"'
ext.args = '--filter "Feature_type is Transcript"'
ext.suffix = "tab"
}
}
6 changes: 3 additions & 3 deletions modules/nf-core/ensemblvep/filtervep/tests/vcf.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
========================================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running tests
========================================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

process {
Expand All @@ -13,7 +13,7 @@ process {
}

withName: ENSEMBLVEP_VEP {
ext.args = '--vcf'
ext.args = '--vcf'
ext.prefix = { "${meta.id}_vep" }
}

Expand Down
46 changes: 22 additions & 24 deletions subworkflows/nf-core/utils_nextflow_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
//

/*
========================================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SUBWORKFLOW DEFINITION
========================================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

workflow UTILS_NEXTFLOW_PIPELINE {

take:
print_version // boolean: print version
dump_parameters // boolean: dump parameters
Expand All @@ -22,7 +21,7 @@ workflow UTILS_NEXTFLOW_PIPELINE {
// Print workflow version and exit on --version
//
if (print_version) {
log.info "${workflow.manifest.name} ${getWorkflowVersion()}"
log.info("${workflow.manifest.name} ${getWorkflowVersion()}")
System.exit(0)
}

Expand All @@ -45,9 +44,9 @@ workflow UTILS_NEXTFLOW_PIPELINE {
}

/*
========================================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FUNCTIONS
========================================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

//
Expand All @@ -72,11 +71,11 @@ def getWorkflowVersion() {
// Dump pipeline parameters to a JSON file
//
def dumpParametersToJSON(outdir) {
def timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
def filename = "params_${timestamp}.json"
def temp_pf = new File(workflow.launchDir.toString(), ".${filename}")
def jsonStr = groovy.json.JsonOutput.toJson(params)
temp_pf.text = groovy.json.JsonOutput.prettyPrint(jsonStr)
def timestamp = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss')
def filename = "params_${timestamp}.json"
def temp_pf = new File(workflow.launchDir.toString(), ".${filename}")
def jsonStr = groovy.json.JsonOutput.toJson(params)
temp_pf.text = groovy.json.JsonOutput.prettyPrint(jsonStr)

nextflow.extension.FilesEx.copyTo(temp_pf.toPath(), "${outdir}/pipeline_info/params_${timestamp}.json")
temp_pf.delete()
Expand All @@ -91,9 +90,14 @@ def checkCondaChannels() {
try {
def config = parser.load("conda config --show channels".execute().text)
channels = config.channels
} catch(NullPointerException | IOException e) {
log.warn "Could not verify conda channel configuration."
return
}
catch (NullPointerException e) {
log.warn("Could not verify conda channel configuration.")
return null
}
catch (IOException e) {
log.warn("Could not verify conda channel configuration.")
return null
}

// Check that all channels are present
Expand All @@ -106,19 +110,13 @@ def checkCondaChannels() {

required_channels_in_order.eachWithIndex { channel, index ->
if (index < required_channels_in_order.size() - 1) {
channel_priority_violation |= !(channels.indexOf(channel) < channels.indexOf(required_channels_in_order[index+1]))
channel_priority_violation |= !(channels.indexOf(channel) < channels.indexOf(required_channels_in_order[index + 1]))
}
}

if (channels_missing | channel_priority_violation) {
log.warn "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" +
" There is a problem with your Conda configuration!\n\n" +
" You will need to set-up the conda-forge and bioconda channels correctly.\n" +
" Please refer to https://bioconda.github.io/\n" +
" The observed channel order is \n" +
" ${channels}\n" +
" but the following channel order is required:\n" +
" ${required_channels_in_order}\n" +
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
log.warn(
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " There is a problem with your Conda configuration!\n\n" + " You will need to set-up the conda-forge and bioconda channels correctly.\n" + " Please refer to https://bioconda.github.io/\n" + " The observed channel order is \n" + " ${channels}\n" + " but the following channel order is required:\n" + " ${required_channels_in_order}\n" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
)
Comment on lines -114 to +120

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to preserve the formatting here but found it to be tricky, probably a multi-line string would be better anyway:

    log.warn """\
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          There is a problem with your Conda configuration!

          You will need to set-up the conda-forge and bioconda channels correctly.
          Please refer to https://bioconda.github.io/
          The observed channel order is 
          ${channels}
          but the following channel order is required:
          ${required_channels_in_order}
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        """.stripIndent(true)

}
}
Loading
Loading