Skip to content
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
4 changes: 2 additions & 2 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ process {
publishDir = [
path: { "${params.outdir}/numorph_resample/" },
mode: params.publish_dir_mode,
pattern: 'results/**/*',
pattern: 'results/*',
saveAs: { filename ->
if (filename.equals('versions.yml')) {
null
Expand All @@ -105,7 +105,7 @@ process {
publishDir = [
path: { "${params.outdir}/numorphregister/" },
mode: params.publish_dir_mode,
pattern: 'results/**/*',
pattern: 'results/*',
saveAs: { filename ->
if (filename.equals('versions.yml')) {
null
Expand Down
22 changes: 6 additions & 16 deletions modules/local/numorphregister/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ process NUMORPHREGISTER {
tag "$meta.id"
label 'process_high_long'

container "nf-core/numorph_analyze:1.0.1"
container "nf-core/numorph_analyze:1.0.0"

input:
tuple val(meta), path(resampled_directory), path(parameter_file)

output:
path "results/*results.mat" , emit: res_mat
path "results/variables/*" , emit: variables
path "results/NM_variables.mat" , emit: NM_variables
path "results/registered/*" , emit: registered
path "versions.yml" , emit: versions
tuple val(meta), path("results/registered/") , emit: registered
tuple val(meta), path("results/variables/") , emit: variables
tuple val(meta), path("results/NM_variables.mat") , emit: NM_variables

tuple val("${task.process}"), val('numorphregister'), val('1.0.0'), emit: versions_numorph_analyze, topic: versions


when:
Expand All @@ -37,11 +37,6 @@ process NUMORPHREGISTER {

numorph_analyze 'input_dir' \$resampled_directory 'output_dir' \$results_dir 'parameter_file' \$parameter_file 'sample_name' ${prefix} 'stage' 'register' 'NM_variables' '' 'use_processed_images' 'resampled'


cat <<-END_VERSIONS > versions.yml
"${task.process}":
numorphregister: 1.0
END_VERSIONS
"""

stub:
Expand All @@ -55,12 +50,7 @@ process NUMORPHREGISTER {
touch results/variables/reg_params.mat
touch results/variables/${prefix}_mask.mat
touch results/NM_variables.mat
touch results/${prefix}_results.mat
touch results/registered/${prefix}_registered.tif

cat <<-END_VERSIONS > versions.yml
"${task.process}":
numorphregister: 1.0
END_VERSIONS
"""
}
33 changes: 10 additions & 23 deletions subworkflows/local/araregistration/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,21 @@ workflow ARAREGISTRATION {

NUMORPHREGISTER (resampled_data)

ch_versions = ch_versions.mix(NUMORPHREGISTER.out.versions)
def reg_output = NUMORPHREGISTER.out

def registration_files = reg_output.variables.flatten()

sample_meta.combine(registration_files)
.mix (
sample_meta.combine(reg_output.res_mat),
sample_meta.combine(reg_output.NM_variables)
)
.set {mat_files_reg}
def mat_files = NUMORPHREGISTER.out.variables
.flatMap { meta, variables_dir ->
variables_dir.listFiles()
.findAll { it.name.endsWith('.mat') }
.collect { matfile -> [meta, matfile] }
}
.mix(NUMORPHREGISTER.out.NM_variables)

MAT2JSON (mat_files_reg, "registration")
ch_versions = ch_versions.mix(MAT2JSON.out.versions)
MAT2JSON (mat_files, "registration")

softwareVersionsToYAML(ch_versions)
.collectFile(
storeDir: "${params.outdir}/pipeline_info",
name: 'nf_core_' + 'lsmquant_software_' + 'mqc_' + 'versions.yml',
sort: true,
newLine: true
).set { ch_collated_versions }

emit:

res_mat = NUMORPHREGISTER.out.res_mat
variables = NUMORPHREGISTER.out.variables // channel: variables
registered = NUMORPHREGISTER.out.registered // channel: registered
NM_variables = NUMORPHREGISTER.out.NM_variables // channel: NM_variables
versions = ch_collated_versions // channel: [ versions.yml ]
NM_variable = NUMORPHREGISTER.out.NM_variables // channel: NM_variables

}
16 changes: 0 additions & 16 deletions subworkflows/local/araregistration/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,6 @@ nextflow_workflow {
test("ARA registration stub test") {

options '-stub'
setup {
run ("NUMORPHINTENSITY") {
script "../../../../modules/local/numorphintensity/main.nf"
options '-stub'
process {
"""
input[0] = Channel.fromList([
tuple([ id:'TEST1'],
file('https://zenodo.org/records/14916478/files/ctip2_topro.zip'),
file(params.pipelines_testdata_base_path + '/test_data/parameterfiles/params_TEST1_lsmquant.csv'))
])
"""
}
}
}

when {
workflow {
Expand All @@ -41,7 +26,6 @@ nextflow_workflow {
file('https://zenodo.org/records/14916478/files/ctip2_topro.zip'),
file(params.pipelines_testdata_base_path + '/test_data/parameterfiles/params_TEST1_lsmquant.csv'))
])
input[1] = NUMORPHINTENSITY.out.NM_variables
"""
}
}
Expand Down
72 changes: 52 additions & 20 deletions subworkflows/local/araregistration/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,69 @@
"content": [
{
"0": [
"TEST1_mask.mat:md5,d41d8cd98f00b204e9800998ecf8427e"
[
{
"id": "TEST1"
},
[
"TEST1_mask.mat:md5,d41d8cd98f00b204e9800998ecf8427e",
"reg_params.mat:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"1": [
"TEST1_registered.tif:md5,d41d8cd98f00b204e9800998ecf8427e"
[
{
"id": "TEST1"
},
[
"TEST1_registered.tif:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"2": [
"NM_variables.mat:md5,d41d8cd98f00b204e9800998ecf8427e"
[
{
"id": "TEST1"
},
"NM_variables.mat:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"3": [
"versions.yml:md5,2139e73f27b3197eed0d8d821f002fc8",
"versions.yml:md5,e131f0dbfdba4ab1ac28d4f59f91fc84"
],
"NM_variables": [
"NM_variables.mat:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"reg_mask": [
"TEST1_mask.mat:md5,d41d8cd98f00b204e9800998ecf8427e"
"NM_variable": [
[
{
"id": "TEST1"
},
"NM_variables.mat:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"registered": [
"TEST1_registered.tif:md5,d41d8cd98f00b204e9800998ecf8427e"
[
{
"id": "TEST1"
},
[
"TEST1_registered.tif:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"versions": [
"versions.yml:md5,2139e73f27b3197eed0d8d821f002fc8",
"versions.yml:md5,e131f0dbfdba4ab1ac28d4f59f91fc84"
"variables": [
[
{
"id": "TEST1"
},
[
"TEST1_mask.mat:md5,d41d8cd98f00b204e9800998ecf8427e",
"reg_params.mat:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
]
}
],
"timestamp": "2026-03-23T11:13:30.487550704",
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.6"
},
"timestamp": "2025-08-26T13:41:44.200641791"
"nf-test": "0.9.4",
"nextflow": "25.10.3"
}
}
}
Loading