Skip to content

Commit

Permalink
fix: Nextflow profile (#456)
Browse files Browse the repository at this point in the history
* Update wrapper.py

Fix
ERROR: You used a core Nextflow option with two hyphens: '--profile'. Please resubmit with '-profi
le'

WARN: Found unexpected parameters:
* --profile: [singularity]

nextflow run nf-core/mag -revision 2.1.1 -profile singularity --input output/SRR13435231.csv --profile ['singularity']

* Update wrapper.py

* Update environment.yaml

* Update wrapper.py

Added extra parameter to accommodate additional workflow flags.

* Update wrapper.py

* black formatting

* Update wrapper.py

Fix
ERROR: You used a core Nextflow option with two hyphens: '--profile'. Please resubmit with '-profi
le'

WARN: Found unexpected parameters:
* --profile: [singularity]

nextflow run nf-core/mag -revision 2.1.1 -profile singularity --input output/SRR13435231.csv --profile ['singularity']

* Update wrapper.py

* Update environment.yaml

* Update wrapper.py

Added extra parameter to accommodate additional workflow flags.

* Update wrapper.py

* black formatting
  • Loading branch information
tpall committed Mar 17, 2022
1 parent a6106eb commit bd9af55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion utils/nextflow/environment.yaml
Expand Up @@ -2,4 +2,4 @@ channels:
- bioconda
- conda-forge
dependencies:
- nextflow =20.10
- nextflow
10 changes: 8 additions & 2 deletions utils/nextflow/wrapper.py
Expand Up @@ -8,6 +8,7 @@

revision = snakemake.params.get("revision")
profile = snakemake.params.get("profile", [])
extra = snakemake.params.get("extra", "")
if isinstance(profile, str):
profile = [profile]

Expand All @@ -31,11 +32,16 @@
files = ",".join(files)
add_parameter(name, files)
for name, value in snakemake.params.items():
if name != "pipeline" and name != "revision":
if (
name != "pipeline"
and name != "revision"
and name != "profile"
and name != "extra"
):
add_parameter(name, value)

log = snakemake.log_fmt_shell(stdout=False, stderr=True)
args = " ".join(args)
pipeline = snakemake.params.pipeline

shell("nextflow run {pipeline} {args} {log}")
shell("nextflow run {pipeline} {args} {extra} {log}")

0 comments on commit bd9af55

Please sign in to comment.