From 74cc47d0928462566b9bef3d153114297f026a73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98ens-ftricomi=E2=80=99?= Date: Thu, 27 Jun 2024 11:18:23 +0100 Subject: [PATCH] fixed busco dataset in a tuple --- pipelines/nextflow/modules/busco/busco_dataset.nf | 4 ++-- .../nextflow/modules/busco/busco_genome_lineage.nf | 6 +++--- .../nextflow/modules/busco/busco_protein_lineage.nf | 4 ++-- pipelines/nextflow/modules/fetch_genome.nf | 4 ++-- pipelines/nextflow/modules/fetch_proteins.nf | 4 ++-- pipelines/nextflow/subworkflows/run_busco.nf | 10 +++++----- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pipelines/nextflow/modules/busco/busco_dataset.nf b/pipelines/nextflow/modules/busco/busco_dataset.nf index 2fa59af..12226c9 100644 --- a/pipelines/nextflow/modules/busco/busco_dataset.nf +++ b/pipelines/nextflow/modules/busco/busco_dataset.nf @@ -25,8 +25,8 @@ process BUSCO_DATASET { tuple val(gca), val(taxon_id), val(dbname) output: - stdout emit: dataset - tuple val(gca), val(dbname) + //stdout emit: dataset + tuple val(gca), val(dbname), stdout script: """ diff --git a/pipelines/nextflow/modules/busco/busco_genome_lineage.nf b/pipelines/nextflow/modules/busco/busco_genome_lineage.nf index 9eec108..7bab2b9 100644 --- a/pipelines/nextflow/modules/busco/busco_genome_lineage.nf +++ b/pipelines/nextflow/modules/busco/busco_genome_lineage.nf @@ -25,11 +25,11 @@ process BUSCO_GENOME_LINEAGE { maxForks 10 input: - val(busco_dataset) - tuple val(gca), val(dbname), path(genome_file) + //val(busco_dataset) + tuple val(gca), val(dbname), path(genome_file), val(busco_dataset) output: - tuple val(gca), val(dbname), path("genome_output/*.txt") + tuple val(gca), val(dbname), path("genome_output/*.txt") script: def buscoDataset = params.busco_dataset ? params.busco_dataset.trim() : busco_dataset.trim() diff --git a/pipelines/nextflow/modules/busco/busco_protein_lineage.nf b/pipelines/nextflow/modules/busco/busco_protein_lineage.nf index 91277bd..a65bed9 100644 --- a/pipelines/nextflow/modules/busco/busco_protein_lineage.nf +++ b/pipelines/nextflow/modules/busco/busco_protein_lineage.nf @@ -23,8 +23,8 @@ process BUSCO_PROTEIN_LINEAGE { maxForks 10 input: - val(busco_dataset) - tuple val(gca), val(dbname), path(translation_file) + //val(busco_dataset) + tuple val(gca), val(dbname), path(translation_file), val(busco_dataset) output: tuple val(gca), val(dbname), path("protein_output/*.txt") diff --git a/pipelines/nextflow/modules/fetch_genome.nf b/pipelines/nextflow/modules/fetch_genome.nf index d91b0e8..99a607f 100644 --- a/pipelines/nextflow/modules/fetch_genome.nf +++ b/pipelines/nextflow/modules/fetch_genome.nf @@ -24,10 +24,10 @@ process FETCH_GENOME { afterScript "sleep $params.files_latency" // Needed because of file system latency maxForks 10 input: - tuple val(gca), val(dbname) + tuple val(gca), val(dbname), val(busco_dataset) output: - tuple val(gca), val(dbname), path("*.fna") + tuple val(gca), val(dbname), path("*.fna"), val(busco_dataset) script: """ diff --git a/pipelines/nextflow/modules/fetch_proteins.nf b/pipelines/nextflow/modules/fetch_proteins.nf index 0477ea3..7b69b59 100644 --- a/pipelines/nextflow/modules/fetch_proteins.nf +++ b/pipelines/nextflow/modules/fetch_proteins.nf @@ -26,10 +26,10 @@ process FETCH_PROTEINS { maxForks 20 input: - tuple val(gca), val(dbname) + tuple val(gca), val(dbname), val(busco_dataset) output: - tuple val(gca), val(dbname), path("*_translations.fa") + tuple val(gca), val(dbname), path("*_translations.fa"),val(busco_dataset) script: scientific_name = getMetaValue(dbname, "species.production_name")[0].meta_value.toString().toLowerCase() diff --git a/pipelines/nextflow/subworkflows/run_busco.nf b/pipelines/nextflow/subworkflows/run_busco.nf index a31a537..f94db08 100644 --- a/pipelines/nextflow/subworkflows/run_busco.nf +++ b/pipelines/nextflow/subworkflows/run_busco.nf @@ -55,12 +55,12 @@ workflow RUN_BUSCO{ def db_meta1=db_meta db_meta1.flatten().view { d -> "GCA: ${d.gca}, Taxon ID: ${d.taxon_id}, Core name: ${d.core}"} - def (dataset, db) = BUSCO_DATASET(db_meta.flatten()) + def (dataset_db) = BUSCO_DATASET(db_meta.flatten()) // Run Busco in genome mode if (busco_mode.contains('genome')) { def output_typeG = "genome" - def genomeData = FETCH_GENOME(db) - def buscoGenomeOutput = BUSCO_GENOME_LINEAGE(dataset, genomeData) + def genomeData = FETCH_GENOME(dataset_db) + def buscoGenomeOutput = BUSCO_GENOME_LINEAGE(genomeData) def buscoGenomeSummaryOutput = BUSCO_GENOME_OUTPUT(output_typeG,buscoGenomeOutput) if (params.copyToFtp) { COPY_GENOME_OUTPUT(buscoGenomeSummaryOutput) @@ -70,8 +70,8 @@ workflow RUN_BUSCO{ // Run Busco in protein mode if (busco_mode.contains('protein')) { def output_typeP = "protein" - def proteinData = FETCH_PROTEINS (db) - def buscoProteinOutput = BUSCO_PROTEIN_LINEAGE(dataset,proteinData) + def proteinData = FETCH_PROTEINS (dataset_db) + def buscoProteinOutput = BUSCO_PROTEIN_LINEAGE(proteinData) def (buscoProteinSummaryOutput) = BUSCO_PROTEIN_OUTPUT(output_typeP, buscoProteinOutput) if (copyToFtp) { COPY_PROTEIN_OUTPUT(buscoProteinSummaryOutput)