Skip to content

Commit

Permalink
Added parameter spades_use_contigs_not_scaffolds
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp committed Jan 20, 2025
1 parent 84e7186 commit b1eb9ed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ params {
// assembly options
coassemble_group = false
spades_options = null
spades_use_contigs_not_scaffolds = false
megahit_options = null
skip_spades = false
skip_spadeshybrid = false
Expand Down
4 changes: 4 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,10 @@
"description": "Additional custom options for SPAdes and SPAdesHybrid. Do not specify `--meta` as this will be added for you!",
"help_text": "An example is adjusting k-mers (\"-k 21,33,55,77\") or adding [advanced options](https://github.com/ablab/spades#advanced-options). But not --meta, -t, -m, -o or --out-prefix, because these are already in use. Must be used like this: --spades_options \"-k 21,33,55,77\")"
},
"spades_use_contigs_not_scaffolds": {
"type": "boolean",
"description": "Specify whether to use contigs or scaffolds assembled by SPAdes"
},
"megahit_options": {
"type": "string",
"description": "Additional custom options for MEGAHIT.",
Expand Down
9 changes: 5 additions & 4 deletions workflows/mag.nf
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,11 @@ workflow MAG {

if (!params.single_end && !params.skip_spades) {
METASPADES(ch_short_reads_spades.map { meta, reads -> [meta, reads, [], []] }, [], [])
ch_spades_assemblies = METASPADES.out.contigs.map { meta, assembly ->
def meta_new = meta + [assembler: 'SPAdes']
[meta_new, assembly]
}
ch_spades_assemblies = ( params.spades_use_contigs_not_scaffolds ? METASPADES.out.contigs : METASPADES.out.scaffolds )
.map { meta, assembly ->
def meta_new = meta + [assembler: 'SPAdes']
[meta_new, assembly]
}
ch_assembled_contigs = ch_assembled_contigs.mix(ch_spades_assemblies)
ch_versions = ch_versions.mix(METASPADES.out.versions.first())
}
Expand Down

0 comments on commit b1eb9ed

Please sign in to comment.