changeset 57:da885ca16cb2 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/peptideshaker commit 44a20633e04b2396fad4b568904a257769b2bbc1"
author galaxyp
date Tue, 16 Mar 2021 15:12:03 +0000
parents 1beff3ddce58
children 07ff622ec007
files fasta_cli.xml ident_params.xml macros_basic.xml peptide_shaker.xml searchgui.xml
diffstat 5 files changed, 53 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/fasta_cli.xml	Wed Jan 20 13:29:07 2021 +0000
+++ b/fasta_cli.xml	Tue Mar 16 15:12:03 2021 +0000
@@ -1,4 +1,8 @@
-<tool id="fasta_cli" name="FastaCLI" version="1.0.1">
+<tool id="fasta_cli"
+      name="FastaCLI"
+      version="1.0.1"
+      profile="20.01"
+>
     <description>
         Appends decoy sequences to FASTA files
     </description>
@@ -11,7 +15,6 @@
     <expand macro="stdio" />
     <command>
 <![CDATA[
-        #set $temp_stderr = "fasta_cli_stderr"
         #set $output_db_name = $input_database.display_name.replace(".fasta", "") + $database_processing_options.decoy_file_tag.value + ".fasta"
 
         mkdir output &&
@@ -25,9 +28,8 @@
         ###########################################
 
         echo 'Creating decoy database.' &&
-        searchgui -Djava.awt.headless=true eu.isas.searchgui.cmd.FastaCLI --exec_dir="./bin/" -temp_folder `pwd` -in '${input_database.display_name}' -decoy -decoy_flag $database_processing_options.decoy_tag -suffix $database_processing_options.decoy_type -decoy_suffix $database_processing_options.decoy_file_tag 2>> $temp_stderr &&
-        mv '${output_db_name}' output &&
-        cat $temp_stderr 2>&1;
+        searchgui -Djava.awt.headless=true eu.isas.searchgui.cmd.FastaCLI --exec_dir="./bin/" -temp_folder `pwd` -in '${input_database.display_name}' -decoy -decoy_flag $database_processing_options.decoy_tag -suffix $database_processing_options.decoy_type -decoy_suffix $database_processing_options.decoy_file_tag &&
+        mv '${output_db_name}' output
 ]]>
     </command>
     <inputs>
--- a/ident_params.xml	Wed Jan 20 13:29:07 2021 +0000
+++ b/ident_params.xml	Tue Mar 16 15:12:03 2021 +0000
@@ -1,4 +1,8 @@
-<tool id="ident_params" name="Identification Parameters" version="1.5.1">
+<tool id="ident_params"
+      name="Identification Parameters"
+      version="1.5.1"
+      profile="20.01"
+>
     <description>
         Sets the identification parameters to be used in SearchGUI and PeptideShaker apps
     </description>
@@ -12,7 +16,6 @@
     <expand macro="stdio" />
     <command>
 <![CDATA[
-        #set $temp_stderr = "searchgui_stderr"
         #set $bin_dir = "bin"
 
         mkdir output;
@@ -20,13 +23,12 @@
         export HOME=\$cwd;
 
 
-        echo "" > $temp_stderr &&
 
         echo 'running Identification Parameters CLI' &&
         #####################################################
         ## generate IdentificationParameters for SearchGUI ##
         #####################################################
-        (searchgui eu.isas.searchgui.cmd.IdentificationParametersCLI
+        searchgui eu.isas.searchgui.cmd.IdentificationParametersCLI
             --exec_dir="./bin/"
             -out './IdentificationParametersOutput.par'
 
@@ -614,10 +616,6 @@
             #end if
                 -fasta_target_decoy 0
                 -fasta_decoy_file_tag $advanced_options.database_processing_options.decoy_file_tag
-
-        2> $temp_stderr) &&
-
-        cat $temp_stderr 2>&1;
 ]]>
     </command>
     <inputs>
--- a/macros_basic.xml	Wed Jan 20 13:29:07 2021 +0000
+++ b/macros_basic.xml	Tue Mar 16 15:12:03 2021 +0000
@@ -2,17 +2,18 @@
     <xml name="stdio">
         <stdio>
             <exit_code range="1:" level="fatal" description="Job Failed" />
