Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions subworkflows/local/call.nf
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ workflow CALL {
.set { ch_collected_faa } // Set the resulting list to ch_collected_faa

// Collect all individual fasta to pass to quast
Channel.empty()
channel.empty()
.mix( ch_called_genes )
.collect()
.set { ch_collected_fna }

// Collect all individual fasta to pass to quast
Channel.empty()
channel.empty()
.mix( ch_filtered_fasta, ch_gene_gff )
.collect()
.set { ch_collected_fasta }
Expand Down
8 changes: 4 additions & 4 deletions subworkflows/local/collect_rna.nf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ workflow COLLECT_RNA {
// If we didn't run call
if (!call) {
if (params.rrnas) {
Channel.fromPath("${params.rrnas}/*.tsv", checkIfExists: true)
channel.fromPath("${params.rrnas}/*.tsv", checkIfExists: true)
.ifEmpty { exit 1, "Cannot find individual rRNA files generated with barrnap at: ${params.rrnas}\nNB: Path needs to follow pattern: path/to/directory" }
.collect()
.set { ch_collected_rRNAs }
Expand All @@ -43,7 +43,7 @@ workflow COLLECT_RNA {
log.warn("No rRNA files provided, skipping rRNA steps.")
}
if (params.trnas) {
Channel.fromPath("${params.trnas}/*.tsv", checkIfExists: true)
channel.fromPath("${params.trnas}/*.tsv", checkIfExists: true)
.ifEmpty { exit 1, "Cannot find individual tRNA files generated with tRNAscan-SE. Cannot find any files at: ${params.trnas}\nNB: Path needs to follow pattern: path/to/directory" }
.collect()
.set { ch_collected_tRNAs }
Expand All @@ -57,14 +57,14 @@ workflow COLLECT_RNA {
TRNA_SCAN( ch_fasta )
ch_trna_scan = TRNA_SCAN.out.trna_scan_out
// Collect all input_fasta formatted tRNA files
Channel.empty()
channel.empty()
.mix( ch_trna_scan )
.collect()
.set { ch_collected_tRNAs }
// Run barrnap on each fasta to identify rRNAs
RRNA_SCAN( ch_fasta )
ch_rrna_scan = RRNA_SCAN.out.rrna_scan_out
Channel.empty()
channel.empty()
.mix( ch_rrna_scan )
.collect()
.set { ch_collected_rRNAs }
Expand Down
46 changes: 23 additions & 23 deletions subworkflows/local/db_search.nf
Original file line number Diff line number Diff line change
Expand Up @@ -402,29 +402,29 @@ workflow DB_CHANNEL_SETUP {
main:

index_mmseqs = false
ch_kegg_db = Channel.empty()
ch_kofam_db = Channel.empty()
ch_dbcan_db = Channel.empty()
ch_camper_hmm_db = Channel.empty()
ch_camper_mmseqs_db = Channel.empty()
ch_camper_mmseqs_list = Channel.empty()
ch_merops_db = Channel.empty()
ch_pfam_mmseqs_db = Channel.empty()
ch_heme_db = Channel.empty()
ch_sulfur_db = Channel.empty()
ch_uniref_db = Channel.empty()
ch_metals_db = Channel.empty()
ch_antismash_db = Channel.empty()
ch_card_db = Channel.empty()
ch_tcdb_db = Channel.empty()
ch_dram_db = Channel.empty()
ch_methyl_db = Channel.empty()
ch_fegenie_db = Channel.empty()
ch_canthyd_hmm_db = Channel.empty()
ch_canthyd_mmseqs_db = Channel.empty()
ch_canthyd_mmseqs_list = Channel.empty()
ch_vogdb_db = Channel.empty()
ch_viral_db = Channel.empty()
ch_kegg_db = channel.empty()
ch_kofam_db = channel.empty()
ch_dbcan_db = channel.empty()
ch_camper_hmm_db = channel.empty()
ch_camper_mmseqs_db = channel.empty()
ch_camper_mmseqs_list = channel.empty()
ch_merops_db = channel.empty()
ch_pfam_mmseqs_db = channel.empty()
ch_heme_db = channel.empty()
ch_sulfur_db = channel.empty()
ch_uniref_db = channel.empty()
ch_metals_db = channel.empty()
ch_antismash_db = channel.empty()
ch_card_db = channel.empty()
ch_tcdb_db = channel.empty()
ch_dram_db = channel.empty()
ch_methyl_db = channel.empty()
ch_fegenie_db = channel.empty()
ch_canthyd_hmm_db = channel.empty()
ch_canthyd_mmseqs_db = channel.empty()
ch_canthyd_mmseqs_list = channel.empty()
ch_vogdb_db = channel.empty()
ch_viral_db = channel.empty()

if (use_kegg) {
ch_kegg_db = file(params.kegg_db).exists() ? file(params.kegg_db) : error("Error: If using --annotate, you must supply prebuilt databases. KEGG database file not found at ${params.kegg_db}")
Expand Down
4 changes: 2 additions & 2 deletions subworkflows/local/merge.nf
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ workflow MERGE {
}

// Create a channel with the paths to the .tsv files
Channel
channel
.from(tsv_files.collect { annotations_dir.toString() + '/' + it })
.set { ch_merge_annotations }
Channel.empty()
channel.empty()
.mix( ch_merge_annotations )
.collect()
.set { ch_merge_annotations_collected }
Expand Down
4 changes: 2 additions & 2 deletions subworkflows/local/qc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ workflow QC {

if( params.generate_gff || params.generate_gbk ){
if (!call) {
ch_called_genes = Channel
ch_called_genes = channel
.fromPath(file(params.input_genes) / params.genes_fna_fmt, checkIfExists: true)
.ifEmpty { exit 1, "If you specify --generate_gff or --generate_gbk without --call, you must provide a fasta file of called genes using --input_genes and --genes_fna_fmt,. Cannot find any called gene fasta files matching: ${params.input_genes} and ${params.genes_fna_fmt}\nNB: Path needs to follow pattern: path/to/directory/" }
.map {
input_fastaName = it.getBaseName()
tuple(input_fastaName, it)
}
// Collect all individual fasta to pass to quast
Channel.empty()
channel.empty()
.mix( ch_called_genes )
.collect()
.set { ch_collected_fna }
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/utils_nfcore_dram_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ workflow PIPELINE_INITIALISATION {

main:

ch_versions = Channel.empty()
ch_versions = channel.empty()

//
// Print version and exit if required and dump pipeline parameters to JSON file
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/nf-core/utils_nfcore_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def workflowVersionToYAML() {
// Get channel of software versions used in pipeline in YAML format
//
def softwareVersionsToYAML(ch_versions) {
return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(Channel.of(workflowVersionToYAML()))
return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(channel.of(workflowVersionToYAML()))
}

//
Expand Down
24 changes: 12 additions & 12 deletions workflows/dram.nf
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ workflow DRAM {
// Setup
//

ch_versions = Channel.empty()
ch_multiqc_files = Channel.empty()
ch_fasta = Channel.empty()
ch_versions = channel.empty()
ch_multiqc_files = channel.empty()
ch_fasta = channel.empty()

default_sheet = file(params.distill_dummy_sheet)
distill_flag = (params.summarize || params.distill_topic != "" || params.distill_ecosystem != "" || params.distill_custom != "" || params.sum_ecos != "")
Expand All @@ -59,7 +59,7 @@ workflow DRAM {
}

if (params.input_fasta && (params.rename || call)) {
ch_fasta = Channel
ch_fasta = channel
.fromPath(file(params.input_fasta) / params.fasta_fmt, checkIfExists: true)
.ifEmpty { exit 1, "Cannot find any fasta files matching: ${params.input_fasta}\nNB: Path needs to follow pattern: path/to/directory/" }

Expand Down Expand Up @@ -264,7 +264,7 @@ workflow DRAM {
ch_final_annots = ADD_ANNOTATIONS.out.combined_annots_out
}
} else if (params.annotations) {
ch_final_annots = Channel
ch_final_annots = channel
.fromPath(params.annotations, checkIfExists: true)
.ifEmpty { exit 1, "Parameter annotations problem: Cannot find any called gene files matching: ${params.annotations}\nNB: Path needs to follow pattern: path/to/directory/" }
} else {
Expand Down Expand Up @@ -309,24 +309,24 @@ workflow DRAM {
//
// MODULE: MultiQC
//
ch_multiqc_config = Channel.fromPath(
ch_multiqc_config = channel.fromPath(
"$projectDir/assets/multiqc_config.yml", checkIfExists: true)
ch_multiqc_custom_config = params.multiqc_config ?
Channel.fromPath(params.multiqc_config, checkIfExists: true) :
Channel.empty()
channel.fromPath(params.multiqc_config, checkIfExists: true) :
channel.empty()
ch_multiqc_logo = params.multiqc_logo ?
Channel.fromPath(params.multiqc_logo, checkIfExists: true) :
Channel.empty()
channel.fromPath(params.multiqc_logo, checkIfExists: true) :
channel.empty()

summary_params = paramsSummaryMap(
workflow, parameters_schema: "nextflow_schema.json")
ch_workflow_summary = Channel.value(paramsSummaryMultiqc(summary_params))
ch_workflow_summary = channel.value(paramsSummaryMultiqc(summary_params))
ch_multiqc_files = ch_multiqc_files.mix(
ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml'))
ch_multiqc_custom_methods_description = params.multiqc_methods_description ?
file(params.multiqc_methods_description, checkIfExists: true) :
file("$projectDir/assets/methods_description_template.yml", checkIfExists: true)
ch_methods_description = Channel.value(
ch_methods_description = channel.value(
methodsDescriptionText(ch_multiqc_custom_methods_description))

ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions)
Expand Down
Loading