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
5 changes: 3 additions & 2 deletions subworkflows/local/dda_id.nf
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,9 @@ workflow DDA_ID {
//
ch_psmfdrcontrol = Channel.empty()
ch_consensus_results = Channel.empty()
if (params.search_engines.split(",").size() > 1) {
CONSENSUSID(ch_consensus_input.groupTuple(size: params.search_engines.split(",").size()))
// see comments in id.nf
if (params.search_engines.tokenize(",").unique().size() > 1) {
CONSENSUSID(ch_consensus_input.groupTuple(size: params.search_engines.tokenize(",").unique().size()))
ch_software_versions = ch_software_versions.mix(CONSENSUSID.out.versions.ifEmpty(null))
ch_psmfdrcontrol = CONSENSUSID.out.consensusids
ch_psmfdrcontrol
Expand Down
9 changes: 7 additions & 2 deletions subworkflows/local/id.nf
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ workflow ID {
//
ch_psmfdrcontrol = Channel.empty()
ch_consensus_results = Channel.empty()
if (params.search_engines.split(",").size() > 1) {
CONSENSUSID(PSMRESCORING.out.results.groupTuple(size: params.search_engines.split(",").size()))
// split returns String[], whereas tokenize returns a list, unique works on lists
def n_unique_search_engines = params.search_engines.tokenize(",").unique().size()
if (n_unique_search_engines > 1) {
// 'remainder: true' will keep remainders which do not match the specified size
// if the 'size' is not matched, an empty channel will be returned and
// nothing will be run for the 'CONSENSUSID' process
CONSENSUSID(PSMRESCORING.out.results.groupTuple(size: n_unique_search_engines))
ch_software_versions = ch_software_versions.mix(CONSENSUSID.out.versions.ifEmpty(null))
ch_psmfdrcontrol = CONSENSUSID.out.consensusids
ch_consensus_results = CONSENSUSID.out.consensusids
Expand Down
8 changes: 8 additions & 0 deletions workflows/quantms.nf
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ workflow QUANTMS {
ch_versions = ch_versions.mix(DECOYDATABASE.out.versions.ifEmpty(null))
}

// Check that there is no duplicated search engines
if (params.search_engines) {
search_engines = params.search_engines.tokenize(',')
if (search_engines.size() != search_engines.unique().size()) {
error( "Duplicated search engines in the search_engines parameter: ${params.search_engines}" )
}
}

// Only performing id_only subworkflows .
if (params.id_only) {
DDA_ID( FILE_PREPARATION.out.results, ch_searchengine_in_db, FILE_PREPARATION.out.spectrum_data, CREATE_INPUT_CHANNEL.out.ch_expdesign)
Expand Down