Skip to content

Commit

Permalink
Crash early with message when not all sets are in the total proteome …
Browse files Browse the repository at this point in the history
…PSMs table
  • Loading branch information
glormph committed Jan 31, 2025
1 parent 1de5c7a commit 3f423a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,14 @@ process splitTotalProteomePSMs {
tuple path('tppsms_in'), val(setnames)

output:
path({listify(setnames).collect() { "tppsms/${it}.tsv" }}), emit: totalprotpsms_allsets optional true
path({listify(setnames).collect() { "tppsms/${it}.tsv" }}) optional true

script:
"""
mkdir tppsms && msstitch split -i tppsms_in -d tppsms --splitcol bioset
${listify(setnames).collect { set -> "[ -e 'tppsms/${set}.tsv' ] || (\
echo Not all sets in the experiment are in the --totalproteomepsms table, \
we need: ${listify(setnames).join(', ')}. The total proteome PSM table contains: \$(ls tppsms) && exit 1)" }.join( '&&')}
"""
}

Expand Down

0 comments on commit 3f423a1

Please sign in to comment.