Skip to content

Commit

Permalink
Addition of indicator files, these are saved to the main outdir
Browse files Browse the repository at this point in the history
  • Loading branch information
DLBPointon committed Aug 9, 2024
1 parent 0bbd384 commit dfdbb8d
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 2 deletions.
15 changes: 15 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ process {
]
}

withName: AUTOFILTER_AND_CHECK_ASSEMBLY {
publishDir = [
path: { "${params.outdir}/" },
mode: params.publish_dir_mode,
pattern: "autofiltering_done_indicator_file.txt"
]
}

withName: GenIndicator {
publishDir = [
path: { "${params.outdir}/" },
mode: params.publish_dir_mode
]
}

withName: ASCC_MERGE_TABLES {
publishDir = [
path: { "${params.outdir}/ASCC-main-output" },
Expand Down
4 changes: 2 additions & 2 deletions modules/local/autofiltering.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ process AUTOFILTER_AND_CHECK_ASSEMBLY {
tuple val(meta), path("ABNORMAL_CHECK.csv"), emit: fcs_tiara_summary
tuple val(meta), path("assembly_filtering_removed_sequences.txt"), emit: removed_seqs
path("fcs-gx_alarm_indicator_file.txt"), emit: alarm_file
//path("autofiltering_done_indicator_file.txt"), emit: indicator_file
path("autofiltering_done_indicator_file.txt"), emit: indicator_file
path "versions.yml", emit: versions

script:
Expand All @@ -39,7 +39,7 @@ process AUTOFILTER_AND_CHECK_ASSEMBLY {
# The below indicator file is used in Sanger-Tol to allow for other processes
# to begin once generated. This allows us to speed up the overall flow of the
# Tol-engine
touch ${params.outdir}/autofiltering_done_indicator_file.txt
touch autofiltering_done_indicator_file.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
7 changes: 7 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ params {
outdir = "${params.outdir}"
tracedir = "${params.outdir}/pipeline_info/"

// MultiQC options
multiqc_config = null
multiqc_title = null
multiqc_logo = null
max_multiqc_email_size = '25.MB'
multiqc_methods_description = null

// Boilerplate options
outdir = null
publish_dir_mode = 'copy'
Expand Down
32 changes: 32 additions & 0 deletions workflows/ascc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ workflow ASCC {
YAML_INPUT.out.ncbi_rankedlineage_path
)
ch_autofilt_assem = AUTOFILTER_AND_CHECK_ASSEMBLY.out.decontaminated_assembly.map{it[1]}
ch_autofilt_indicator = AUTOFILTER_AND_CHECK_ASSEMBLY.out.indicator_file

AUTOFILTER_AND_CHECK_ASSEMBLY.out.alarm_file
.map { file -> file.text.trim() }
Expand All @@ -464,6 +465,7 @@ workflow ASCC {
ch_versions = ch_versions.mix(AUTOFILTER_AND_CHECK_ASSEMBLY.out.versions)
} else {
ch_autofilt_assem = []
ch_autofilt_indicator = []
}

//
Expand Down Expand Up @@ -537,6 +539,15 @@ workflow ASCC {
ch_versions = ch_versions.mix(ASCC_MERGE_TABLES.out.versions)


GenIndicator (
ch_autofilt_indicator,
ch_fcsgx,
ch_fcsadapt,
ch_tiara,
ch_vecscreen,
ch_barcode,
)


//
// SUBWORKFLOW: Collates version data from prior subworflows
Expand Down Expand Up @@ -565,6 +576,27 @@ process GrabFiles {
"true"
}

process GenIndicator {
label 'process_tiny'

tag "Generating Phase 1 Indicator"
executor 'local'

input:
val(a)
val(b)
val(c)
val(d)
val(e)
val(f)

output:
path("decon_first_stage_done_indicator_file.txt")

script:
"touch decon_first_stage_done_indicator_file.txt"
}

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COMPLETION EMAIL AND SUMMARY
Expand Down

0 comments on commit dfdbb8d

Please sign in to comment.