From aa241a9d7122eae1246b96c4862287175938f4f5 Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Thu, 5 Dec 2024 14:57:26 +0000 Subject: [PATCH] Updating setup-nextflow from 1 to 2 --- .github/workflows/ci.yml | 2 +- assets/github_testing/github_test.yaml | 2 +- assets/test.yaml | 2 +- conf/modules.config | 1 - main.nf | 35 +++++++++++++++++++++++--- subworkflows/local/run_fcsgx.nf | 4 +-- workflows/ascc_genomic.nf | 11 ++++---- workflows/ascc_organellar.nf | 9 ++++--- 8 files changed, 48 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9dec2c..0b0a943 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: uses: actions/checkout@v3 - name: Install Nextflow - uses: nf-core/setup-nextflow@v1 + uses: nf-core/setup-nextflow@v2 with: version: "${{ matrix.NXF_VER }}" diff --git a/assets/github_testing/github_test.yaml b/assets/github_testing/github_test.yaml index ddfd0e9..c6f2546 100644 --- a/assets/github_testing/github_test.yaml +++ b/assets/github_testing/github_test.yaml @@ -16,7 +16,7 @@ ncbi_taxonomy_path: /home/runner/work/ascc/ascc/ncbi_taxdump/ ncbi_ranked_lineage_path: /home/runner/work/ascc/ascc/ncbi_taxdump/rankedlineage.dmp busco_lineages_folder: /home/runner/work/ascc/ascc/busco_database busco_lineages: "diptera_odb10,insecta_odb10" -fcs_gx_database_path: /home/runner/work/ascc/ascc/FCS_gx/ +fcs_gx_database_path: /home/runner/work/ascc/ascc/FCS_gx diamond_uniprot_database_path: /home/runner/work/ascc/ascc/diamond.dmnd diamond_nr_database_path: /home/runner/work/ascc/ascc/diamond.dmnd vecscreen_database_path: /home/runner/work/ascc/ascc/vecscreen/ diff --git a/assets/test.yaml b/assets/test.yaml index a1cd303..a65e744 100644 --- a/assets/test.yaml +++ b/assets/test.yaml @@ -16,7 +16,7 @@ ncbi_taxonomy_path: /lustre/scratch123/tol/resources/taxonomy/latest/new_taxdump ncbi_ranked_lineage_path: /lustre/scratch123/tol/teams/tola/users/ea10/databases/taxdump/rankedlineage.dmp busco_lineages_folder: /lustre/scratch123/tol/resources/busco/latest/lineages/ busco_lineages: "diptera_odb10,insecta_odb10" -fcs_gx_database_path: /lustre/scratch124/tol/projects/asg/sub_projects/ncbi_decon/0.4.0/gxdb/ +fcs_gx_database_path: /lustre/scratch124/tol/projects/asg/sub_projects/ncbi_decon/0.4.0/gxdb vecscreen_database_path: /nfs/treeoflife-01/teams/tola/users/dp24/ascc/vecscreen/ diamond_uniprot_database_path: /lustre/scratch123/tol/teams/tola/users/ea10/pipeline_testing/20240704_diamond_tiny_testdb/ascc_tinytest_diamond_db.dmnd diamond_nr_database_path: /lustre/scratch123/tol/teams/tola/users/ea10/pipeline_testing/20240704_diamond_tiny_testdb/ascc_tinytest_diamond_db.dmnd diff --git a/conf/modules.config b/conf/modules.config index 3bd354f..e40ad7f 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -14,7 +14,6 @@ process { withName: SANGER_TOL_BTK { ext.args = "" - ext.executor = "bsub -Is -tty -e test.e -o test.log -n 2 -q oversubscribed -M1400 -R'select[mem>1400] rusage[mem=1400] span[hosts=1]'" ext.profiles = "singularity,sanger" ext.get_versions = "lsid | head -n1 | cut -d ',' -f 1" ext.version = "0.6.0" diff --git a/main.nf b/main.nf index 0279aa9..8511b26 100644 --- a/main.nf +++ b/main.nf @@ -16,6 +16,7 @@ nextflow.enable.dsl = 2 */ include { VALIDATE_TAXID } from './modules/local/validate_taxid' +include { COPY_FCS_GX } from './modules/local/copy_fcs_tmp' include { ASCC_GENOMIC } from './workflows/ascc_genomic' include { ASCC_ORGANELLAR } from './workflows/ascc_organellar' @@ -40,6 +41,7 @@ workflow SANGERTOL_ASCC_GENOMIC { validate_versions include_steps exclude_steps + fcs main: @@ -51,7 +53,8 @@ workflow SANGERTOL_ASCC_GENOMIC { organelles, validate_versions, include_steps, - exclude_steps + exclude_steps, + fcs ) } @@ -65,6 +68,7 @@ workflow SANGERTOL_ASCC_ORGANELLAR { validate_versions include_steps exclude_steps + fcs main: @@ -75,7 +79,8 @@ workflow SANGERTOL_ASCC_ORGANELLAR { samplesheet, validate_versions, include_steps, - exclude_steps + exclude_steps, + fcs ) } /* @@ -85,6 +90,9 @@ workflow SANGERTOL_ASCC_ORGANELLAR { */ workflow { + // + // WORKFLOW: THIS WHOLE THING SHOULD BE IN A SUBWORKFLOW REALY + // main: @@ -123,6 +131,25 @@ workflow { ) + // + // TEMP MODULE: COPY FCS_GX_DB INTO TMP + // + include_workflow_steps = params.include ? params.include.split(",") : "ALL" + VALID = ["ALL", "fcs-gx"] + + if ( params.move_fcs && VALID.any{ include_workflow_steps.contains( it ) } ) { + COPY_FCS_GX ( + params.fcs_gx_database_path, + ) + + fcs_gx_database_path = COPY_FCS_GX.out.fcsdb_path + delete_fcs = true + } else { + fcs_gx_database_path = Channel.of(params.fcs_gx_database_path) + delete_fcs = false + } + + // // WORKFLOW: Run main workflow for GENOMIC samples // @@ -131,7 +158,8 @@ workflow { branched_assemblies.organellar_genome, VALIDATE_TAXID.out.versions, params.include, - params.exclude + params.exclude, + fcs_gx_database_path, ) @@ -165,6 +193,7 @@ workflow { VALIDATE_TAXID.out.versions, organellar_include, organellar_exclude, + fcs_gx_database_path ) // diff --git a/subworkflows/local/run_fcsgx.nf b/subworkflows/local/run_fcsgx.nf index c4d03f0..6d0db63 100644 --- a/subworkflows/local/run_fcsgx.nf +++ b/subworkflows/local/run_fcsgx.nf @@ -17,10 +17,10 @@ workflow RUN_FCSGX { 'all.gxi', 'all.gxs', 'all.taxa.tsv', 'all.meta.jsonl', 'all.blast_div.tsv.gz' ) .combine( - Channel.of(fcsgxpath) + fcsgxpath ) .map {suxfix, fcs_db -> - [file(fcs_db + '/' + suxfix)] + [file(fcs_db.toString() + '/' + suxfix)] } .collect() .set { fcsgxdb } diff --git a/workflows/ascc_genomic.nf b/workflows/ascc_genomic.nf index 66a3984..a06504f 100644 --- a/workflows/ascc_genomic.nf +++ b/workflows/ascc_genomic.nf @@ -43,11 +43,12 @@ include { methodsDescriptionText } from '../subworkflows/ workflow ASCC_GENOMIC { take: - ch_samplesheet // channel: samplesheet read in from --input - organellar_genomes + ch_samplesheet // channel: samplesheet read in from --input + organellar_genomes // channel: tuple(meta, reference) validate_taxid_versions // Versions channel from main.nf - include_steps - exclude_steps + include_steps // params.include_steps + exclude_steps // params.exclude_steps + fcs_db // path(path) main: ch_versions = Channel.empty() @@ -236,7 +237,7 @@ workflow ASCC_GENOMIC { if ( include_workflow_steps.contains('fcs-gx') || include_workflow_steps.contains('ALL') ) { RUN_FCSGX ( ESSENTIAL_JOBS.out.reference_tuple_from_GG, - params.fcs_gx_database_path, + fcs_db, params.taxid, params.ncbi_ranked_lineage_path ) diff --git a/workflows/ascc_organellar.nf b/workflows/ascc_organellar.nf index 418d0a0..1b771ed 100644 --- a/workflows/ascc_organellar.nf +++ b/workflows/ascc_organellar.nf @@ -42,10 +42,11 @@ include { methodsDescriptionText } from '../subworkflows/ workflow ASCC_ORGANELLAR { take: - ch_samplesheet // channel: samplesheet read in from --input + ch_samplesheet // channel: samplesheet read in from --input validate_taxid_versions // Versions channel from main.nf - include_steps - exclude_steps + include_steps // params.include_steps + exclude_steps // params.exclude_steps + fcs_db // path(file) main: ch_versions = Channel.empty() @@ -189,7 +190,7 @@ workflow ASCC_ORGANELLAR { // if ( include_workflow_steps.contains('fcs-gx') || include_workflow_steps.contains('ALL') ) { // RUN_FCSGX ( // ESSENTIAL_JOBS.out.reference_tuple_from_GG, - // params.fcs_gx_database_path, + // fcs_db, // params.taxid, // params.ncbi_ranked_lineage_path // )