Skip to content

Commit

Permalink
Merge pull request #8 from CenterForMedicalGeneticsGhent/fix-binsize
Browse files Browse the repository at this point in the history
fix bin_size
  • Loading branch information
nvnieuwk authored Sep 15, 2023
2 parents 425ab3a + 344d965 commit c46432a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ process {
]

withName: WISECONDORX_NEWREF {
ext.prefix = {"${meta.id}.${meta.bin_size}kbp"}
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: 1 addition & 1 deletion conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ params {

genomes_ignore = true

bin_sizes = "10,5"
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 nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ params {

// Other options
no_metrics = false
bin_sizes = "1000,500,50,30,15,10,5,1"
bin_sizes = "1000000,500000,50000,30000,15000,10000,5000,1000"

// References
genome = "GRCh38"
Expand Down
2 changes: 1 addition & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"bin_sizes": {
"type": "string",
"description": "A comma-delimited list of bin sizes to use for the analysis",
"default": "1000,500,50,30,15,10,5,1"
"default": "1000000,500000,50000,30000,15000,10000,5000,1000"
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ nextflow_pipeline {
when {
params {
prefix = "test_reference"
bin_sizes = "10,5"
bin_sizes = "10000,5"
}
}

then {
assert workflow.success
assert file("${outputDir}/test_reference.10kbp.npz").exists()
assert file("${outputDir}/test_reference.5kbp.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

0 comments on commit c46432a

Please sign in to comment.