Skip to content

Commit b1f7d31

Browse files
committed
Move getGenomeAttribute function to main
1 parent fd28fe4 commit b1f7d31

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

main.nf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,25 @@ workflow {
137137
)
138138
}
139139

140+
/*
141+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
142+
FUNCTIONS
143+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144+
*/
145+
146+
//
147+
// Get attribute from genome config file e.g. fasta
148+
//
149+
150+
def getGenomeAttribute(attribute) {
151+
if (params.genomes && params.genome && params.genomes.containsKey(params.genome)) {
152+
if (params.genomes[ params.genome ].containsKey(attribute)) {
153+
return params.genomes[ params.genome ][ attribute ]
154+
}
155+
}
156+
return null
157+
}
158+
140159
/*
141160
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
142161
THE END

subworkflows/local/utils_nfcore_chipseq_pipeline/main.nf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ def validateInputParameters() {
152152
//
153153
// Get attribute from genome config file e.g. fasta
154154
//
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-
}
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+
// }
163163

164164
//
165165
// Exit pipeline if incorrect --genome key provided

0 commit comments

Comments
 (0)