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

Resolve full path to output directory in Nextflow command #56

Open
nwiltsie opened this issue Jan 3, 2024 · 1 comment
Open

Resolve full path to output directory in Nextflow command #56

nwiltsie opened this issue Jan 3, 2024 · 1 comment

Comments

@nwiltsie
Copy link
Member

nwiltsie commented Jan 3, 2024

The combination of these two code chunks...

self.NFT_OUTPUT = os.getenv('NFT_OUTPUT', default='./')

output_directory_with_case = Path(self._env.NFT_OUTPUT)/self.name_for_output
output_directory_arg = f"--{self.output_directory_param_name} " \
f"{output_directory_with_case}"

... 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 uclahs-cds/pipeline-Nextflow-config#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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants