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
2 changes: 1 addition & 1 deletion modules/local/datamash_histogram.nf
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ process DATAMASH_HISTOGRAM {
"""

stub:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"

"""
touch ${prefix}_binned.tsv

Expand Down
1 change: 0 additions & 1 deletion modules/local/easypqp/library.nf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ process EASYPQP_LIBRARY {
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

"""
Expand Down
1 change: 0 additions & 1 deletion modules/local/ms2rescore.nf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ process MS2RESCORE {
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}_ms2rescore"

"""
Expand Down
41 changes: 20 additions & 21 deletions modules/local/openms_featurefinderidentification.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,32 @@ process OPENMS_FEATUREFINDERIDENTIFICATION {
tuple val(meta), path(mzml), path(id_int), path(id_ext)

output:
tuple val(meta), path("*.featureXML"), emit: featurexml
path "versions.yml" , emit: versions
tuple val(meta), path("*.featureXML"), emit: featurexml
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
task.ext.when == null || task.ext.when

script:
def prefix = task.ext.prefix ?: "${meta.id}_${meta.sample}_${meta.condition}"
def args = task.ext.args ?: ''
def quant_fdr = params.quantification_fdr ? "-id $id_int -id_ext $id_ext -svm:min_prob ${params.quantification_min_prob}" : "-id $id_ext"
args = args + " $quant_fdr"

"""
FeatureFinderIdentification -in $mzml \\
-out ${prefix}.featureXML \\
-threads $task.cpus \\
$args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""
def prefix = task.ext.prefix ?: "${meta.id}_${meta.sample}_${meta.condition}"
def args = task.ext.args ?: ''
def quant_fdr = params.quantification_fdr ? "-id $id_int -id_ext $id_ext -svm:min_prob ${params.quantification_min_prob}" : "-id $id_ext"
args = args + " $quant_fdr"

"""
FeatureFinderIdentification -in $mzml \\
-out ${prefix}.featureXML \\
-threads $task.cpus \\
$args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}_${meta.sample}_${meta.condition}"
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}_${meta.sample}_${meta.condition}"

"""
touch ${prefix}.featureXML
Expand Down
44 changes: 22 additions & 22 deletions modules/local/openms_featurelinkerunlabeledkd.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,38 @@ process OPENMS_FEATURELINKERUNLABELEDKD {
'biocontainers/openms-thirdparty:3.3.0--h9ee0642_8' }"

input:
tuple val(meta), path(features)
tuple val(meta), path(features)

output:
tuple val(meta), path("*.consensusXML"), emit: consensusxml
path "versions.yml" , emit: versions
tuple val(meta), path("*.consensusXML"), emit: consensusxml
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
task.ext.when == null || task.ext.when

script:
def prefix = task.ext.prefix ?: "${meta.id}_all_features_merged"
def prefix = task.ext.prefix ?: "${meta.id}_all_features_merged"

"""
FeatureLinkerUnlabeledKD -in $features \\
-out ${prefix}.consensusXML \\
-threads $task.cpus
"""
FeatureLinkerUnlabeledKD -in $features \\
-out ${prefix}.consensusXML \\
-threads $task.cpus

cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms-thirdparty: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""
cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms-thirdparty: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}_all_features_merged"
def prefix = task.ext.prefix ?: "${meta.id}_all_features_merged"

"""
touch ${prefix}.consensusXML
"""
touch ${prefix}.consensusXML

cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms-thirdparty: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""
cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms-thirdparty: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""
}
45 changes: 23 additions & 22 deletions modules/local/openms_idconflictresolver.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,39 @@ process OPENMS_IDCONFLICTRESOLVER {
'biocontainers/openms:3.3.0--h0656172_8' }"

input:
tuple val(meta), path(consensus)
tuple val(meta), path(consensus)

output:
tuple val(meta), path("*.consensusXML"), emit: consensusxml
path "versions.yml" , emit: versions
tuple val(meta), path("*.consensusXML"), emit: consensusxml
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
task.ext.when == null || task.ext.when

script:
def prefix = task.ext.prefix ?: "${meta.id}_resolved"
def prefix = task.ext.prefix ?: "${meta.id}_resolved"

"""
IDConflictResolver -in $consensus \\
-out ${prefix}.consensusXML \\
-threads $task.cpus
"""
IDConflictResolver \\
-in $consensus \\
-out ${prefix}.consensusXML \\
-threads $task.cpus

cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""
cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}_resolved"
def prefix = task.ext.prefix ?: "${meta.id}_resolved"

"""
touch ${prefix}.consensusXML
"""
touch ${prefix}.consensusXML

cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""
cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""
}
53 changes: 26 additions & 27 deletions modules/local/openms_mapaligneridentification.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,40 @@ process OPENMS_MAPALIGNERIDENTIFICATION {
'biocontainers/openms:3.3.0--h0656172_8' }"

input:
tuple val(meta), path(idxmls)
tuple val(meta), path(idxmls)

output:
tuple val(meta), path("*.trafoXML"), emit: trafoxml
path "versions.yml" , emit: versions
tuple val(meta), path("*.trafoXML"), emit: trafoxml
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
task.ext.when == null || task.ext.when

script:
def out_names = idxmls.collect { it.baseName.replace('_fdr_filtered','')+'.trafoXML' }.join(' ')
def args = task.ext.args ?: ''
def args = task.ext.args ?: ''
def out_names = idxmls.collect { it.baseName.replace('_fdr_filtered','')+'.trafoXML' }.join(' ')

"""
MapAlignerIdentification -in $idxmls \\
-trafo_out ${out_names} \\
$args
"""
MapAlignerIdentification \\
-in $idxmls \\
-trafo_out ${out_names} \\
$args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""
cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""

stub:
def out_names = idxmls.collect { it.baseName.replace('_fdr_filtered','')+'.trafoXML' }.join(' ')
def args = task.ext.args ?: ''

"""
touch test1.consensusXML
touch test2.consensusXML

cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""

"""
touch test1.consensusXML
touch test2.consensusXML

cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""
}
57 changes: 30 additions & 27 deletions modules/local/openms_maprttransformer.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,44 @@ process OPENMS_MAPRTTRANSFORMER {
'biocontainers/openms:3.3.0--h0656172_8' }"

input:
tuple val(meta), path(alignment_file), path(trafoxml)
tuple val(meta), path(alignment_file), path(trafoxml)

output:
tuple val(meta), path("*_aligned.*"), emit: aligned
path "versions.yml" , emit: versions
tuple val(meta), path("*_aligned.*"), emit: aligned
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
task.ext.when == null || task.ext.when

script:
def prefix = task.ext.prefix ?: "${meta.id}"
def fileExt = alignment_file.collect { it.name.tokenize("\\.")[1] }.join(' ')

"""
MapRTTransformer -in $alignment_file \\
-trafo_in $trafoxml \\
-out ${prefix}.${fileExt} \\
-threads $task.cpus

cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def fileExt = alignment_file.collect { it.name.tokenize("\\.")[1] }.join(' ')

"""
MapRTTransformer \\
-in $alignment_file \\
-trafo_in $trafoxml \\
-out ${prefix}.${fileExt} \\
-threads $task.cpus \\
$args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def fileExt = alignment_file.collect { it.name.tokenize("\\.")[1] }.join(' ')
def prefix = task.ext.prefix ?: "${meta.id}"
def fileExt = alignment_file.collect { it.name.tokenize("\\.")[1] }.join(' ')

"""
touch ${prefix}.${fileExt}
"""
touch ${prefix}.${fileExt}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""
cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""
}
Loading