Skip to content

Commit

Permalink
remove posterior_probabilities parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
ypriverol committed Nov 28, 2024
1 parent c23d530 commit 6a028a8
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
43 changes: 43 additions & 0 deletions modules/local/openms/extractpsmfeatures/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
process EXTRACTPSMFEATURES {
tag "$meta.mzml_id"
label 'process_very_low'
label 'process_single'
label 'openms'

conda "bioconda::openms-thirdparty=3.2.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/openms-thirdparty:3.2.0--h9ee0642_4' :
'biocontainers/openms-thirdparty:3.2.0--h9ee0642_4' }"

input:
tuple val(meta), path(id_file), path(extra_feat)

output:
tuple val(meta), path("${id_file.baseName}_feat.idXML"), emit: id_files_feat
path "versions.yml", emit: versions
path "*.log", emit: log

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.mzml_id}"

feature = ""
if (params.ms2rescore && params.id_only) {
feature = "-extra \$(awk 'NR > 1 && \$1 !~ /psm_file/ {printf \"%s \", \$2}' ${extra_feat})"
}

"""
PSMFeatureExtractor \\
-in ${id_file} \\
-out ${id_file.baseName}_feat.idXML \\
-threads $task.cpus \\
${feature} \\
$args \\
2>&1 | tee ${id_file.baseName}_extract_psm_feature.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
PSMFeatureExtractor: \$(PSMFeatureExtractor 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
}
40 changes: 40 additions & 0 deletions modules/local/openms/extractpsmfeatures/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: extracpsmfeatures
description: Computes extra features for each input PSM.
keywords:
- PSM
- feature
- OpenMS
tools:
- PSMFeatureExtractor:
description: |
Computes extra features for each input PSM.
homepage: https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/nightly/html/UTILS_PSMFeatureExtractor.html
documentation: https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/nightly/html/UTILS_PSMFeatureExtractor.html
input:
- meta:
type: map
description: Groovy Map containing sample information
- id_file:
type: file
description: |
Input idXML file containing the identifications.
pattern: "*.idXML"
output:
- meta:
type: map
description: Groovy Map containing sample information
- id_files_feat:
type: file
description: |
Output file in idXML format
pattern: "*.idXML"
- log:
type: file
description: log file
pattern: "*.log"
- version:
type: file
description: File containing software version
pattern: "versions.yml"
authors:
- "@daichengxin"

0 comments on commit 6a028a8

Please sign in to comment.