Skip to content

Commit acf212a

Browse files
committed
formatting viralgenie.nf
1 parent ff5552e commit acf212a

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

workflows/viralgenie.nf

+7-12
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ workflow VIRALGENIE {
5353

5454
take:
5555
ch_samplesheet // channel: samplesheet read in from --input
56+
5657
main:
5758

5859
/*
@@ -71,7 +72,7 @@ workflow VIRALGENIE {
7172
ch_spades_hmm = createFileChannel(params.spades_hmm)
7273
ch_constraint_meta = createFileChannel(params.mapping_constraints)
7374

74-
// Databases, we really don't want to stage uncessary databases
75+
// Databases, we really don't want to stage unnecessary databases
7576
ch_ref_pool = (!params.skip_assembly && !params.skip_polishing) || (!params.skip_consensus_qc && !params.skip_blast_qc) ? createChannel( params.reference_pool, "reference", true ) : Channel.empty()
7677
ch_kraken2_db = (!params.skip_assembly && !params.skip_polishing && !params.skip_precluster) || !params.skip_read_classification ? createChannel( params.kraken2_db, "kraken2", ('kraken2' in read_classifiers || 'kraken2' in contig_classifiers) ) : Channel.empty()
7778
ch_kaiju_db = (!params.skip_assembly && !params.skip_polishing && !params.skip_precluster) || !params.skip_read_classification ? createChannel( params.kaiju_db, "kaiju", ('kaiju' in read_classifiers || 'kaiju' in contig_classifiers) ) : Channel.empty()
@@ -104,7 +105,7 @@ workflow VIRALGENIE {
104105
ch_db = Channel.empty()
105106
if ((!params.skip_assembly && !params.skip_polishing) || !params.skip_consensus_qc || !params.skip_read_classification || (!params.skip_preprocessing && !params.skip_hostremoval)){
106107

107-
ch_db_raw = ch_db.mix(ch_ref_pool,ch_kraken2_db, ch_kaiju_db, ch_checkv_db, ch_bracken_db, ch_k2_host, ch_annotation_db)
108+
ch_db_raw = ch_db.mix(ch_ref_pool,ch_kraken2_db, ch_kaiju_db, ch_checkv_db, ch_bracken_db, ch_k2_host, ch_annotation_db, ch_prokka_db)
108109
UNPACK_DB (ch_db_raw)
109110

110111
UNPACK_DB.out.db
@@ -127,7 +128,7 @@ workflow VIRALGENIE {
127128
return [ unpacked ]
128129
}
129130
.set{ch_db}
130-
ch_versions = ch_versions.mix(UNPACK_DB.out.versions)
131+
ch_versions = ch_versions.mix(UNPACK_DB.out.versions)
131132

132133
// transfer to value channels so processes are not just done once
133134
// '.collect()' is necessary to transform to list so cartesian products are made downstream
@@ -185,7 +186,6 @@ workflow VIRALGENIE {
185186
ch_versions = ch_versions.mix(PREPROCESSING_ILLUMINA.out.versions)
186187
}
187188

188-
189189
// Determining metagenomic diversity
190190
if (!params.skip_read_classification) {
191191
FASTQ_KRAKEN_KAIJU(
@@ -260,7 +260,6 @@ workflow VIRALGENIE {
260260
)
261261
ch_versions = ch_versions.mix(ALIGN_COLLAPSE_CONTIGS.out.versions)
262262

263-
264263
SINGLETON_FILTERING (
265264
ch_centroids_members.singletons,
266265
params.min_contig_size,
@@ -425,15 +424,14 @@ workflow VIRALGENIE {
425424
ch_checkv_db,
426425
ch_blast_refdb,
427426
ch_annotation_db,
428-
ch_prokka_db,
427+
ch_prokka_db
429428
)
430429
ch_versions = ch_versions.mix(CONSENSUS_QC.out.versions)
431430
ch_multiqc_files = ch_multiqc_files.mix(CONSENSUS_QC.out.mqc.collect{it[1]}.ifEmpty([]))
432431
ch_checkv_summary = CONSENSUS_QC.out.checkv.collect{it[1]}.ifEmpty([])
433432
ch_quast_summary = CONSENSUS_QC.out.quast.collect{it[1]}.ifEmpty([])
434433
ch_blast_summary = CONSENSUS_QC.out.blast.collect{it[1]}.ifEmpty([])
435434
ch_annotation_summary = CONSENSUS_QC.out.annotation.collect{it[1]}.ifEmpty([])
436-
437435
}
438436

439437
//
@@ -456,7 +454,7 @@ workflow VIRALGENIE {
456454
ch_multiqc_custom_methods_description = params.multiqc_methods_description ?
457455
file(params.multiqc_methods_description, checkIfExists: true) :
458456
file("$projectDir/assets/methods_description_template.yml", checkIfExists: true)
459-
ch_methods_description = Channel.value(
457+
ch_methods_description = Channel.value(
460458
methodsDescriptionText(ch_multiqc_custom_methods_description))
461459

462460
//
@@ -497,12 +495,9 @@ workflow VIRALGENIE {
497495

498496
emit:
499497
multiqc_report = CUSTOM_MULTIQC.out.report.toList() // channel: /path/to/multiqc_report.html
500-
versions = ch_versions // channel: [ path(versions.yml) ]
501-
498+
versions = ch_versions // channel: [ path(versions.yml) ]
502499
}
503500

504-
505-
506501
/*
507502
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
508503
THE END

0 commit comments

Comments
 (0)