+            <regex match="OutOfMemoryError" level="fatal_oom" description="Out of memory"/>
             <regex match="java.*Exception" level="fatal" description="Java Exception"/>
-            <regex match="Could not reserve enough space for * object heap" level="fatal" description="Out of memory"/>
+            <regex match="Could not reserve enough space for * object heap" level="fatal_oom" description="Out of memory"/>
             <regex match="Could not create the Java virtual machine" level="fatal" description="JVM Error"/>
-            <regex match="PeptideShaker ran out of memory" level="fatal" description="JVM Error"/>
+            <regex match="PeptideShaker ran out of memory" level="fatal_oom" description="JVM Error"/>
             <regex match="CompomicsError" level="fatal" description="Compomics Error"/>
         </stdio>
     </xml>
     <token name="@SEARCHGUI_MAJOR_VERSION@">4</token>
-    <token name="@SEARCHGUI_VERSION@">4.0.12</token>
+    <token name="@SEARCHGUI_VERSION@">4.0.22</token>
     <token name="@SEARCHGUI_VERSION_SUFFIX@">0</token>
-    <token name="@PEPTIDESHAKER_VERSION@">2.0.9</token>
+    <token name="@PEPTIDESHAKER_VERSION@">2.0.15</token>
     <token name="@PEPTIDESHAKER_VERSION_SUFFIX@">0</token>
     <xml name="citations">
         <citations>
--- a/peptide_shaker.xml	Wed Jan 20 13:29:07 2021 +0000
+++ b/peptide_shaker.xml	Tue Mar 16 15:12:03 2021 +0000
@@ -1,4 +1,9 @@
-<tool id="peptide_shaker" name="Peptide Shaker" version="@PEPTIDESHAKER_VERSION@+galaxy@PEPTIDESHAKER_VERSION_SUFFIX@">
+<tool id="peptide_shaker"
+      name="Peptide Shaker"
+      version="@PEPTIDESHAKER_VERSION@+galaxy@PEPTIDESHAKER_VERSION_SUFFIX@"
+      profile="20.01"
+>
+
     <description>
         Perform protein identification using various search engines based on results from SearchGUI
     </description>
@@ -11,22 +16,23 @@
         <requirement type="package">unzip</requirement>
     </requirements>
     <expand macro="stdio" />
