From af898e4f9185ce94260fa8745d269d8e16a142d3 Mon Sep 17 00:00:00 2001 From: Kyle O'Connell Date: Fri, 15 Mar 2024 10:15:15 -0400 Subject: [PATCH] fixed channel mixup and removed remnants of utility function --- modules/local/liftoff_annotation/main.nf | 36 ------------------- modules/local/liftoff_cli_annotation/main.nf | 2 +- modules/local/repeatmasker_annotation/main.nf | 2 +- modules/local/vadr_annotation/main.nf | 2 +- modules/nf-core/bakta/bakta/main.nf | 3 +- modules/nf-core/bakta/baktadbdownload/main.nf | 3 +- workflows/tostadas.nf | 9 +++-- 7 files changed, 9 insertions(+), 48 deletions(-) delete mode 100644 modules/local/liftoff_annotation/main.nf diff --git a/modules/local/liftoff_annotation/main.nf b/modules/local/liftoff_annotation/main.nf deleted file mode 100644 index 3916c7c8..00000000 --- a/modules/local/liftoff_annotation/main.nf +++ /dev/null @@ -1,36 +0,0 @@ -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RUN LIFTOFF ANNOTATION -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ -process LIFTOFF { - - // label 'main' - - conda (params.enable_conda ? params.env_yml : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'staphb/tostadas:latest' : 'staphb/tostadas:latest' }" - - //publishDir "$params.output_dir", mode: 'copy', overwrite: params.overwrite_output - - input: - path meta_path - path fasta_path - path ref_fasta_path - path ref_gff_path - - script: - """ - liftoff_submission.py --fasta_path $fasta_path --meta_path $meta_path --ref_fasta_path $ref_fasta_path \ - --ref_gff_path $ref_gff_path --parallel_processes $params.lift_parallel_processes --final_liftoff_output_dir $params.final_liftoff_output_dir \ - --delete_temp_files $params.lift_delete_temp_files --minimap_path $params.lift_minimap_path --feature_database_name $params.lift_feature_database_name \ - --unmapped_features_file_name $params.lift_unmapped_features_file_name --distance_scaling_factor $params.lift_distance_scaling_factor \ - --copy_threshold $params.lift_copy_threshold --coverage_threshold $params.lift_coverage_threshold --child_feature_align_threshold $params.lift_child_feature_align_threshold \ - --copies $params.lift_copies --flank $params.lift_flank --mismatch $params.lift_mismatch --gap_open $params.lift_gap_open --gap_extend $params.lift_gap_extend - """ - - output: - path "$params.final_liftoff_output_dir/*/gff/*.gff", emit: gff - path "$params.final_liftoff_output_dir/*/errors/*.txt", emit: errors - path "$params.final_liftoff_output_dir/*/tbl/*.tbl", emit: tbl -} diff --git a/modules/local/liftoff_cli_annotation/main.nf b/modules/local/liftoff_cli_annotation/main.nf index 3a1919a8..df9a8e56 100644 --- a/modules/local/liftoff_cli_annotation/main.nf +++ b/modules/local/liftoff_cli_annotation/main.nf @@ -20,7 +20,7 @@ process LIFTOFF_CLI { } input: - tuple val(meta), path(fasta) + tuple val(meta), path(fasta), path(fastq1), path(fastq2) path ref_fasta_path path ref_gff_path diff --git a/modules/local/repeatmasker_annotation/main.nf b/modules/local/repeatmasker_annotation/main.nf index 34522ca8..1f24e2d4 100644 --- a/modules/local/repeatmasker_annotation/main.nf +++ b/modules/local/repeatmasker_annotation/main.nf @@ -12,7 +12,7 @@ process REPEATMASKER { 'quay.io/biocontainers/repeatmasker:4.1.5--pl5321hdfd78af_0'}" input: - tuple val(meta), path(fasta_path) + tuple val(meta), path(fasta_path), path(fast1), path(fastq2) path repeat_library script: diff --git a/modules/local/vadr_annotation/main.nf b/modules/local/vadr_annotation/main.nf index b180f319..b9a35fa9 100644 --- a/modules/local/vadr_annotation/main.nf +++ b/modules/local/vadr_annotation/main.nf @@ -12,7 +12,7 @@ process VADR { 'staphb/vadr:latest' : 'staphb/vadr:latest' }" input: - tuple val(meta), path(fasta_path) + tuple val(meta), path(fasta_path), path(fastq1), path(fastq2) path vadr_models_dir script: diff --git a/modules/nf-core/bakta/bakta/main.nf b/modules/nf-core/bakta/bakta/main.nf index af979457..0e0227a9 100644 --- a/modules/nf-core/bakta/bakta/main.nf +++ b/modules/nf-core/bakta/bakta/main.nf @@ -18,9 +18,8 @@ process BAKTA { publishDir "$params.output_dir/$params.bakta_output_dir", mode: 'copy', overwrite: params.overwrite_output input: - val signal path db_path - tuple val(meta), path(fasta_path) + tuple val(meta), path(fasta_path), path(fastq1), path(fastq2) script: def args = task.ext.args ?: '' diff --git a/modules/nf-core/bakta/baktadbdownload/main.nf b/modules/nf-core/bakta/baktadbdownload/main.nf index f7517a77..f9aa58ae 100644 --- a/modules/nf-core/bakta/baktadbdownload/main.nf +++ b/modules/nf-core/bakta/baktadbdownload/main.nf @@ -6,8 +6,7 @@ process BAKTADBDOWNLOAD { 'quay.io/biocontainers/bakta:1.8.2--pyhdfd78af_0' }" input: - val signal - + output: path "bakta_db/*" , emit: db diff --git a/workflows/tostadas.nf b/workflows/tostadas.nf index 495aafdc..b6c16316 100644 --- a/workflows/tostadas.nf +++ b/workflows/tostadas.nf @@ -79,6 +79,7 @@ workflow TOSTADAS { // Create initial submission channel submission_ch = metadata_ch.join(reads_ch) + // check if the user wants to skip annotation or not if ( params.annotation ) { if ( params.virus && !params.bacteria ) { @@ -87,7 +88,7 @@ workflow TOSTADAS { if ( params.repeatmasker_liftoff ) { // run repeatmasker annotation on files REPEATMASKER_LIFTOFF ( - fasta_ch + reads_ch ) repeatmasker_gff_ch = REPEATMASKER_LIFTOFF.out.gff.collect().flatten() .map { @@ -97,14 +98,13 @@ workflow TOSTADAS { } // set up submission channels - // submission_ch = metadata_ch.join(fasta_ch) submission_ch = submission_ch.join(repeatmasker_gff_ch) // meta.id, fasta, fastq1, fastq2, gff } // run vadr processes if ( params.vadr ) { RUN_VADR ( - fasta_ch + reads_ch ) vadr_gff_ch = RUN_VADR.out.gff .collect() @@ -121,7 +121,7 @@ workflow TOSTADAS { // run bakta annotation process if ( params.bakta == true ) { RUN_BAKTA( - fasta_ch + reads_ch ) // set up submission channels bakta_gff_ch = RUN_BAKTA.out.gff3 @@ -130,7 +130,6 @@ workflow TOSTADAS { meta = [id:it.getSimpleName()] [ meta, it ] } - // submission_ch = metadata_ch.join(fasta_ch) submission_ch = submission_ch.join(bakta_gff_ch) // meta.id, fasta, fastq1, fastq2, gff } }