annotate 0.1.0/workflows/cronology.nf @ 0:c8597e9e1a97

"planemo upload"
author kkonganti
date Mon, 27 Nov 2023 12:37:44 -0500
parents
children 5eaaf749472c
rev   line source
kkonganti@0 1 // Define any required imports for this specific workflow
kkonganti@0 2 import java.nio.file.Paths
kkonganti@0 3 import nextflow.file.FileHelper
kkonganti@0 4
kkonganti@0 5 // Include any necessary methods
kkonganti@0 6 include { \
kkonganti@0 7 summaryOfParams; stopNow; fastqEntryPointHelp; sendMail; conciseHelp; \
kkonganti@0 8 addPadding; wrapUpHelp } from "${params.routines}"
kkonganti@0 9 include { dpubmlstpyHelp } from "${params.toolshelp}${params.fs}dpubmlstpy"
kkonganti@0 10 include { fastpHelp } from "${params.toolshelp}${params.fs}fastp"
kkonganti@0 11 include { mashscreenHelp } from "${params.toolshelp}${params.fs}mashscreen"
kkonganti@0 12 include { tuspyHelp } from "${params.toolshelp}${params.fs}tuspy"
kkonganti@0 13 include { spadesHelp } from "${params.toolshelp}${params.fs}spades"
kkonganti@0 14 include { shovillHelp } from "${params.toolshelp}${params.fs}shovill"
kkonganti@0 15 include { polypolishHelp } from "${params.toolshelp}${params.fs}polypolish"
kkonganti@0 16 include { mashtreeHelp } from "${params.toolshelp}${params.fs}mashtree"
kkonganti@0 17 include { quastHelp } from "${params.toolshelp}${params.fs}quast"
kkonganti@0 18 include { prodigalHelp } from "${params.toolshelp}${params.fs}prodigal"
kkonganti@0 19 include { prokkaHelp } from "${params.toolshelp}${params.fs}prokka"
kkonganti@0 20 include { pirateHelp } from "${params.toolshelp}${params.fs}pirate"
kkonganti@0 21 include { mlstHelp } from "${params.toolshelp}${params.fs}mlst"
kkonganti@0 22 include { abricateHelp } from "${params.toolshelp}${params.fs}abricate"
kkonganti@0 23
kkonganti@0 24 // Exit if help requested before any subworkflows
kkonganti@0 25 if (params.help) {
kkonganti@0 26 log.info help()
kkonganti@0 27 exit 0
kkonganti@0 28 }
kkonganti@0 29
kkonganti@0 30 // Include any necessary modules and subworkflows
kkonganti@0 31 include { PROCESS_FASTQ } from "${params.subworkflows}${params.fs}process_fastq"
kkonganti@0 32 include { PRODKA } from "${params.subworkflows}${params.fs}prodka"
kkonganti@0 33 include { DOWNLOAD_PUBMLST_SCHEME } from "${params.modules}${params.fs}download_pubmlst_scheme${params.fs}main"
kkonganti@0 34 include { DOWNLOAD_REF_GENOME } from "${params.modules}${params.fs}download_ref_genome${params.fs}main"
kkonganti@0 35 include { FASTP } from "${params.modules}${params.fs}fastp${params.fs}main"
kkonganti@0 36 include { MASH_SCREEN } from "${params.modules}${params.fs}mash${params.fs}screen${params.fs}main"
kkonganti@0 37 include { TOP_UNIQUE_SEROVARS } from "${params.modules}${params.fs}top_unique_serovars${params.fs}main"
kkonganti@0 38 include { CAT_UNIQUE } from "${params.modules}${params.fs}cat${params.fs}unique${params.fs}main"
kkonganti@0 39 include { SPADES_ASSEMBLE } from "${params.modules}${params.fs}spades${params.fs}assemble${params.fs}main"
kkonganti@0 40 include { SHOVILL } from "${params.modules}${params.fs}shovill${params.fs}main"
kkonganti@0 41 include { BWA_IDX_MEM } from "${params.modules}${params.fs}custom${params.fs}bwa_idx_mem${params.fs}main"
kkonganti@0 42 include { POLYPOLISH } from "${params.modules}${params.fs}polypolish${params.fs}main"
kkonganti@0 43 include { GUNC_RUN } from "${params.modules}${params.fs}gunc${params.fs}run${params.fs}main"
kkonganti@0 44 include { QUAST } from "${params.modules}${params.fs}quast${params.fs}main"
kkonganti@0 45 include { RMLST_POST } from "${params.modules}${params.fs}rmlst${params.fs}main"
kkonganti@0 46 include { PIRATE } from "${params.modules}${params.fs}pirate${params.fs}main"
kkonganti@0 47 include { MASHTREE } from "${params.modules}${params.fs}mashtree${params.fs}main"
kkonganti@0 48 include { MLST } from "${params.modules}${params.fs}mlst${params.fs}main"
kkonganti@0 49 include { ABRICATE_RUN } from "${params.modules}${params.fs}abricate${params.fs}run${params.fs}main"
kkonganti@0 50 include { ABRICATE_SUMMARY } from "${params.modules}${params.fs}abricate${params.fs}summary${params.fs}main"
kkonganti@0 51 include { TABLE_SUMMARY } from "${params.modules}${params.fs}cat${params.fs}tables${params.fs}main"
kkonganti@0 52 include { DUMP_SOFTWARE_VERSIONS } from "${params.modules}${params.fs}custom${params.fs}dump_software_versions${params.fs}main"
kkonganti@0 53 include { MULTIQC } from "${params.modules}${params.fs}multiqc${params.fs}main"
kkonganti@0 54
kkonganti@0 55 /*
kkonganti@0 56 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kkonganti@0 57 INPUTS AND ANY CHECKS FOR THE CRONOLOGY WORKFLOW
kkonganti@0 58 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kkonganti@0 59 */
kkonganti@0 60 def spades_custom_hmm = (params.spades_hmm ? file ( "${params.spades_hmm}" ) : false)
kkonganti@0 61 def reads_platform = 0
kkonganti@0 62 def abricate_dbs = [ 'ncbiamrplus', 'resfinder', 'megares', 'argannot' ]
kkonganti@0 63
kkonganti@0 64 reads_platform += (params.input ? 1 : 0)
kkonganti@0 65
kkonganti@0 66 if (spades_custom_hmm && !spades_custom_hmm.exists()) {
kkonganti@0 67 stopNow("Please check if the following SPAdes' custom HMM directory\n" +
kkonganti@0 68 "path is valid:\n${params.spades_hmm}\nCannot proceed further!")
kkonganti@0 69 }
kkonganti@0 70
kkonganti@0 71 if (reads_platform < 1 || reads_platform == 0) {
kkonganti@0 72 stopNow("Please mention at least one absolute path to input folder which contains\n" +
kkonganti@0 73 "FASTQ files sequenced using the --input option.\n" +
kkonganti@0 74 "Ex: --input (Illumina or Generic short reads in FASTQ format)")
kkonganti@0 75 }
kkonganti@0 76
kkonganti@0 77 /*
kkonganti@0 78 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kkonganti@0 79 RUN THE CRONOLOGY WORKFLOW
kkonganti@0 80 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kkonganti@0 81 */
kkonganti@0 82
kkonganti@0 83 workflow CRONOLOGY {
kkonganti@0 84 main:
kkonganti@0 85 ch_mqc_custom_tbl = Channel.empty()
kkonganti@0 86 ch_dummy = Channel.fromPath("${params.dummyfile}")
kkonganti@0 87 ch_dummy2 = Channel.fromPath("${params.dummyfile2}")
kkonganti@0 88
kkonganti@0 89 log.info summaryOfParams()
kkonganti@0 90
kkonganti@0 91 PROCESS_FASTQ()
kkonganti@0 92
kkonganti@0 93 PROCESS_FASTQ.out.versions
kkonganti@0 94 .set { software_versions }
kkonganti@0 95
kkonganti@0 96 PROCESS_FASTQ.out.processed_reads
kkonganti@0 97 .map { meta, fastq ->
kkonganti@0 98 meta.sequence_sketch = (params.mash_sketch ?: null)
kkonganti@0 99 [meta, fastq]
kkonganti@0 100 }
kkonganti@0 101 .set { ch_processed_reads }
kkonganti@0 102
kkonganti@0 103 DOWNLOAD_PUBMLST_SCHEME( params.dpubmlstpy_org ?: null )
kkonganti@0 104
kkonganti@0 105 DOWNLOAD_REF_GENOME(
kkonganti@0 106 (params.ref_acc ? ['id': params.ref_acc] : null)
kkonganti@0 107 )
kkonganti@0 108
kkonganti@0 109 FASTP( ch_processed_reads )
kkonganti@0 110
kkonganti@0 111 FASTP.out.passed_reads
kkonganti@0 112 .set { ch_processed_reads }
kkonganti@0 113
kkonganti@0 114 FASTP.out.json
kkonganti@0 115 .map { meta, json -> [ json ] }
kkonganti@0 116 .collect()
kkonganti@0 117 .set { ch_multiqc }
kkonganti@0 118
kkonganti@0 119 MASH_SCREEN( ch_processed_reads )
kkonganti@0 120
kkonganti@0 121 TOP_UNIQUE_SEROVARS( MASH_SCREEN.out.screened )
kkonganti@0 122
kkonganti@0 123 TOP_UNIQUE_SEROVARS.out.tsv
kkonganti@0 124 .map { meta, tsv -> tsv }
kkonganti@0 125 .collectFile(
kkonganti@0 126 name: 'iTOL_metadata_w_dups.txt',
kkonganti@0 127 keepHeader: true,
kkonganti@0 128 skip: 4,
kkonganti@0 129 sort: true
kkonganti@0 130 )
kkonganti@0 131 .map { file ->
kkonganti@0 132 def meta = [:]
kkonganti@0 133 meta.id = 'Unique iTOL Metadata'
kkonganti@0 134 meta.skip_header = 4
kkonganti@0 135 [meta, file]
kkonganti@0 136 }
kkonganti@0 137 .concat(
kkonganti@0 138 TOP_UNIQUE_SEROVARS.out.popup
kkonganti@0 139 .map { meta, popup -> popup }
kkonganti@0 140 .collectFile(
kkonganti@0 141 name: 'iTOL_2_NCBI_Pathogens_w_dups.txt',
kkonganti@0 142 keepHeader: true,
kkonganti@0 143 skip: 3,
kkonganti@0 144 sort: true
kkonganti@0 145 )
kkonganti@0 146 .map { file ->
kkonganti@0 147 def meta = [:]
kkonganti@0 148 meta.id = 'Unique iTOL Popup'
kkonganti@0 149 meta.skip_header = 3
kkonganti@0 150 [meta, file]
kkonganti@0 151 }
kkonganti@0 152 )
kkonganti@0 153 .set { ch_uniq }
kkonganti@0 154
kkonganti@0 155 TOP_UNIQUE_SEROVARS.out.accessions
kkonganti@0 156 .map { meta, acc -> acc }
kkonganti@0 157 .splitText()
kkonganti@0 158 .collect()
kkonganti@0 159 .flatten()
kkonganti@0 160 .unique()
kkonganti@0 161 .collectFile(name: 'tree_genomes.txt')
kkonganti@0 162 .map { genomes -> [ [id: 'hitsTree'], genomes ]}
kkonganti@0 163 .set { ch_genomes_fofn }
kkonganti@0 164
kkonganti@0 165 CAT_UNIQUE( ch_uniq )
kkonganti@0 166
kkonganti@0 167 if (params.fq_single_end) {
kkonganti@0 168 SPADES_ASSEMBLE(
kkonganti@0 169 ch_processed_reads
kkonganti@0 170 .combine(ch_dummy)
kkonganti@0 171 .combine(ch_dummy2)
kkonganti@0 172 )
kkonganti@0 173
kkonganti@0 174 SPADES_ASSEMBLE.out.assembly
kkonganti@0 175 .set{ ch_assembly }
kkonganti@0 176
kkonganti@0 177 software_versions
kkonganti@0 178 .mix( SPADES_ASSEMBLE.out.versions.ifEmpty(null) )
kkonganti@0 179 .set { software_versions }
kkonganti@0 180 } else {
kkonganti@0 181 SHOVILL( ch_processed_reads )
kkonganti@0 182
kkonganti@0 183 SHOVILL.out.contigs
kkonganti@0 184 .set { ch_assembly }
kkonganti@0 185
kkonganti@0 186 software_versions
kkonganti@0 187 .mix( SHOVILL.out.versions.ifEmpty(null) )
kkonganti@0 188 .set { software_versions }
kkonganti@0 189 }
kkonganti@0 190
kkonganti@0 191 if (params.polypolish_run) {
kkonganti@0 192 BWA_IDX_MEM(
kkonganti@0 193 ch_assembly
kkonganti@0 194 .join( ch_processed_reads )
kkonganti@0 195 )
kkonganti@0 196
kkonganti@0 197 POLYPOLISH(
kkonganti@0 198 ch_assembly
kkonganti@0 199 .join( BWA_IDX_MEM.out.aligned_sam )
kkonganti@0 200 )
kkonganti@0 201
kkonganti@0 202 POLYPOLISH.out.polished
kkonganti@0 203 .set { ch_assembly }
kkonganti@0 204
kkonganti@0 205 software_versions
kkonganti@0 206 .mix(POLYPOLISH.out.versions)
kkonganti@0 207 }
kkonganti@0 208
kkonganti@0 209 ch_assembly
kkonganti@0 210 .combine( DOWNLOAD_REF_GENOME.out.fasta )
kkonganti@0 211 .combine( DOWNLOAD_REF_GENOME.out.gff )
kkonganti@0 212 .multiMap { meta, consensus, fasta, gff ->
kkonganti@0 213 sample_fa: consensus
kkonganti@0 214 polished: [meta, consensus]
kkonganti@0 215 ref_fasta: [meta, fasta]
kkonganti@0 216 ref_gff: [meta, gff]
kkonganti@0 217 }
kkonganti@0 218 .set { ch_quast }
kkonganti@0 219
kkonganti@0 220 MASHTREE(
kkonganti@0 221 ch_genomes_fofn,
kkonganti@0 222 DOWNLOAD_REF_GENOME.out.fasta
kkonganti@0 223 .concat( ch_quast.sample_fa )
kkonganti@0 224 .collect()
kkonganti@0 225 )
kkonganti@0 226
kkonganti@0 227 PRODKA(
kkonganti@0 228 ch_quast.ref_fasta,
kkonganti@0 229 ch_quast.polished
kkonganti@0 230 )
kkonganti@0 231
kkonganti@0 232 RMLST_POST( ch_assembly )
kkonganti@0 233
kkonganti@0 234 MLST (
kkonganti@0 235 ch_assembly
kkonganti@0 236 .combine( DOWNLOAD_PUBMLST_SCHEME.out.pubmlst_dir )
kkonganti@0 237 )
kkonganti@0 238
kkonganti@0 239 QUAST(
kkonganti@0 240 ch_quast.polished,
kkonganti@0 241 ch_quast.ref_fasta,
kkonganti@0 242 ch_quast.ref_gff
kkonganti@0 243 )
kkonganti@0 244
kkonganti@0 245 if (params.pirate_run) {
kkonganti@0 246 PIRATE(
kkonganti@0 247 PRODKA.out.prokka_gff
kkonganti@0 248 .map { meta, gff ->
kkonganti@0 249 tuple( [id: 'Predicted Genes'], gff )
kkonganti@0 250 }
kkonganti@0 251 .groupTuple(by: [0])
kkonganti@0 252 )
kkonganti@0 253
kkonganti@0 254 software_versions
kkonganti@0 255 .mix(PIRATE.out.versions)
kkonganti@0 256 }
kkonganti@0 257
kkonganti@0 258 RMLST_POST.out.tsv
kkonganti@0 259 .map { meta, tsv -> [ 'rmlst', tsv] }
kkonganti@0 260 .groupTuple(by: [0])
kkonganti@0 261 .map { it -> tuple ( it[0], it[1].flatten() ) }
kkonganti@0 262 .set { ch_mqc_rmlst_tbl }
kkonganti@0 263
kkonganti@0 264 MLST.out.tsv
kkonganti@0 265 .map { meta, tsv -> [ 'mlst', tsv] }
kkonganti@0 266 .groupTuple(by: [0])
kkonganti@0 267 .map { it -> tuple ( it[0], it[1].flatten() ) }
kkonganti@0 268 .set { ch_mqc_custom_tbl }
kkonganti@0 269
kkonganti@0 270 ABRICATE_RUN ( ch_assembly, abricate_dbs )
kkonganti@0 271
kkonganti@0 272 ABRICATE_RUN.out.abricated
kkonganti@0 273 .map { meta, abres -> [ abricate_dbs, abres ] }
kkonganti@0 274 .groupTuple(by: [0])
kkonganti@0 275 .map { it -> tuple ( it[0], it[1].flatten() ) }
kkonganti@0 276 .set { ch_abricated }
kkonganti@0 277
kkonganti@0 278 ABRICATE_SUMMARY ( ch_abricated )
kkonganti@0 279
kkonganti@0 280 ch_mqc_custom_tbl
kkonganti@0 281 .concat (
kkonganti@0 282 ch_mqc_rmlst_tbl,
kkonganti@0 283 ABRICATE_SUMMARY.out.ncbiamrplus.map { it -> tuple ( it[0], it[1] )},
kkonganti@0 284 ABRICATE_SUMMARY.out.resfinder.map { it -> tuple ( it[0], it[1] )},
kkonganti@0 285 ABRICATE_SUMMARY.out.megares.map { it -> tuple ( it[0], it[1] )},
kkonganti@0 286 ABRICATE_SUMMARY.out.argannot.map { it -> tuple ( it[0], it[1] )},
kkonganti@0 287 )
kkonganti@0 288 .groupTuple(by: [0])
kkonganti@0 289 .map { it -> [ it[0], it[1].flatten() ]}
kkonganti@0 290 .set { ch_mqc_custom_tbl }
kkonganti@0 291
kkonganti@0 292 TABLE_SUMMARY ( ch_mqc_custom_tbl )
kkonganti@0 293
kkonganti@0 294 DUMP_SOFTWARE_VERSIONS (
kkonganti@0 295 software_versions
kkonganti@0 296 .mix(
kkonganti@0 297 DOWNLOAD_PUBMLST_SCHEME.out.versions,
kkonganti@0 298 DOWNLOAD_REF_GENOME.out.versions,
kkonganti@0 299 FASTP.out.versions,
kkonganti@0 300 MASH_SCREEN.out.versions,
kkonganti@0 301 TOP_UNIQUE_SEROVARS.out.versions,
kkonganti@0 302 CAT_UNIQUE.out.versions,
kkonganti@0 303 MASHTREE.out.versions,
kkonganti@0 304 POLYPOLISH.out.versions,
kkonganti@0 305 QUAST.out.versions,
kkonganti@0 306 PRODKA.out.versions,
kkonganti@0 307 RMLST_POST.out.versions,
kkonganti@0 308 MLST.out.versions,
kkonganti@0 309 ABRICATE_RUN.out.versions,
kkonganti@0 310 ABRICATE_SUMMARY.out.versions,
kkonganti@0 311 TABLE_SUMMARY.out.versions
kkonganti@0 312 )
kkonganti@0 313 .unique()
kkonganti@0 314 .collectFile(name: 'collected_versions.yml')
kkonganti@0 315 )
kkonganti@0 316
kkonganti@0 317 DUMP_SOFTWARE_VERSIONS.out.mqc_yml
kkonganti@0 318 .concat (
kkonganti@0 319 ch_multiqc,
kkonganti@0 320 TABLE_SUMMARY.out.mqc_yml,
kkonganti@0 321 PRODKA.out.prokka_txt.map { meta, txt -> txt },
kkonganti@0 322 QUAST.out.results.map { meta, res -> res }
kkonganti@0 323 )
kkonganti@0 324 .collect()
kkonganti@0 325 .set { ch_multiqc }
kkonganti@0 326
kkonganti@0 327 MULTIQC( ch_multiqc )
kkonganti@0 328 }
kkonganti@0 329
kkonganti@0 330 /*
kkonganti@0 331 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kkonganti@0 332 ON COMPLETE, SHOW GORY DETAILS OF ALL PARAMS WHICH WILL BE HELPFUL TO DEBUG
kkonganti@0 333 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kkonganti@0 334 */
kkonganti@0 335
kkonganti@0 336 workflow.onComplete {
kkonganti@0 337 if (workflow.success) {
kkonganti@0 338 sendMail()
kkonganti@0 339 }
kkonganti@0 340 }
kkonganti@0 341
kkonganti@0 342 workflow.onError {
kkonganti@0 343 sendMail()
kkonganti@0 344 }
kkonganti@0 345
kkonganti@0 346 /*
kkonganti@0 347 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kkonganti@0 348 HELP TEXT METHODS FOR CRONOLOGY WORKFLOW
kkonganti@0 349 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kkonganti@0 350 */
kkonganti@0 351
kkonganti@0 352 def help() {
kkonganti@0 353
kkonganti@0 354 Map helptext = [:]
kkonganti@0 355 Map nH = [:]
kkonganti@0 356 Map fastpAdapterHelp = [:]
kkonganti@0 357 def uHelp = (params.help.getClass().toString() =~ /String/ ? params.help.tokenize(',').join(' ') : '')
kkonganti@0 358
kkonganti@0 359 Map defaultHelp = [
kkonganti@0 360 '--help dpubmlstpy' : 'Show dl_pubmlst_profiles_and_schemes.py CLI options CLI options',
kkonganti@0 361 '--help fastp' : 'Show fastp CLI options',
kkonganti@0 362 '--help spades' : 'Show mash `screen` CLI options',
kkonganti@0 363 '--help shovill' : 'Show shovill CLI options',
kkonganti@0 364 '--help polypolish' : 'Show polypolish CLI options',
kkonganti@0 365 '--help quast' : 'Show quast.py CLI options',
kkonganti@0 366 '--help prodigal' : 'Show prodigal CLI options',
kkonganti@0 367 '--help prokka' : 'Show prokka CLI options',
kkonganti@0 368 '--help pirate' : 'Show priate CLI options',
kkonganti@0 369 '--help mlst' : 'Show mlst CLI options',
kkonganti@0 370 '--help mash' : 'Show mash `screen` CLI options',
kkonganti@0 371 '--help tree' : 'Show mashtree CLI options',
kkonganti@0 372 '--help abricate' : 'Show abricate CLI options\n'
kkonganti@0 373 ]
kkonganti@0 374
kkonganti@0 375 fastpAdapterHelp['--fastp_use_custom_adapaters'] = "Use custom adapter FASTA with fastp on top of " +
kkonganti@0 376 "built-in adapter sequence auto-detection. Enabling this option will attempt to find and remove " +
kkonganti@0 377 "all possible Illumina adapter and primer sequences but will make the workflow run slow. " +
kkonganti@0 378 "Default: ${params.fastp_use_custom_adapters}"
kkonganti@0 379
kkonganti@0 380 if (params.help.getClass().toString() =~ /Boolean/ || uHelp.size() == 0) {
kkonganti@0 381 println conciseHelp('fastp,polypolish')
kkonganti@0 382 helptext.putAll(defaultHelp)
kkonganti@0 383 } else {
kkonganti@0 384 params.help.tokenize(',').each { h ->
kkonganti@0 385 if (defaultHelp.keySet().findAll{ it =~ /(?i)\b${h}\b/ }.size() == 0) {
kkonganti@0 386 println conciseHelp('fastp,polypolish')
kkonganti@0 387 stopNow("Tool [ ${h} ] is not a part of ${params.pipeline} pipeline.")
kkonganti@0 388 }
kkonganti@0 389 }
kkonganti@0 390
kkonganti@0 391 helptext.putAll(
kkonganti@0 392 fastqEntryPointHelp() +
kkonganti@0 393 (uHelp =~ /(?i)\bdpubmlstpy/ ? dpubmlstpyHelp(params).text : nH) +
kkonganti@0 394 (uHelp =~ /(?i)\bfastp/ ? fastpHelp(params).text + fastpAdapterHelp : nH) +
kkonganti@0 395 (uHelp =~ /(?i)\bmash/ ? mashscreenHelp(params).text : nH) +
kkonganti@0 396 (uHelp =~ /(?i)\btuspy/ ? tuspyHelp(params).text : nH) +
kkonganti@0 397 (uHelp =~ /(?i)\bspades/ ? spadesHelp(params).text : nH) +
kkonganti@0 398 (uHelp =~ /(?i)\bshovill/ ? shovillHelp(params).text : nH) +
kkonganti@0 399 (uHelp =~ /(?i)\bpolypolish/ ? polypolishHelp(params).text : nH) +
kkonganti@0 400 (uHelp =~ /(?i)\bquast/ ? quastHelp(params).text : nH) +
kkonganti@0 401 (uHelp =~ /(?i)\bprodigal/ ? prodigalHelp(params).text : nH) +
kkonganti@0 402 (uHelp =~ /(?i)\bprokka/ ? prokkaHelp(params).text : nH) +
kkonganti@0 403 (uHelp =~ /(?i)\bpirate/ ? pirateHelp(params).text : nH) +
kkonganti@0 404 (uHelp =~ /(?i)\bmlst/ ? mlstHelp(params).text : nH) +
kkonganti@0 405 (uHelp =~ /(?i)\btree/ ? mashtreeHelp(params).text : nH) +
kkonganti@0 406 (uHelp =~ /(?i)\babricate/ ? abricateHelp(params).text : nH) +
kkonganti@0 407 wrapUpHelp()
kkonganti@0 408 )
kkonganti@0 409 }
kkonganti@0 410
kkonganti@0 411 return addPadding(helptext)
kkonganti@0 412 }