Skip to content

Commit

Permalink
Merge pull request #104 from Daniel-VM/dev
Browse files Browse the repository at this point in the history
Add module dragonflye for long-reads assembly
  • Loading branch information
Daniel-VM committed Nov 2, 2023
2 parents 94058bd + c3ad68a commit 39de87c
Show file tree
Hide file tree
Showing 18 changed files with 351 additions and 23 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Added`

- [#104](https://github.com/nf-core/bacass/pull/104) - Added dragonflye module for long-reads assembly

### `Fixed`

### `Dependencies`
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ This pipeline is primarily for bacterial assembly of next-generation sequencing
### Long Read Assembly

For users that only have Nanopore data, the pipeline quality trims these using [PoreChop](https://github.com/rrwick/Porechop) and assesses basic sequencing QC utilizing [NanoPlot](https://github.com/wdecoster/NanoPlot) and [PycoQC](https://github.com/a-slide/pycoQC).
The pipeline can then perform long read assembly utilizing [Unicycler](https://github.com/rrwick/Unicycler), [Miniasm](https://github.com/lh3/miniasm) in combination with [Racon](https://github.com/isovic/racon), or [Canu](https://github.com/marbl/canu). Long reads assembly can be polished using [Medaka](https://github.com/nanoporetech/medaka) or [NanoPolish](https://github.com/jts/nanopolish) with Fast5 files.
The pipeline can then perform long read assembly utilizing [Unicycler](https://github.com/rrwick/Unicycler), [Miniasm](https://github.com/lh3/miniasm) in combination with [Racon](https://github.com/isovic/racon), [Canu](https://github.com/marbl/canu) or [Flye](https://github.com/fenderglass/Flye) by using the [Dragonflye](https://github.com/rpetit3/dragonflye)(\*) pipeline. Long reads assembly can be polished using [Medaka](https://github.com/nanoporetech/medaka) or [NanoPolish](https://github.com/jts/nanopolish) with Fast5 files.

> **\*Note**: Dragonflye is a comprehensive pipeline designed for genome assembly of Oxford Nanopore Reads. It facilitates the utilization of Flye (default), Miniasm, and Raven assemblers, along with Racon(default) and Medaka polishers. For more information, visit the [Dragonflye GitHub](https://github.com/rpetit3/dragonflye) repository.
### Hybrid Assembly

Expand Down
1 change: 1 addition & 0 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
},
"GenomeSize": {
"errorMessage": "A number (including decimals) ending with 'm', representing genome size. No spaces allowed.",
"meta": ["gsize"],
"anyOf": [
{
"type": ["string", "null"],
Expand Down
27 changes: 27 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,33 @@ process {
]
}

withName: 'DRAGONFLYE' {
ext.args = {
if ( !$meta.gsize?.equals('NA') ){
if ( !params.dragonflye_args.contains("--gsize") ) {
"--gsize ${meta.gsize} ${params.dragonflye_args}"
} else {
params.dragonflye_args ?: ''
}
} else {
params.dragonflye_args ?: ''
}
}

publishDir = [
path: { "${params.outdir}/Dragonflye" },
mode: params.publish_dir_mode,
pattern: "*.{fa,log}",
saveAs: { filename ->
if (filename.equals('versions.yml')) {
null
} else {
"${meta.id}.${filename}"
}
}
]
}

withName: 'RACON' {
ext.args = ''
publishDir = [
Expand Down
26 changes: 26 additions & 0 deletions conf/test_long_dragonflye.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
========================================================================================
Nextflow config file for running minimal tests
========================================================================================
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/bacass -profile test_long_dragonflye,<docker/singularity>
----------------------------------------------------------------------------------------
*/

params {
config_profile_name = 'Test_long_dragonfyle profile'
config_profile_description = 'Minimal test dataset to check pipeline function'

// Input data
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/bacass/bacass_long_miniasm.tsv'

// some extra args to speed tests up
prokka_args = " --fast"
assembly_type = 'long'
assembler = 'dragonflye'
skip_kraken2 = true
skip_polish = true
}
6 changes: 6 additions & 0 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ Check out the [Canu documentation](https://canu.readthedocs.io/en/latest/index.h

Check out the [Miniasm documentation](https://github.com/lh3/miniasm) for more information on Miniasm output.

- `Dragonflye/`
- `*.contigs.fa`: Assembly in Fasta format
- `*.dragonflye.log`: Log file containing the report of the dragonflye process

Checkout the [Dragonflye](https://github.com/rpetit3/dragonflye) documentation for more information of the Dragonflye output.

</details>

### Polished assemblies
Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
"git_sha": "05c280924b6c768d484c7c443dad5e605c4ff4b4",
"installed_by": ["modules"]
},
"dragonflye": {
"branch": "master",
"git_sha": "516189e968feb4ebdd9921806988b4c12b4ac2dc",
"installed_by": ["modules"]
},
"fastp": {
"branch": "master",
"git_sha": "d497a4868ace3302016ea8ed4b395072d5e833cd",
Expand Down
6 changes: 6 additions & 0 deletions modules/nf-core/dragonflye/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions modules/nf-core/dragonflye/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions modules/nf-core/dragonflye/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 78 additions & 0 deletions modules/nf-core/dragonflye/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions modules/nf-core/dragonflye/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions modules/nf-core/dragonflye/tests/nextflow.miniasm.config

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions modules/nf-core/dragonflye/tests/nextflow.raven.config

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions modules/nf-core/dragonflye/tests/tags.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ params {
kraken2db = ""

// Assembly parameters
assembler = 'unicycler' // Allowed: ['unicycler', 'canu', 'miniasm']
assembler = 'unicycler' // Allowed: ['unicycler', 'canu', 'miniasm', 'dragonflye']
assembly_type = 'short' // Allowed: ['short', 'long', 'hybrid'] (hybrid works only with Unicycler)
unicycler_args = ""
canu_mode = '-nanopore' // Allowed: ['-pacbio', '-nanopore', '-pacbio-hifi']
canu_args = '' // Default no extra options, can be adjusted by the user
dragonflye_args = ''

// Assembly polishing
polish_method = 'medaka'
Expand Down Expand Up @@ -195,12 +196,13 @@ profiles {
executor.cpus = 4
executor.memory = 8.GB
}
test { includeConfig 'conf/test.config' }
test_dfast { includeConfig 'conf/test_dfast.config' }
test_hybrid { includeConfig 'conf/test_hybrid.config' }
test_long { includeConfig 'conf/test_long.config' }
test_long_miniasm { includeConfig 'conf/test_long_miniasm.config' }
test_full { includeConfig 'conf/test_full.config' }
test { includeConfig 'conf/test.config' }
test_dfast { includeConfig 'conf/test_dfast.config' }
test_hybrid { includeConfig 'conf/test_hybrid.config' }
test_long { includeConfig 'conf/test_long.config' }
test_long_miniasm { includeConfig 'conf/test_long_miniasm.config' }
test_long_dragonflye{ includeConfig 'conf/test_long_dragonflye.config' }
test_full { includeConfig 'conf/test_full.config' }
}

// Set default registry for Apptainer, Docker, Podman and Singularity independent of -profile
Expand Down
Loading

0 comments on commit 39de87c

Please sign in to comment.