1111
1212nextflow. enable. dsl = 2
1313
14- /*
15- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16- IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS / WORKFLOWS
17- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18- */
19- include { CHIPSEQ } from ' ./workflows/chipseq'
20- include { PREPARE_GENOME } from ' ./subworkflows/local/prepare_genome'
21- include { PIPELINE_INITIALISATION } from ' ./subworkflows/local/utils_nfcore_chipseq_pipeline'
22- include { PIPELINE_COMPLETION } from ' ./subworkflows/local/utils_nfcore_chipseq_pipeline'
23- include { getGenomeAttribute } from ' ./subworkflows/local/utils_nfcore_chipseq_pipeline'
24- include { getMacsGsize } from ' ./subworkflows/local/utils_nfcore_chipseq_pipeline'
25-
2614/*
2715~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2816 GENOME PARAMETER VALUES
@@ -40,6 +28,18 @@ params.gene_bed = getGenomeAttribute('gene_bed')
4028params. blacklist = getGenomeAttribute(' blacklist' )
4129params. macs_gsize = getMacsGsize(params)
4230
31+ /*
32+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33+ IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS / WORKFLOWS
34+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35+ */
36+ include { CHIPSEQ } from ' ./workflows/chipseq'
37+ include { PREPARE_GENOME } from ' ./subworkflows/local/prepare_genome'
38+ include { PIPELINE_INITIALISATION } from ' ./subworkflows/local/utils_nfcore_chipseq_pipeline'
39+ include { PIPELINE_COMPLETION } from ' ./subworkflows/local/utils_nfcore_chipseq_pipeline'
40+ // include { getGenomeAttribute } from './subworkflows/local/utils_nfcore_chipseq_pipeline'
41+ // include { getMacsGsize } from './subworkflows/local/utils_nfcore_chipseq_pipeline'
42+
4343/*
4444~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4545 NAMED WORKFLOWS FOR PIPELINE
@@ -137,6 +137,39 @@ workflow {
137137 )
138138}
139139
140+ /*
141+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
142+ FUNCTIONS
143+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144+ */
145+
146+ //
147+ // Get attribute from genome config file e.g. fasta
148+ //
149+ def getGenomeAttribute(attribute) {
150+ if (params. genomes && params. genome && params. genomes. containsKey(params. genome)) {
151+ if (params. genomes[ params. genome ]. containsKey(attribute)) {
152+ return params. genomes[ params. genome ][ attribute ]
153+ }
154+ }
155+ return null
156+ }
157+
158+ //
159+ // Get macs genome size (macs_gsize)
160+ //
161+ def getMacsGsize(params) {
162+ def val = null
163+ if (params. genomes && params. genome && params. genomes. containsKey(params. genome)) {
164+ if (params. genomes[ params. genome ]. containsKey(' macs_gsize' )) {
165+ if (params. genomes[ params. genome ][ ' macs_gsize' ]. containsKey(params. read_length. toString())) {
166+ val = params. genomes[ params. genome ][ ' macs_gsize' ][ params. read_length. toString() ]
167+ }
168+ }
169+ }
170+ return val
171+ }
172+
140173/*
141174~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
142175 THE END
0 commit comments