Skip to content

Commit

Permalink
Updating setup-nextflow from 1 to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
DLBPointon committed Dec 5, 2024
1 parent e35a762 commit aa241a9
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"

Expand Down
2 changes: 1 addition & 1 deletion assets/github_testing/github_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion assets/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
35 changes: 32 additions & 3 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -40,6 +41,7 @@ workflow SANGERTOL_ASCC_GENOMIC {
validate_versions
include_steps
exclude_steps
fcs

main:

Expand All @@ -51,7 +53,8 @@ workflow SANGERTOL_ASCC_GENOMIC {
organelles,
validate_versions,
include_steps,
exclude_steps
exclude_steps,
fcs
)
}

Expand All @@ -65,6 +68,7 @@ workflow SANGERTOL_ASCC_ORGANELLAR {
validate_versions
include_steps
exclude_steps
fcs

main:

Expand All @@ -75,7 +79,8 @@ workflow SANGERTOL_ASCC_ORGANELLAR {
samplesheet,
validate_versions,
include_steps,
exclude_steps
exclude_steps,
fcs
)
}
/*
Expand All @@ -85,6 +90,9 @@ workflow SANGERTOL_ASCC_ORGANELLAR {
*/

workflow {
//
// WORKFLOW: THIS WHOLE THING SHOULD BE IN A SUBWORKFLOW REALY
//

main:

Expand Down Expand Up @@ -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
//
Expand All @@ -131,7 +158,8 @@ workflow {
branched_assemblies.organellar_genome,
VALIDATE_TAXID.out.versions,
params.include,
params.exclude
params.exclude,
fcs_gx_database_path,
)


Expand Down Expand Up @@ -165,6 +193,7 @@ workflow {
VALIDATE_TAXID.out.versions,
organellar_include,
organellar_exclude,
fcs_gx_database_path
)

//
Expand Down
4 changes: 2 additions & 2 deletions subworkflows/local/run_fcsgx.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
11 changes: 6 additions & 5 deletions workflows/ascc_genomic.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
)
Expand Down
9 changes: 5 additions & 4 deletions workflows/ascc_organellar.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
// )
Expand Down

0 comments on commit aa241a9

Please sign in to comment.