Skip to content

Commit

Permalink
Merge pull request #9 from CenterForMedicalGeneticsGhent/dev
Browse files Browse the repository at this point in the history
Release PR v1.1.0
  • Loading branch information
nvnieuwk authored Sep 15, 2023
2 parents ddccaa7 + c46432a commit 10ddd8b
Show file tree
Hide file tree
Showing 15 changed files with 85 additions and 30 deletions.
1 change: 0 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,3 @@ To get started:
Devcontainer specs:

- [DevContainer config](.devcontainer/devcontainer.json)
- [Dockerfile](.devcontainer/Dockerfile)
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ testing/
testing*
*.pyc
bin/
.nf-test/
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
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.1.0 - Naive Junior - [19 June 2023]

## New features

1. Added a new parameter `--bin_sizes` that takes a comma-delimited list of bin sizes to create references for. This will make it possible to create references for multiple bin sizes at once.

## v1.0.1 - Helpful Apprentice - [19 June 2023]

### New features
Expand Down
2 changes: 2 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ process {
]

withName: WISECONDORX_NEWREF {
ext.prefix = {"${meta.id}_${meta.bin_size as Integer > 1000 ? meta.bin_size as Integer/1000 : meta.bin_size}${meta.bin_size as Integer > 1000 ? "k" : ""}bp"}
ext.args = { "--binsize ${meta.bin_size}" }
publishDir = [
enabled: true,
path: { "${params.outdir}" },
Expand Down
2 changes: 2 additions & 0 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ params {

genomes_ignore = true

bin_sizes = "10000,5"

fasta = params.test_data["homo_sapiens"]["genome"]["genome_fasta"]
fai = null //params.test_data["homo_sapiens"]["genome"]["genome_fasta_fai"]

Expand Down
2 changes: 1 addition & 1 deletion lib/NfcoreTemplate.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class NfcoreTemplate {
def email_html = html_template.toString()

// Render the sendmail template
def max_multiqc_email_size = params.max_multiqc_email_size as nextflow.util.MemoryUnit
def max_multiqc_email_size = (params.containsKey('max_multiqc_email_size') ? params.max_multiqc_email_size : 0) as nextflow.util.MemoryUnit
def smail_fields = [ email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, projectDir: "$projectDir", mqcFile: mqc_report, mqcMaxSize: max_multiqc_email_size.toBytes() ]
def sf = new File("$projectDir/assets/sendmail_template.txt")
def sendmail_template = engine.createTemplate(sf).make(smail_fields)
Expand Down
6 changes: 3 additions & 3 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"nf-core": {
"custom/dumpsoftwareversions": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"git_sha": "05c280924b6c768d484c7c443dad5e605c4ff4b4",
"installed_by": ["modules"]
},
"multiqc": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"git_sha": "a6e11ac655e744f7ebc724be669dd568ffdc0e80",
"installed_by": ["modules"]
},
"ngsbits/samplegender": {
Expand All @@ -23,7 +23,7 @@
},
"samtools/faidx": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"git_sha": "fd742419940e01ba1c5ecb172c3e32ec840662fe",
"installed_by": ["modules"]
},
"samtools/index": {
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/custom/dumpsoftwareversions/main.nf

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

6 changes: 3 additions & 3 deletions modules/nf-core/multiqc/main.nf

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

16 changes: 11 additions & 5 deletions modules/nf-core/samtools/faidx/main.nf

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

14 changes: 12 additions & 2 deletions modules/nf-core/samtools/faidx/meta.yml

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

10 changes: 5 additions & 5 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ params {

// Other options
no_metrics = false
bin_sizes = "1000000,500000,50000,30000,15000,10000,5000,1000"

// References
genome = "GRCh38"
Expand Down Expand Up @@ -42,10 +43,9 @@ params {
help = false
version = false
validate_params = true
show_hidden_params = false
validationSchemaIgnoreParams = 'genomes,test_data,schema_ignore_params'
schema_ignore_params = 'genomes,test_data'

validationSchemaIgnoreParams = 'genomes,test_data,igenomes_base'
validationShowHiddenParams = false
validate_params = true

// Config options
custom_config_version = 'master'
Expand Down Expand Up @@ -234,7 +234,7 @@ manifest {
description = """A nextflow pipeline for creating references for WisecondorX"""
mainScript = 'main.nf'
nextflowVersion = '!>=22.10.1'
version = '1.0.1'
version = '1.1.0'
doi = ''
}

Expand Down
29 changes: 24 additions & 5 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
"no_metrics": {
"type": "boolean",
"description": "Don't create the metrics text file"
},
"bin_sizes": {
"type": "string",
"description": "A comma-delimited list of bin sizes to use for the analysis",
"default": "1000000,500000,50000,30000,15000,10000,5000,1000"
}
}
},
Expand Down Expand Up @@ -296,17 +301,31 @@
"fa_icon": "fas fa-check-square",
"hidden": true
},
"show_hidden_params": {
"validationSchemaIgnoreParams": {
"type": "string",
"default": "genomes,test_data",
"hidden": true
},
"validationShowHiddenParams": {
"type": "boolean",
"fa_icon": "far fa-eye-slash",
"description": "Show all params when using `--help`",
"hidden": true,
"help_text": "By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters."
},
"validationSchemaIgnoreParams": {
"type": "string",
"default": "genomes,test_data,schema_ignore_params",
"hidden": true
"validationFailUnrecognisedParams": {
"type": "boolean",
"fa_icon": "far fa-check-circle",
"description": "Validation of parameters fails when an unrecognised parameter is found.",
"hidden": true,
"help_text": "By default, when an unrecognised parameter is found, it returns a warinig."
},
"validationLenientMode": {
"type": "boolean",
"fa_icon": "far fa-check-circle",
"description": "Validation of parameters in lenient more.",
"hidden": true,
"help_text": "Allows string values that are parseable as numbers or booleans. For further information see [JSONSchema docs](https://github.com/everit-org/json-schema#lenient-mode)."
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ nextflow_pipeline {
when {
params {
prefix = "test_reference"
bin_sizes = "10000,5"
}
}

then {
assert workflow.success
assert file("${outputDir}/test_reference.npz").exists()
assert file("${outputDir}/test_reference_10kbp.npz").exists()
assert file("${outputDir}/test_reference_5bp.npz").exists()
assert file("${outputDir}/metrics.txt").exists()
assert file("${outputDir}/multiqc_reports/multiqc_report.html").exists()
}
Expand Down
10 changes: 9 additions & 1 deletion workflows/cmgg-wisecondorx.nf
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ workflow CMGGWISECONDORX {
.collect()

if(!params.fai) {
SAMTOOLS_FAIDX(ch_fasta)
SAMTOOLS_FAIDX(
ch_fasta,
[[],[]]
)
ch_versions = ch_versions.mix(SAMTOOLS_FAIDX.out.versions)

SAMTOOLS_FAIDX.out.fai
Expand Down Expand Up @@ -184,6 +187,11 @@ workflow CMGGWISECONDORX {
[ new_meta, npz ]
}
.groupTuple() // All files should be present here, so no size is needed
.combine(params.bin_sizes.split(","))
.map { meta, npz, bin_size ->
new_meta = meta + [bin_size:bin_size]
[ new_meta, npz ]
}
.set { ch_newref_input }

WISECONDORX_NEWREF(ch_newref_input)
Expand Down

0 comments on commit 10ddd8b

Please sign in to comment.