mribeirodantas / NextflowSnippets

This repository hosts a large collection of Nextflow snippets
Apache License 2.0
56 stars 1 forks source link

[question]: Saving config files in outdir #5

Open tamuanand opened 7 months ago

tamuanand commented 7 months ago

Hi @mribeirodantas

Thanks a lot for the GH repo.

Two questions from https://github.com/mribeirodantas/NextflowSnippets/blob/main/snippets/save_configs.md

  1. How/Where to find a list of all the Nextflow internal variables like workflow.configFiles

  2. If I have a nextflow.config that has something like this

params {
    outdir  = 'results'
}

profiles {
    singularity    { includeConfig 'conf/singularity.config' }
}

and I then call nextflow run -bg main.nf -profile singularity

how do I ensure that both my nextflow.config and singularity.config make it to the outdir?

Thanks in advance

mribeirodantas commented 7 months ago

Hey @tamuanand 😄

You can find the list of variables in the official documentation here.

As for your second question, the stored nextflow.config should contain the content of conf/singularity.config. No?

tamuanand commented 7 months ago

hi @mribeirodantas

The nextflow.config only has the pointer with the include directive

When the job runs with -profile singularity it uses content and directives from there.

Hence, just checking how I can get those contents too in the outdir? Especially when running on NF Tower with awsbatch config

mribeirodantas commented 7 months ago

Instead of -profile singularity, you could go with -c conf/singularity.config. I believe the effect would be the same, but now the second file would also go to your outdir. I haven't tried, but I think it should work. Can you try this please?