Skip to content

Commit c3b5edf

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into updates
2 parents 4897569 + d489e97 commit c3b5edf

File tree

3 files changed

+46
-40
lines changed

3 files changed

+46
-40
lines changed

main.nf

+45-12
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@
1111

1212
nextflow.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')
4028
params.blacklist = getGenomeAttribute('blacklist')
4129
params.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

subworkflows/local/prepare_genome.nf

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ workflow PREPARE_GENOME {
146146
ch_bwa_index = UNTAR_BWA_INDEX ( [ [:], bwa_index ] ).untar
147147
ch_versions = ch_versions.mix(UNTAR_BWA_INDEX.out.versions)
148148
} else {
149-
ch_bwa_index = file(bwa_index)
149+
ch_bwa_index = [ [:], file(bwa_index) ]
150150
}
151151
} else {
152152
ch_bwa_index = BWA_INDEX ( ch_fasta.map { [ [:], it ] } ).index

subworkflows/local/utils_nfcore_chipseq_pipeline/main.nf

-27
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,6 @@ def validateInputParameters() {
149149
}
150150
}
151151

152-
//
153-
// Get attribute from genome config file e.g. fasta
154-
//
155-
def getGenomeAttribute(attribute) {
156-
if (params.genomes && params.genome && params.genomes.containsKey(params.genome)) {
157-
if (params.genomes[ params.genome ].containsKey(attribute)) {
158-
return params.genomes[ params.genome ][ attribute ]
159-
}
160-
}
161-
return null
162-
}
163-
164152
//
165153
// Exit pipeline if incorrect --genome key provided
166154
//
@@ -175,21 +163,6 @@ def genomeExistsError() {
175163
}
176164
}
177165

178-
//
179-
// Get macs genome size (macs_gsize)
180-
//
181-
def getMacsGsize(params) {
182-
def val = null
183-
if (params.genomes && params.genome && params.genomes.containsKey(params.genome)) {
184-
if (params.genomes[ params.genome ].containsKey('macs_gsize')) {
185-
if (params.genomes[ params.genome ][ 'macs_gsize' ].containsKey(params.read_length.toString())) {
186-
val = params.genomes[ params.genome ][ 'macs_gsize' ][ params.read_length.toString() ]
187-
}
188-
}
189-
}
190-
return val
191-
}
192-
193166
//
194167
// Generate methods description for MultiQC
195168
//

0 commit comments

Comments
 (0)