Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix quoting and undercore unused variables #724

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Fixed`

- [#724](https://github.com/nf-core/mag/pull/724) - Fix quoting in `utils_nfcore_mag_pipeline/main.nf` (added by @dialvarezs)
- [#716](https://github.com/nf-core/mag/pull/692) - Make short read processing a subworkflow (added by @muabnezor)
- [#708](https://github.com/nf-core/mag/pull/708) - Fixed channel passed as GUNC input (added by @dialvarezs)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Other code contributors include:
- [Phil Palmer](https://github.com/PhilPalmer)
- [@willros](https://github.com/willros)
- [Adam Rosenbaum](https://github.com/muabnezor)
- [Diego Alvarez](https://github.com/dialvarezs)

Long read processing was inspired by [caspargross/HybridAssembly](https://github.com/caspargross/HybridAssembly) written by Caspar Gross [@caspargross](https://github.com/caspargross)

Expand Down
18 changes: 9 additions & 9 deletions subworkflows/local/utils_nfcore_mag_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ workflow PIPELINE_INITIALISATION {
take:
version // boolean: Display version and exit
validate_params // boolean: Boolean whether to validate parameters against the schema at runtime
monochrome_logs // boolean: Do not use coloured log outputs
_monochrome_logs // boolean: Do not use coloured log outputs
nextflow_cli_args // array: List of positional nextflow CLI args
outdir // string: The output directory where the results will be saved
input // string: Path to input samplesheet
Expand Down Expand Up @@ -71,13 +71,13 @@ workflow PIPELINE_INITIALISATION {

// Validate FASTQ input
ch_samplesheet = Channel
.fromList(samplesheetToList(params.input, "${projectDir}/assets/schema_input.json"))
.fromList(samplesheetToList(input, "${projectDir}/assets/schema_input.json"))
.map {
validateInputSamplesheet(it[0], it[1], it[2], it[3])
}

// Prepare FASTQs channel and separate short and long reads and prepare
ch_raw_short_reads = ch_samplesheet.map { meta, sr1, sr2, lr ->
ch_raw_short_reads = ch_samplesheet.map { meta, sr1, sr2, _lr ->
meta.run = meta.run == [] ? "0" : meta.run
meta.single_end = params.single_end

Expand All @@ -89,7 +89,7 @@ workflow PIPELINE_INITIALISATION {
}
}

ch_raw_long_reads = ch_samplesheet.map { meta, sr1, sr2, lr ->
ch_raw_long_reads = ch_samplesheet.map { meta, _sr1, _sr2, lr ->
if (lr) {
meta.run = meta.run == [] ? "0" : meta.run
return [meta, lr]
Expand Down Expand Up @@ -129,13 +129,13 @@ workflow PIPELINE_INITIALISATION {
// Cross validation of input assembly and read IDs: ensure groups are all represented between reads and assemblies
if (params.assembly_input) {
ch_read_ids = ch_samplesheet
.map { meta, sr1, sr2, lr -> params.coassemble_group ? meta.group : meta.id }
.map { meta, _sr1, _sr2, _lr -> params.coassemble_group ? meta.group : meta.id }
.unique()
.toList()
.sort()

ch_assembly_ids = ch_input_assemblies
.map { meta, fasta -> params.coassemble_group ? meta.group : meta.id }
.map { meta, _fasta -> params.coassemble_group ? meta.group : meta.id }
.unique()
.toList()
.sort()
Expand Down Expand Up @@ -286,14 +286,14 @@ def validateInputParameters(hybrid) {

// Check if BUSCO parameters combinations are valid
if (params.skip_binqc && params.binqc_tool == 'checkm') {
error('[nf-core/mag] ERROR: Both --skip_binqc and --binqc_tool 'checkm' are specified! Invalid combination, please specify either --skip_binqc or --binqc_tool.')
error("[nf-core/mag] ERROR: Both --skip_binqc and --binqc_tool 'checkm' are specified! Invalid combination, please specify either --skip_binqc or --binqc_tool.")
}
if (params.skip_binqc) {
if (params.busco_db) {
error('[nf-core/mag] ERROR: Both --skip_binqc and --busco_db are specified! Invalid combination, please specify either --skip_binqc or --binqc_tool 'busco' with --busco_db.')
error("[nf-core/mag] ERROR: Both --skip_binqc and --busco_db are specified! Invalid combination, please specify either --skip_binqc or --binqc_tool 'busco' with --busco_db.")
}
if (params.busco_auto_lineage_prok) {
error('[nf-core/mag] ERROR: Both --skip_binqc and --busco_auto_lineage_prok are specified! Invalid combination, please specify either --skip_binqc or --binqc_tool 'busco' with --busco_auto_lineage_prok.')
error("[nf-core/mag] ERROR: Both --skip_binqc and --busco_auto_lineage_prok are specified! Invalid combination, please specify either --skip_binqc or --binqc_tool 'busco' with --busco_auto_lineage_prok.")
}
}

Expand Down
Loading