Quick question regarding nextflow configs. I thoug...
# help
l
Quick question regarding nextflow configs. I thought that if I specify multiple configs (for instance
institutional
and
test
in a specific order one should overwrite the other when it comes to certain values? For instance, shouldnt the
test
profile's
resourcelimits
overwrite the ones specified in the institutional config if the
test
profile is specified later? Or am I misunderstanding
j
Yes that is correct
If I remember correctly
-profile institute,test
test will take precedence over institute
l
How does this interact then with process labels? Because my jobs will still submit with, e.g. 12 cpus even if my resource limits in my test profile is capped to 4 cpus
or is it dependent on the order in
nextflow.config
, since there
test { includeConfig ... }
is included before the institutional
includeConfig
statement
j
Ahhh right yeah test is special precisely for that reason
It didn't used to be that way around so I always forget - but we had to switch it for another reason where there was a very long github thread about (@Mahesh Binzer-Panchal can summarise when h e iss back from holiday, I think he was the one who worked out all of that)
So in all other cases the ordering would be fine, but for
test
it doesn't work
l
Gotcha, thanks!
m
One thing to check is also how the process selector is defined. A pattern or full name takes precedence over the simple name, so even if it's specified later, the more "specific" name will have higher precedence.
l
Hmm I see. For now I just changed the resource limits associated to the labels in
conf/base.config
to low values so my tests can run through today without being stuck in a queue 😅 But I'll definitely look into a better solution, thanks!
m
If you post the relevant parts of the config, we can check.
l
Our institutional config is a beast of its own. The other configs (test/base) are default. institutional config: https://nf-co.re/configs/vsc_kul_uhasselt/ and the test one:
Copy code
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Defines input files and everything required to run a fast and simple pipeline test.

    Use as follows:
        nextflow run IntGenomicsLab/lr_somatic -profile test,<docker/singularity> --outdir <OUTDIR>

----------------------------------------------------------------------------------------
*/

process {
    resourceLimits = [
        cpus: 4,
        memory: '15.GB',
        time: '1.h'
    ]
}

params {
    config_profile_name        = 'Test profile'
    config_profile_description = 'Minimal test dataset to check pipeline function'

    // Input data
    //input = "/staging/leuven/stg_00096/home/rforsyth/lr_somatic/assets/test_sheet.csv"
    input    = "https://raw.githubusercontent.com/IntGenomicsLab/test-datasets/main/samplesheets/samplesheet_lr-somatic.csv"
    fasta    = "https://raw.githubusercontent.com/IntGenomicsLab/test-datasets/main/references/CHM13V2_maskedY_rCRS_chr19.fa.gz"

    // Additional params
    genome              = "CHM13"
    ascat_chroms        = "19"
    ascat_min_counts    = 2
    wakhan_chroms       = "19"
}
m
What's the string you used for
-profile
? I see some
withLabel
in the institutional profiles which are not in the test profile
l
Copy code
-profile vsc_kul_uhasselt,wice,test
wice is a (sub?)profile of the institutional one
m
I see, and it also has a
withLabel
selector in it. Does the process that's affected when using the test profile also have the
.*gpu.*
label?
l
Nope we don't have GPU labels in this pipeline (yet)
m
Hmm. Then I'm not exactly sure what the issue is there without doing some digging/testing. For now you can try:
Copy code
process {
    withName: '.*' {
        resourceLimits = [
            cpus: 4,
            memory: '15.GB',
            time: '1.h'
        ]
    }
}
and that should enforce it.
l
In the test config I'd assume right
m
in the test profile, yes sorry.
l
Alright thanks! Will test if after my meeting! 🤞
👍🏽 1
Works, thanks a lot!
👍🏽 1
m
It might be that the test profiles are defined before the institutional profiles are read in. If so the solution would be to move the test profiles after the institutional profiles are read in.
l
Yep thats what I figured and wanted to try after my meeting. But this works like a charm! Will still give swapping them around in the config a try though