Skip to content

Commit

Permalink
feat: Add recombination entry
Browse files Browse the repository at this point in the history
Signed-off-by: jvfe <[email protected]>
  • Loading branch information
jvfe committed Nov 7, 2023
1 parent 946837b commit a31e488
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ include { QUALITYCHECK } from './workflows/arete'
include { POPPUNK } from './workflows/arete'
include { RUN_RSPR } from './workflows/arete'
include { RUN_EVOLCCM } from './workflows/arete'

include { RUN_RECOMBINATION } from './workflows/arete'

//
// WORKFLOW: Run main nf-core/arete analysis pipeline
Expand Down Expand Up @@ -77,6 +77,10 @@ workflow rspr {
workflow evolccm {
RUN_EVOLCCM()
}

workflow recombination {
RUN_RECOMBINATION()
}
/*
========================================================================================
RUN ALL WORKFLOWS
Expand Down
64 changes: 64 additions & 0 deletions workflows/arete.nf
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,70 @@ workflow RUN_EVOLCCM {
)
}

workflow RUN_RECOMBINATION {
if (params.input_sample_table){ ch_input = file(params.input_sample_table) } else { exit 1, 'Input samplesheet not specified!' }
if (params.reference_genome) {
ch_reference_genome = file(params.reference_genome)
use_reference_genome = true
}
else {
ch_reference_genome = []
use_reference_genome = false
}
if (params.poppunk_model == null) { exit 1, 'A model must be specified with --poppunk_model in order to run PopPunk' }
ch_software_versions = Channel.empty()

ANNOTATION_INPUT_CHECK(ch_input)
ANNOTATION_INPUT_CHECK.out.genomes.set { assemblies }

CHECK_ASSEMBLIES(
assemblies,
ch_reference_genome,
use_reference_genome
)
ch_software_versions = ch_software_versions.mix(CHECK_ASSEMBLIES.out.assemblyqc_software)

if (params.apply_filtering) {
CHECK_ASSEMBLIES.out.assemblies
.set { assemblies }
}

RUN_POPPUNK(assemblies)
ch_software_versions = ch_software_versions.mix(RUN_POPPUNK.out.poppunk_version)


RECOMBINATION (
assemblies,
RUN_POPPUNK.out.clusters,
CHECK_ASSEMBLIES.out.quast_report
)

CUSTOM_DUMPSOFTWAREVERSIONS (
ch_software_versions.unique().collectFile(name: 'collated_versions.yml')
)

/*
* MODULE: MultiQC
*/
workflow_summary = WorkflowArete.paramsSummaryMultiqc(workflow, summary_params)
ch_workflow_summary = Channel.value(workflow_summary)

//Mix QUAST results into one report file
ch_multiqc_files = Channel.empty()
ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml'))
ch_multiqc_files = ch_multiqc_files.mix(CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect())
ch_multiqc_files = ch_multiqc_files.mix(CHECK_ASSEMBLIES.out.multiqc)

MULTIQC(
ch_multiqc_files.collect(),
ch_multiqc_config.collect().ifEmpty([]),
ch_multiqc_custom_config.collect().ifEmpty([]),
ch_multiqc_logo.collect().ifEmpty([])
)
multiqc_report = MULTIQC.out.report.toList()
ch_software_versions = ch_software_versions.mix(MULTIQC.out.versions.ifEmpty(null))

}
/*
========================================================================================
COMPLETION EMAIL AND SUMMARY
Expand Down

0 comments on commit a31e488

Please sign in to comment.