-
Notifications
You must be signed in to change notification settings - Fork 1k
Run Nextflow lint in pre-commit #8391
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
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
cbf58cf
style: Add Nextflow linting support to pre-commit configuration
edmundmiller 114dd8d
ci: -o concise works for some reason
edmundmiller 45b46f0
style: Run nextflow lint on everything
edmundmiller cc10955
Revert "style: Run nextflow lint on everything"
edmundmiller b198c8c
style: Remove format call
edmundmiller 302f3d3
switch to seqeralabs hook
mashehu 7de6777
add nextflow setup step to linting action
mashehu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,4 @@ process { | |
| withName: ANGSD_DOCOUNTS { | ||
| ext.args = "-iCounts 1 -doDepth -dumpCounts 2" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| process { | ||
| ext.args = "--no-version" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| process { | ||
| ext.args2 = '--no-version --ploidy 1 --multiallelic-caller' | ||
| ext.args3 = '--no-version' | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| process { | ||
| ext.args = "-f '%CHROM %POS %REF %ALT[%SAMPLE=%GT]'" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,4 @@ process { | |
| withName: SEQTK_SEQ { | ||
| ext.args = '-A' | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| process { | ||
| ext.args = '--genome hg38' | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,3 +3,4 @@ process { | |
| publishDir = [ path: { "output" } ] | ||
| } | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,4 @@ process { | |
| withName: "CHECKM2_PREDICT" { | ||
| ext.args = "--lowmem" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,4 @@ process { | |
| withName: CLAME { | ||
| ext.args = '-b 100 -print' | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,4 @@ process { | |
| withName: 'CNVKIT_EXPORT' { | ||
| ext.args = { params.cnvkit_export_args } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,47 +1,45 @@ | ||
| process CONTROLFREEC_ASSESSSIGNIFICANCE { | ||
| tag "${meta.id}" | ||
| tag "$meta.id" | ||
| label 'process_low' | ||
|
|
||
| conda "${moduleDir}/environment.yml" | ||
| container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container | ||
| ? 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0' | ||
| : 'biocontainers/control-freec:11.6b--hdbdd923_0'}" | ||
| container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
| 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0' : | ||
| 'biocontainers/control-freec:11.6b--hdbdd923_0' }" | ||
|
|
||
| input: | ||
| tuple val(meta), path(cnvs), path(ratio) | ||
|
|
||
| output: | ||
| tuple val(meta), path("*.p.value.txt"), emit: p_value_txt | ||
| path "versions.yml", emit: versions | ||
| path "versions.yml" , emit: versions | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| def VERSION = '11.6b' | ||
| // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. | ||
| def VERSION = '11.6b' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. | ||
| """ | ||
| cat \$(which assess_significance.R) | R --slave --args ${cnvs} ${ratio} | ||
|
|
||
| mv *.p.value.txt ${prefix}.p.value.txt | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| controlfreec: ${VERSION} | ||
| controlfreec: $VERSION | ||
| END_VERSIONS | ||
| """ | ||
|
|
||
| stub: | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| def VERSION = '11.6b' | ||
| // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. | ||
| def VERSION = '11.6b' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. | ||
| """ | ||
| touch ${prefix}.p.value.txt | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| controlfreec: ${VERSION} | ||
| controlfreec: $VERSION | ||
| END_VERSIONS | ||
| """ | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,46 +1,44 @@ | ||
| process CONTROLFREEC_FREEC2BED { | ||
| tag "${meta.id}" | ||
| tag "$meta.id" | ||
| label 'process_low' | ||
|
|
||
| conda "${moduleDir}/environment.yml" | ||
| container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container | ||
| ? 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0' | ||
| : 'biocontainers/control-freec:11.6b--hdbdd923_0'}" | ||
| container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
| 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0' : | ||
| 'biocontainers/control-freec:11.6b--hdbdd923_0' }" | ||
|
|
||
| input: | ||
| tuple val(meta), path(ratio) | ||
|
|
||
| output: | ||
| tuple val(meta), path("*.bed"), emit: bed | ||
| path "versions.yml", emit: versions | ||
| path "versions.yml" , emit: versions | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def args = task.ext.args ?: '' | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| def VERSION = '11.6b' | ||
| // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. | ||
| def VERSION = '11.6b' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. | ||
| """ | ||
| freec2bed.pl -f ${ratio} ${args} > ${prefix}.bed | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| controlfreec: ${VERSION} | ||
| controlfreec: $VERSION | ||
| END_VERSIONS | ||
| """ | ||
|
|
||
| stub: | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| def VERSION = '11.6b' | ||
| // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. | ||
| def VERSION = '11.6b' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. | ||
| """ | ||
| touch ${prefix}.bed | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| controlfreec: ${VERSION} | ||
| controlfreec: $VERSION | ||
| END_VERSIONS | ||
| """ | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the almost the same as the default for the pre-commit hook: https://github.com/seqeralabs/nf-lint-pre-commit/blob/58b2431ebcdf99a0c024c9c7f695bfa30c01555c/.pre-commit-hooks.yaml#L6
Shall we add
*.nextflowfiles upstream? I've never seen one in the wild!