Skip to content

Commit

Permalink
Merge pull request #277 from erikrikarddaniel/fix-empty-eukulele-channel
Browse files Browse the repository at this point in the history
Fix empty eukulele channel & unzipped user provided assembly
  • Loading branch information
erikrikarddaniel authored Apr 3, 2024
2 parents 766abe9 + 8ef6992 commit 10eab6d
Show file tree
Hide file tree
Showing 12 changed files with 218 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.0.1 - [2024-04-02]

- [#277](https://github.com/nf-core/metatdenovo/pull/277) - Fix mistake in how `--eukulele_db` parameter is handled. Remove possibility to use a list of dbs in the same run.
- [#277](https://github.com/nf-core/metatdenovo/pull/277) - Gzip user provided assembly files to avoid overwriting by assuming they're already zipped.

## v1.0.0 - [date]

Initial release of nf-core/metatdenovo, created with the [nf-core](https://nf-co.re/) template.
Expand Down
4 changes: 2 additions & 2 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
report_comment: >
This report has been generated by the <a href="https://github.com/nf-core/metatdenovo/releases/tag/1.0.0" target="_blank">nf-core/metatdenovo</a>
This report has been generated by the <a href="https://github.com/nf-core/metatdenovo/releases/tag/1.0.1" target="_blank">nf-core/metatdenovo</a>
analysis pipeline. For information about how to interpret these results, please see the
<a href="https://nf-co.re/metatdenovo/1.0.0/docs/output" target="_blank">documentation</a>.
<a href="https://nf-co.re/metatdenovo/1.0.1/docs/output" target="_blank">documentation</a>.
report_section_order:
"nf-core-metatdenovo-methods-description":
order: -1000
Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
"git_sha": "9e71d8519dfbfc328c078bba14d4bd4c99e39a94",
"installed_by": ["modules"]
},
"pigz/compress": {
"branch": "master",
"git_sha": "0eab94fc1e48703c1b0a8704bd665f554905c39d",
"installed_by": ["modules"]
},
"prodigal": {
"branch": "master",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
Expand Down
9 changes: 9 additions & 0 deletions modules/nf-core/pigz/compress/environment.yml

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

45 changes: 45 additions & 0 deletions modules/nf-core/pigz/compress/main.nf

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

47 changes: 47 additions & 0 deletions modules/nf-core/pigz/compress/meta.yml

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

49 changes: 49 additions & 0 deletions modules/nf-core/pigz/compress/tests/main.nf.test

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

37 changes: 37 additions & 0 deletions modules/nf-core/pigz/compress/tests/main.nf.test.snap

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/pigz/compress/tests/tags.yml

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

2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ manifest {
description = """Assembly and annotation of metatranscriptomic data, both prokaryotic and eukaryotic"""
mainScript = 'main.nf'
nextflowVersion = '!>=23.04.0'
version = '1.0.0'
version = '1.0.1'
doi = ''
}

Expand Down
2 changes: 1 addition & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
"type": "string",
"enum": ["gtdb", "phylodb", "marmmetsp", "mmetsp", "eukprot"],
"description": "EUKulele database.",
"help_text": "This option allows the user to specify which database (or set of databases, separated by comma) to use with EUKulele. Databases that are provided with EUKulele will be downloaded if not already present inside the database directory (see --eukulele_dbpath). Possible alternatives: phylodb, mmetsp, marmmetsp, eukprot. NB: you can't use this option with a custom database as eukulele will not recognize the name and it will start to download phylodb by default. If you want to use a custom database, please skip this option and specify only --eukulele_dbpath.",
"help_text": "This option allows the user to specify which database to use with EUKulele. Databases that are provided with EUKulele will be downloaded if not already present inside the database directory (see --eukulele_dbpath). Possible alternatives: phylodb, mmetsp, marmmetsp, eukprot. NB: you can't use this option with a custom database as eukulele will not recognize the name and it will start to download phylodb by default. If you want to use a custom database, please skip this option and specify only --eukulele_dbpath.",
"fa_icon": "far fa-file-code"
},
"eukulele_dbpath": {
Expand Down
21 changes: 15 additions & 6 deletions workflows/metatdenovo.nf
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ include { CAT_FASTQ } from '../modules/nf-core/
include { FASTQC } from '../modules/nf-core/fastqc/main'
include { MULTIQC } from '../modules/nf-core/multiqc/main'
include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main'
include { PIGZ_COMPRESS as PIGZ_ASSEMBLY } from '../modules/nf-core/pigz/compress/main'

//
// SUBWORKFLOWS: Installed directly from nf-core/modules
Expand Down Expand Up @@ -267,9 +268,15 @@ workflow METATDENOVO {
// MODULE: Run Megahit or RNAspades on all interleaved fastq files
//
if ( params.assembly ) {
Channel
.value ( [ [ id: 'user_assembly' ], file(params.assembly) ] )
.set { ch_assembly_contigs }
// If the input assembly is not gzipped, do that since all downstream calls assume this
if ( ! params.assembly.endsWith('.gz') ) {
PIGZ_ASSEMBLY(Channel.fromPath(params.assembly).map { [ [ id:params.assembly ], it ] } )
PIGZ_ASSEMBLY.out.archive.first().set { ch_assembly_contigs }
} else {
Channel
.value ( [ [ id: 'user_assembly' ], file(params.assembly) ] )
.set { ch_assembly_contigs }
}
} else if ( assembler == 'rnaspades' ) {
// 1. Write a yaml file for Spades
WRITESPADESYAML (
Expand Down Expand Up @@ -303,7 +310,9 @@ workflow METATDENOVO {
.map { [ [ id: 'megahit' ], it ] }
.set { ch_assembly_contigs }
ch_versions = ch_versions.mix(MEGAHIT_INTERLEAVED.out.versions)
} else { error 'Assembler not specified!' }
} else {
error 'Assembler not specified!'
}

// If the user asked for length filtering, perform that with SEQTK_SEQ (the actual length parameter is used in modules.config)
if ( params.min_contig_length > 0 ) {
Expand Down Expand Up @@ -469,11 +478,11 @@ workflow METATDENOVO {
// SUBWORKFLOW: Eukulele
//
ch_eukulele_db = Channel.empty()
if( !params.skip_eukulele){
if( ! params.skip_eukulele ) {
// Create a channel for EUKulele either with a named database or not. The latter means a user-provided database in a directory.
if ( params.eukulele_db ) {
Channel
.fromList ( params.eukulele_db.split(',') )
.of ( params.eukulele_db )
.map { [ it, file(params.eukulele_dbpath) ] }
.set { ch_eukulele_db }
} else {
Expand Down

0 comments on commit 10eab6d

Please sign in to comment.