Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
daichengxin committed Aug 15, 2024
1 parent 2efeed3 commit 3cccdc2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/local/spectrum2features/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ process SPECTRUM2FEATURES {
'biocontainers/quantms-utils:0.0.7--pyhdfd78af_0' }"

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

output:
tuple val(meta), path("${id_file.baseName}_snr.idXML"), emit: id_files_snr
Expand All @@ -20,7 +20,7 @@ process SPECTRUM2FEATURES {
def prefix = task.ext.prefix ?: "${meta.mzml_id}"

"""
quantmsutilsc spectrum2feature --ms_path "${ms_path}" --idxml "${id_file}" --output "${id_file.baseName}_snr.idXML" 2>&1 | tee add_snr_feature.log
quantmsutilsc spectrum2feature --ms_path "${ms_file}" --idxml "${id_file}" --output "${id_file.baseName}_snr.idXML" 2>&1 | tee add_snr_feature.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
8 changes: 8 additions & 0 deletions subworkflows/local/psmrescoring.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ include { GETSAMPLE } from '../../modules/local/extract_sam
include { SAGEFEATURE } from '../../modules/local/add_sage_feat/main'
include { IDMERGER } from '../../modules/local/openms/idmerger/main'
include { IDRIPPER } from '../../modules/local/openms/idripper/main'
include { SPECTRUM2FEATURES } from '../../modules/local/spectrum2features/main'

workflow PSMRESCORING {
take:
Expand Down Expand Up @@ -52,6 +53,13 @@ workflow PSMRESCORING {
ch_software_versions = ch_software_versions.mix(EXTRACTPSMFEATURES.out.version)
}

// Add SNR features to percolator
if (params.add_snr_feature_percolator) {
SPECTRUM2FEATURES(ch_id_files_feats.combine(ch_file_preparation_results, by: 0))
ch_id_files_feats = SPECTRUM2FEATURES.out.id_files_snr
ch_software_versions = ch_software_versions.mix(SPECTRUM2FEATURES.out.version)
}

// Rescoring for independent run, Sample or whole experiments
if (params.rescore_range == "independent_run") {
PERCOLATOR(ch_id_files_feats)
Expand Down

0 comments on commit 3cccdc2

Please sign in to comment.