Skip to content

Commit

Permalink
feat: Add recombination entry (#175)
Browse files Browse the repository at this point in the history
* feat: Add recombination entry

Signed-off-by: jvfe <jvfecav@gmail.com>

* docs: Add recombination usage

Signed-off-by: jvfe <jvfecav@gmail.com>

---------

Signed-off-by: jvfe <jvfecav@gmail.com>
  • Loading branch information
jvfe committed Nov 7, 2023
1 parent 946837b commit 710ba25
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,18 @@ ED178 0 1
ED180 0 0
```

### Recombination Entry

To execute the recombination analysis on pre-existing assemblies (PopPUNK model can be either bgmm, dbscan, refine, threshold or lineage):

```bash
nextflow run beiko-lab/ARETE \
-entry recombination \
--input_sample_table samplesheet.csv \
--poppunk_model dbscan \
-profile docker
```

## Updating the pipeline

When you run the above command, Nextflow automatically pulls the pipeline code from GitHub and stores it as a cached version. When running the pipeline after this, it will always use the cached version if available - even if the pipeline has been updated since. To make sure that you're running the latest version of the pipeline, make sure that you regularly update the cached version of the pipeline:
Expand Down
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 710ba25

Please sign in to comment.