I don't particularly like putting files in `assets...
# tools
j
I don't particularly like putting files in
assets
- I would rather put the them on nf-core/testdatasets or something and pull from that (with user docs saying you have to download XYZ files to run if on offline)
f
my intention is that a user could theoretically supply their own file but the standard is the file I chose - and its not only for testing but rather for the "real" pipeline run
m
Depends on the size of the file, but if it is small enough to be committed to the repo, I would actually enjoy having to care about one less extra step to run a pipeline offline. That being said, I unfortunately do not know how to address the linting issue…
j
Another option if its purely an internal file is to not set the path in the schema params
Refer to it only in the code in an if/else statememt: if paramter is false, load default from projectDir
👍 1
👍🏻 1
f
I think thats a nice idea
j
It's so nice I think I'm going to do just thst myself in #mag 😆
because its bothered me for a long time
p
Note that this is something that we may (need) to address in the future with Nextflow
👍 1
The problem is not really #tools , but rather the fact that it's using the
nextflow config
command which is resolving the path.
In the near-ish future, Nextflow will start to interact with the schema directly. So it may need some new toys to, for example, return the config without resolving variable names.
Also this.
j
Good to know!
p
Does this problem affect anything other than
$projectDir
? Ben suggests that we manually switch this out in the #tools codebase..
j
My PR fixing this (@Famke Bäuerle in case you didn't get to this in your own stuff) : https://github.com/nf-core/mag/pull/844
👀 1
f
That is how I implemented it after you suggestion as well.
👍 1
In the main.nf:
Copy code
// For varlociraptor get the scenario file
    varlociraptor_scenario_file = params.varlociraptor_scenario_file ? Channel.fromPath(params.varlociraptor_scenario_file).collect()
                                        : Channel.fromPath("${projectDir}/assets/varlociraptor_somatic_with_priors.yte.yaml").collect()
👍 1