Mercurial > repos > jjohnson > peptideshaker
diff searchgui.xml @ 1:fa76abf69433 draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/peptideshaker commit e09348a0c372d4355c5dda6519e52ff17e0e8621-dirty
| author | jjohnson |
|---|---|
| date | Fri, 08 Jun 2018 15:58:53 -0400 |
| parents | 8b99cb00e1c4 |
| children | eea7e945f479 |
line wrap: on
line diff
--- a/searchgui.xml Tue May 15 14:50:35 2018 -0400 +++ b/searchgui.xml Fri Jun 08 15:58:53 2018 -0400 @@ -8,14 +8,13 @@ <requirements> <requirement type="package" version="@SEARCHGUI_VERSION@">searchgui</requirement> <requirement type="package" version="3.0">zip</requirement> - <requirement type="package">JQ</requirement> </requirements> <expand macro="stdio" /> <command> <![CDATA[ #from datetime import datetime #import json - #import os; + #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" @@ -27,7 +26,7 @@ export HOME=\$cwd; ## echo the search engines to run - echo "$search_engines_options.engines"; + echo '$search_engines_options.engines'; ##Create a searchgui.properties file for the version, which will be added to the searchgui_results if not already present echo "searchgui.version=@SEARCHGUI_VERSION@" >> searchgui.properties; @@ -36,54 +35,27 @@ #set $input_name = $mgf.display_name.split('/')[-1].replace(".mgf", "") + ".mgf" ln -s -f '${mgf}' '${input_name}'; #set $encoded_id = $__app__.security.encode_id($mgf.id) - echo "Spectrums:${mgf.display_name}(API:${encoded_id}) "; + echo 'Spectrums:${mgf.display_name}(API:${encoded_id}) '; #end for - - - ## Necessary for executing tests. The FASTA file has to be manually copied from the test-data folder to the working directory in order it can be found when using the PAR file. - cp '$__tool_directory__/test-data/searchgui_tinydb1_concatenated_target_decoy.fasta' "\$cwd/searchgui_tinydb1_concatenated_target_decoy.fasta"; - - - ## copy the input .par file to the working folder - cp "${input_par}" "\$cwd/SEARCHGUI_IdentificationParameters.par"; - echo "-.par source file:"; - echo "${input_par}"; + cp '${input_zip}' './input_par_fasta.zip'; + echo '-.zip source file:'; + echo '${input_zip}'; - ## (local) PAR file points to a FASTA file with .dat extension, which gives problems with many search engines. We should rename it to a .fasta file before passing it to SearchGUI - #set $par_target_path = "$cwd/SEARCHGUI_IdentificationParameters.par"; - echo "-.par target file:"; - echo $par_target_path; - - ## reading from the original .par file the path of the source .dat (fasta) file to be used - content_par_target_path=`cat $par_target_path`; - dat_path=`jq -r '.searchParameters.fastaFile.path' <<< "\$content_par_target_path"`; - echo "-.dat file path from target .par: "; - echo "\$dat_path"; - ## copy original .data fasta file to a local .fasta file - new_fasta_file_path="\$cwd/input_database.fasta"; - cp "\$dat_path" "\$new_fasta_file_path"; - echo "-new .fasta file path copied from source .dat file: "; - echo "\$new_fasta_file_path"; + ## Necessary for executing tests. Specific par files need to be uncompressed to be used by the tool. + jar xvf './input_par_fasta.zip' 'Identification_Parameters_default.par' 'searchgui_tinydb1_concatenated_target_decoy.fasta'; + jar xvf './input_par_fasta.zip' Identification_Parameters_specific.par searchgui_tinydb1_concatenated_target_decoy.fasta; + if [ -f ./Identification_Parameters_default.par ];then + mv ./Identification_Parameters_default.par ./SEARCHGUI_IdentificationParameters.par; + fi; + if [ -f ./Identification_Parameters_specific.par ];then + mv './Identification_Parameters_specific.par' './SEARCHGUI_IdentificationParameters.par'; + fi; - ## modifying the .par file!! - ## First we establish the new content for the path: .searchParameters.fastaFile.path - new_content_par_target_path=`jq '.searchParameters.fastaFile.path = \$newVal' --arg newVal "\$new_fasta_file_path" <<< "\$content_par_target_path"`; - ## Secondly, for .proteinInferencePreferences.proteinSequenceDatabase.path - new_content_par_target_path=`jq '.proteinInferencePreferences.proteinSequenceDatabase.path = \$newVal' --arg newVal "\$new_fasta_file_path" <<< "\$new_content_par_target_path"`; - - ## we generate a new .par file filled with the new fasta path. - #set $new_par_target_path = "$cwd/SEARCHGUI_IdentificationParameters_new.par"; - echo "\$new_content_par_target_path" >> $new_par_target_path; - echo "-new par target path: "; - echo $new_par_target_path; - - ## As PeptideShaker waits for "SEARCHGUI_IdentificationParameters.par" name, we overwrite the original file with the "_new" file - ##mv "\$cwd/SEARCHGUI_IdentificationParameters_new.par" "\$cwd/SEARCHGUI_IdentificationParameters.par" - rm $par_target_path; - mv $new_par_target_path $par_target_path; + ## By default we will always try to uncompress SEARCHGUI_IdentificationParameters.par and input_database.fasta + jar xvf './input_par_fasta.zip' SEARCHGUI_IdentificationParameters.par input_database.fasta; ################ @@ -94,7 +66,7 @@ -temp_folder `pwd` -spectrum_files \$cwd -output_folder \$cwd/output - -id_params $par_target_path + -id_params ./SEARCHGUI_IdentificationParameters.par -threads "\${GALAXY_SLOTS:-12}" @@ -194,8 +166,8 @@ ]]> </command> <inputs> - <param format="par" name="input_par" type="data" label="Identification Parameters file" - help="Select PAR file from history"/> + <param format="zip" name="input_zip" type="data" label="Identification Parameters and fasta file" + help="Select a zip file with Identification Parameters (.par) and a fasta file from history"/> <param name="peak_lists" format="mgf" type="data" multiple="true" label="Input Peak Lists (mgf)" help="Select appropriate MGF dataset(s) from history" /> @@ -258,16 +230,18 @@ <!-- Test that specifying non-default search engines works --> <test> <param name="peak_lists" value="searchgui_tinyspectra1.mgf"/> - <param name="input_par" value="Identification_Parameters_specific.par"/> + <!-- <param name="input_par" value="Identification_Parameters_specific.par"/>--> + <param name="input_zip" value="IdentificationParametersAndFastaSpecific.zip" ftype="zip" /> <param name="engines" value="X!Tandem,MSGF,MyriMatch,OMSSA,Comet"/> - <output name="output" file="tiny_searchgui_result1.zip" ftype="searchgui_archive" compare="sim_size" delta="30000" /> + <output name="searchgui_results" file="tiny_searchgui_result1.zip" ftype="searchgui_archive" compare="sim_size" delta="30000" /> </test> <!-- Test that search works with MSAmanda --> <test> <param name="peak_lists" value="searchgui_smallspectra.mgf"/> - <param name="input_par" value="Identification_Parameters_default.par"/> + <!-- <param name="input_par" value="Identification_Parameters_default.par"/>--> + <param name="input_zip" value="IdentificationParametersAndFastaDefault.zip" ftype="zip" /> <param name="engines" value="MS_Amanda"/> - <output name="output" file="smallsearch_result_amandaonly.zip" ftype="searchgui_archive" compare="sim_size" delta="5000" /> + <output name="searchgui_results" file="smallsearch_result_amandaonly.zip" ftype="searchgui_archive" compare="sim_size" delta="5000" /> </test> </tests>
