fmalmeida / bacannot

Generic but comprehensive pipeline for prokaryotic genome annotation and interrogation with interactive reports and shiny app.
https://bacannot.readthedocs.io/en/latest/
GNU General Public License v3.0
96 stars 9 forks source link

Split the configuration into multiple profiles with a dedicated folder #37

Closed abhi18av closed 2 years ago

abhi18av commented 2 years ago

I was wondering whether you'd be okay with splitting the configuration section of the pipeline to rely upon files dedicated to a specific executor.

For example, instead of


/*
                Configuration of Docker usage
                DO NOT change any of those
*/
// specific images
process {
    withLabel: 'main' {
        container = 'fmalmeida/bacannot:v2.4'
    }

    withLabel: 'renv' {
        container = 'fmalmeida/bacannot:v2.4_renv'
    }

    withLabel: 'jbrowse' {
        container = 'fmalmeida/bacannot:jbrowse'
    }

    withLabel: 'kofam' {
        container = 'fmalmeida/bacannot:kofamscan'
    }

    withLabel: 'smash' {
        container = 'fmalmeida/bacannot:antismash'
    }

    withLabel: 'assembly' {
        container = 'fmalmeida/mpgap:v2.3'
    }
}

// Container usage and permission
docker {
  enabled      = true
  runOptions   = '--platform linux/amd64 -u $(id -u):root'
  fixOwnership = true
}

We can put all of this within a conf/docker.config profile and then use the following to create a docker profile

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

What are your thoughts?

fmalmeida commented 2 years ago

Hi @abhi18av ,

That actually would be quite a nice feature, with that the config file would be cleaner and more concise, gaining readability

abhi18av commented 2 years ago

Perfect - than I'll start off my contributions with this one :)

abhi18av commented 2 years ago

Closing the issue as the associated PR has been merged.