grst / nxfvars

Access nextflow variables from python scripts or notebooks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add CLI mode

grst opened this issue · comments

Allow use of nxfvars to build a minimalistic CLI.

  • include all parameters up to a certan magic command, e.g. nxf.cli()
  • Render a help page if called with -h/--help
  • Should work with plain python scripts and notebooks executed with nxfvars execute

Example:

nxf.input("adata_object", default='/tmp/adata.h5ad', description="The adata object to work on")
nxf.param("foo", default="bar")
nxf.cli()

Help page

--adata_object             The adata object to work on [default: /tmp/adata.h5ad]
--params.foo               [default: bar]

--help/-h                  Show this page