-
-    <command><![CDATA[
-    ## When supporting more advanced Galaxy versions:    command use_shared_home="false"
+    <!-- TODO: check trap comment.
+    <command use_shared_home="false">
+-->
+    <command>
+<![CDATA[
         #from datetime import datetime
         #set $exp_str = "Galaxy_Experiment_%s" % datetime.now().strftime("%Y%m%d%H%M%s")
         #set $samp_str = "Sample_%s" % datetime.now().strftime("%Y%m%d%H%M%s")
-        #set $temp_stderr = "peptideshaker_stderr"
         #set $bin_dir = "bin"
         #set $exporting_followup_boolean = False
+        ## TODO: Re-enable again when solving writing paths.txt to user-related folders and non-existing exportFactory.json file.
+        ## trap ">&2 cat resources/*.log" EXIT;
 
         mkdir output_reports &&
         cwd=`pwd` &&
         export HOME=\$cwd &&
 
-        echo "" > $temp_stderr &&
-
         ln -s '$searchgui_input' searchgui_input.zip &&
 
         ## OPTIONAL MAIN PARAMETERS
@@ -64,7 +70,7 @@
         ######################
         ## PeptideShakerCLI ##
         ######################
-        (peptide-shaker -Djava.awt.headless=true eu.isas.peptideshaker.cmd.PeptideShakerCLI
+        peptide-shaker -Djava.awt.headless=true eu.isas.peptideshaker.cmd.PeptideShakerCLI
             -gui 0
             -temp_folder \$cwd/PeptideShakerCLI
             -log \$cwd/resources
@@ -182,8 +188,6 @@
             #end if
         #end if
 
-        2>> $temp_stderr)
-
         ## If the user chose to zip the results but also export reports out of the zip, we have to unzip them
         #if $exporting_options.zip_conditional.zip_output_boolean == 'zip' and $exporting_options.zip_conditional.export_reports_when_zip and (len(output_reports_list)>0 or $exporting_followup_boolean):
             ## This unzipping command creates a reports folder into the current folder!
@@ -238,6 +242,10 @@
             #if '11' in $output_reports_list:
                 && find \$cwd/output_reports -name '*Extended_PSM_Report.txt' -exec bash -c 'mv "$0" "psmx.txt"' {} \;
             #end if
+            ## the last ; is removed from the generated command line
+            ## thus we need to make sure that the above `find ... -exec ... \;`
+            ## is not the last command
+            && true
         #end if
 
         ## Moving followup analysis to the root folder (it is necessary if zip option was not chosen, or it was chosen but also exporting out of the zip)
@@ -259,7 +267,6 @@
                 && mv \$cwd/output_reports/inclusion_list.txt \$cwd/inclusion_list.txt
             #end if
         #end if
-        && cat $temp_stderr 2>&1;
 ]]>
     </command>
     <inputs>
@@ -626,7 +633,6 @@
                       <has_line_matching expression="520.9862671 4666.4399414063"/>
                       <has_line_matching expression="267.4349976 50.7710571289"/>
                       <has_line_matching expression="665.7418213 3.8165459633"/>
-                      <has_line_matching expression="672.2329102 146.2656707764"/>
                       <has_line_matching expression="634.7792969 2367.6374511719"/>
                   </assert_contents>
               </element>
--- a/searchgui.xml	Wed Jan 20 13:29:07 2021 +0000
+++ b/searchgui.xml	Tue Mar 16 15:12:03 2021 +0000
@@ -1,4 +1,8 @@
-<tool id="search_gui" name="Search GUI" version="@SEARCHGUI_VERSION@+galaxy@SEARCHGUI_VERSION_SUFFIX@">
+<tool id="search_gui"
+      name="Search GUI"
+      version="@SEARCHGUI_VERSION@+galaxy@SEARCHGUI_VERSION_SUFFIX@"
+      profile="20.01"
+>
     <description>
         Perform protein identification using various search engines and prepare results for input to Peptide Shaker
     </description>
@@ -11,24 +15,24 @@
     </requirements>
     <expand macro="stdio" />
     <command use_shared_home="false">
+
 <![CDATA[
         #from datetime import datetime
         #import json
         #import os
         #set $exp_str = "Galaxy_Experiment_%s" % datetime.now().strftime("%Y%m%d%H%M%s")
         #set $samp_str = "Sample_%s" % datetime.now().strftime("%Y%m%d%H%M%s")
-        #set $temp_stderr = "searchgui_stderr"
         #set $bin_dir = "bin"
 
         mkdir output;
         mkdir output_reports;
         mkdir temp_folder;
         mkdir log_folder;
+        trap ">&2 cat log_folder/*.log" EXIT;
+
         cwd=`pwd`;
         export HOME=\$cwd;
 
-        echo "" > $temp_stderr &&
-
         ## echo the search engines to run (single quotes important because X!Tandem)
         echo '$search_engines_options.engines';
         echo 'DB: ${input_fasta_file.element_identifier} sequences: ${input_fasta_file.metadata.sequences}';
@@ -59,7 +63,7 @@
         ## Search CLI ##
         ################
         echo 'running search gui' &&
-        (searchgui -Djava.awt.headless=true eu.isas.searchgui.cmd.SearchCLI
+        searchgui -Djava.awt.headless=true eu.isas.searchgui.cmd.SearchCLI
             --exec_dir="\$cwd/${bin_dir}"
             -spectrum_files \$cwd
             -fasta_file "\$cwd/input_fasta_file.fasta"
@@ -150,17 +154,17 @@
             ## mgf and database in output
             -output_data 1
 
-        2>> $temp_stderr)
+        &&
+
+        echo '>log_folder:' &&
+
+        ls -l \$cwd/log_folder &&
+
+        mv output/searchgui_out.zip searchgui_out.zip
 
         &&
 
-        (mv output/searchgui_out.zip searchgui_out.zip 2>> $temp_stderr)
-
-        &&
-
-        (zip -u searchgui_out.zip searchgui.properties 2>> $temp_stderr);
-
-        cat $temp_stderr 2>&1;
+        zip -u searchgui_out.zip searchgui.properties
 ]]>
     </command>
     <inputs>