How can I set paths relative to the project dir in...
# linting
s
How can I set paths relative to the project dir in
nextflow_schema.json
? Whey I run
nf-core piplines schema build
, it updates all paths that use
${projectDir}
into absolute paths in
nextflow_schema.json
, although that is obviously not desirable.
i
What's the use case? The schema doesn't normally reference files in the project directory
s
We are referring to some assets (database files) in the project folder.
Actually seems like I got around the error now by using
$NXF_FILE_ROOT
in nextflow.config, instead of
${projectDir}
... not sure if there are other caveats ...
i
A good workaround would be to host the files on the pipeline branch in test-datasets. The schema is not a Nextflow file, so the magic variable will probably not work. I'm not sure relying on env variables is good either.
👍 1
s
Thank you for the input! Will see how far I get with the current workaround, but yea, we will probably need to revisit this to set things up in a more best practice way!
m
See this thread: https://nfcore.slack.com/archives/CE5LG7WMB/p1742998273284579?thread_ts=1742996506.321399&cid=CE5LG7WMB It seems to be ignored. At least that appears to be how nf-core/rnaseq does it
s
@Mahesh Binzer-Panchal Ah, yes, definitely seems to make sense to ignore. Thank you!