Skip to content

Commit

Permalink
Merge pull request #724 from dialvarezs/fix-quotes
Browse files Browse the repository at this point in the history
Fix quoting and undercore unused variables
  • Loading branch information
dialvarezs authored Dec 13, 2024
2 parents a9c213f + c7bec09 commit 62d6f3d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
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

0 comments on commit 62d6f3d

Please sign in to comment.