Hello everyone, I developed a pipeline for my PhD ...
# nostupidquestions
i
Hello everyone, I developed a pipeline for my PhD and I'm trying to make it easily reusable by others, so I am trying to orient myself around nf-core standards. I have some questions about config files, like how to know which config options go into which config file, like output specifications and process specific resources and conda/container info (between
nextflow.config
,
conf/base.config
and
conf/modules.config
). Also, how do I best keep my personal config specifications (like where to save the work directory) separate from the default options. Do I just add another config file like
conf/isabel.config
and put my specifications there? At what level do I include this extra config file, just on the command line? Sorry for all the questions, I am still wrapping my head around this. If anybody could give me guidance or recommend a good resource I would really appreciate it. I tried to look through the nf-core help and the nextflow trainings but couldn't quite find something that clarified this for me. Thanks, Isabel
m
So for me any custom config like that should not belong in the pipeline itself that you share with others
I would only include it on the command line
If it's something that can be shared with others at an infrastructure level, I would consider looking at the config repo, but you should be fine just with a custom config file that you can use on the command line
i
Thank you that's really helpful
n
To answer some of your other questions: I think
nextflow.config
is largely about configuring the pipeline at a very basic level, i.e. set defaults / initialize all values.
base.config
is then a bit more specifically tailored towards a specific type of run (often pipelines offer choices on what you can do) and
base
kind of sets the "reasonable default", i.e. maybe you initialize some values to
null
or
""
in
nextflow.config
, but for the specific type of run that
base
configures they need to be set a to a different value.
modules.config
is configuring the modules that you use to work correctly in the context of your pipeline. e.g. specifying the output directory structure, and setting other things that are specific for how this module is used in the pipeline (e.g.
ext.args
)
isabel.config
, as maxime said, should not be in the pipeline directory, as this does not configure the "pipeline" but it configures a specific run, and other people probably do not want to run exactly what you do. From a data-management perspective
isabel.config
belongs to the data you are analyzing, and should be stored alongside the specific analysis.
i
Yes, I think I understand now, thank you. I might get back to you with follow-up questions as I work through this
s
Also, how do I best keep my personal config specifications (like where to save the work directory) separate from the default options.
This can actually be in your
~/.nextflow/config
(or wherever
$NXF_HOME
points to), see https://docs.seqera.io/nextflow/config#configuration-files
gratitude thank you 1
If you want it to apply to every Nextflow run you use
(for instance whether to use docker/singularity/conda, and what global resource limits to apply on your personal environment)