uclahs-cds / tool-NFTest

CLI to automate Nextflow pipeline testing
GNU General Public License v2.0
11 stars 1 forks source link

Resolve full path to output directory in Nextflow command #56

Open nwiltsie opened 11 months ago

nwiltsie commented 11 months ago

The combination of these two code chunks...

https://github.com/uclahs-cds/tool-NFTest/blob/d096b96ef49d0a9b41e48f12feb4b05bd6b15fbb/nftest/NFTestENV.py#L23

https://github.com/uclahs-cds/tool-NFTest/blob/d096b96ef49d0a9b41e48f12feb4b05bd6b15fbb/nftest/NFTestCase.py#L103-L105

... and python's behavior of stripping leading ./s from paths...

In [2]: Path("./") / "foo"
Out[2]: PosixPath('foo')

... results in passing bare relative paths for the --output_dir argument, which triggers https://github.com/uclahs-cds/pipeline-Nextflow-config/issues/59 for me:

NXF_WORK=././test/work nextflow run ./main.nf -c /hot/code/nwiltsie/pipelines/pipeline-align-DNA/test/global.config -c ./test/a_mini_n2-picard.config --output_dir a_mini_n2-picard

We should resolve all of those relative paths before launching Nextflow.

yashpatel6 commented 11 months ago

Agreed, also building on this, we should resolve all paths for the config files in the Nextflow run command