Repository 'encyclopedia_fasta_to_prosit_csv'
hg clone https://toolshed.g2.bx.psu.edu/repos/galaxyp/encyclopedia_fasta_to_prosit_csv

Changeset 0:ca7a315fb902 (2020-09-14)
Next changeset 1:469da8c03202 (2021-04-08)
Commit message:
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/encyclopedia/tools/encyclopedia commit d94002fc79f552c8a64ffca86298396b1568df97"
added:
encyclopedia_fasta_to_prosit_csv.xml
macros.xml
static/images/SearchToLib_Workflow.png
b
diff -r 000000000000 -r ca7a315fb902 encyclopedia_fasta_to_prosit_csv.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/encyclopedia_fasta_to_prosit_csv.xml Mon Sep 14 17:05:51 2020 +0000
[
@@ -0,0 +1,62 @@
+<tool id="encyclopedia_fasta_to_prosit_csv" name="ConvertFastaToPrositCSV" version="@VERSION@.0" python_template_version="3.5">
+    <description>Create Prosit CSV Input From a Protein FASTA</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="aggressive"><![CDATA[
+        EncyclopeDIA -convert -fastatoprositcsv
+        -i '$i'
+        -numberOfThreadsUsed "\${GALAXY_SLOTS:-4}"
+        -minCharge $minCharge
+        -maxCharge $maxCharge
+        -defaultCharge $defaultCharge
+        -maxMissedCleavage $maxMissedCleavage
+        -minMz $minMz
+        -maxMz $maxMz
+        -defaultNCE $defaultNCE
+        #if $enzyme
+            -enzyme '$enzyme'
+        #end if
+        -o '$output'
+    ]]></command>
+    <inputs>
+        <param argument="-i" type="data" format="fasta" label="Protein Fasta database"/>
+        <param argument="-minCharge" type="integer" value="2" min="1" max="6" label="minCharge"/>
+        <param argument="-maxCharge" type="integer" value="3" min="1" max="6" label="maxCharge"/>
+        <param argument="-defaultCharge" type="integer" value="3" min="1" max="4" label="defaultCharge"/>
+        <param argument="-maxMissedCleavage" type="integer" value="1" min="0" max="3" label="maxMissedCleavage"/>
+        <param argument="-minMz" type="float" value="396.4" min="150.0" max="1600.0" label="minMz"/>
+        <param argument="-maxMz" type="float" value="1002.7" min="150.0" max="1600.0" label="maxMz"/>
+        <param argument="-defaultNCE" type="integer" value="33" min="25" max="40" label="Normalized Collision Energy"/>
+        <param argument="-enzyme" type="select" optional="true" label="Digestion Enzyme">
+            <option value="Trypsin">Trypsin</option>
+            <option value="Lys-C">Lys-C</option>
+            <option value="Lys-N">Lys-N</option>
+            <option value="Arg-C">Arg-C</option>
+            <option value="Glu-C">Glu-C</option>
+            <option value="CNBr">CNBr</option>
+            <option value="Chymotrypsin">Chymotrypsin</option>
+            <option value="Pepsin A">Pepsin A</option>
+            <option value="No Enzyme">No Enzyme</option>
+        </param>
+    </inputs>
+    <outputs>
+        <data name="output" format="csv" label="${i.name} Prosit_input.csv"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="i" ftype="fasta" value="YeastProteinFasta5.fasta"/>
+            <output name="output" ftype="csv">
+                <assert_contents>
+                    <has_text text="collision_energy"/>
+                    <has_text text="EDFFTVFDSLLR"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+        Create Prosit CSV From FASTA
+    ]]></help>
+    <expand macro="citations" />
+</tool>
b
diff -r 000000000000 -r ca7a315fb902 macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml Mon Sep 14 17:05:51 2020 +0000
[
b'@@ -0,0 +1,551 @@\n+<macros>\n+    <token name="@VERSION@">0.9.5</token>\n+    <xml name="requirements">\n+        <requirements>\n+            <requirement type="package" version="@VERSION@">encyclopedia</requirement>\n+            <yield/>\n+        </requirements>\n+    </xml>\n+\n+    <token name="@ENCYCLOPEDIA_WIKI@">\n+EncyclopeDIA_ is library search engine comprised of several algorithms for DIA data analysis and can search for peptides using either DDA-based spectrum libraries or DIA-based chromatogram libraries. See: https://bitbucket.org/searleb/encyclopedia/wiki/Home\n+\n+.. _EncyclopeDIA: https://bitbucket.org/searleb/encyclopedia/wiki/Home\n+    </token>\n+    <xml name="citations">\n+        <citations>\n+            <citation type="doi">10.1038/s41467-018-07454-w</citation>\n+            <citation type="doi">10.1038/s41467-020-15346-1</citation>\n+            <citation type="doi">10.1074/mcp.P119.001913</citation>\n+            <yield/>\n+        </citations>\n+    </xml>\n+\n+    <token name="@CMD_IMPORTS@">\n+#import re\n+#def identifier_or_name($input1)\n+    #if hasattr($input1, \'element_identifier\')\n+        #return $input1.element_identifier\n+    #else\n+        #return $input1.name\n+    #end if\n+#end def\n+#def clean($name1)\n+    #set $name_clean = $re.sub(\'[^\\w\\-_]\', \'_\', $re.sub(\'(?i)[.](fa|fasta|imzml|mzml)$\',\'\', $re.sub(\'.*/\',\'\', $name1.rstrip(\'.gz\'))))\n+    #return $name_clean\n+#end def\n+#def ln_name($ds) \n+    #set $ext = \'\'\n+    #if $ds.is_of_type(\'mzml\') or $ds.is_of_type(\'imzml\')\n+        #set $ext = ".mzML"\n+    #else if $ds.is_of_type(\'elib\')\n+        #set $ext = ".elib"\n+    #else if $ds.is_of_type(\'dlib\')\n+        #set $ext = ".dlib"\n+    #else if $ds.is_of_type(\'blib\')\n+        #set $ext = ".blib"\n+    #else if $ds.is_of_type(\'fasta\')\n+        #set $ext = ".fasta"\n+    #else if $ds.is_of_type(\'fasta.gz\')\n+        #set $ext = ".fasta.gz"\n+    #end if\n+    #set $name = "%s%s" % ($clean($identifier_or_name($ds)),$ext) \n+    #return $name\n+#end def\n+#set $i_name = None\n+#set $f_name = None\n+#set $l_name = None\n+#set $t_name = None\n+    </token>\n+\n+    <xml name="scan_input">\n+        <param name="scan_input" argument="-i" type="data" format="imzml,mzml" label="Spectrum file in mzML format"> \n+            <help>@MSCONVERT_RAW@</help>\n+        </param>\n+    </xml>\n+    <token name="@LINK_SCAN_INPUT@"><![CDATA[\n+    #set $i_name = $ln_name($scan_input)\n+    ln -s \'$scan_input\' \'$i_name\' &&\n+    ]]></token>\n+    <token name="@SCAN_INPUT@">\n+    -i \'$i_name\'\n+    </token>\n+\n+    <xml name="scan_inputs">\n+        <param name="scan_inputs" argument="-i" type="data" format="imzml,mzml" multiple="true" label="Spectrum files in  mzML format">\n+            <help>@MSCONVERT_RAW@</help>\n+        </param>\n+    </xml>\n+    <token name="@LINK_SCAN_INPUTS@"><![CDATA[\n+    #set $inputs_dir = \'inputs\'\n+    mkdir -p $inputs_dir &&\n+    #for $sf in $scan_inputs\n+      #set $i_name = $ln_name($sf)\n+      ln -s \'$sf\' \'${inputs_dir}/${i_name}\' &&\n+    #end for\n+    ]]></token>\n+    <token name="@SCAN_INPUTS@">\n+    -i \'$inputs_dir\'\n+    </token>\n+\n+    <xml name="fasta_input">\n+        <param name="fasta" argument="-f" type="data" format="fasta" label="Background proteome protein fasta database"> \n+            <help>provides the necessary peptide-to-protein links not specified in the spectrum library</help>\n+        </param>\n+    </xml>\n+    <token name="@LINK_FASTA_INPUT@"><![CDATA[\n+    #set $f_name = $ln_name($fasta)\n+    ln -s \'$fasta\' \'$f_name\' &&\n+    ]]></token>\n+    <token name="@FASTA_INPUT@">\n+    -f \'$f_name\'\n+    </token>\n+\n+    <xml name="target_fasta">\n+        <param name="target_fasta" argument="-t" type="data" format="fasta" label="Target fasta database" optional="true"> \n+            <help>Optional - Only analyze this subset of the background fasta proteome</help>\n+        </param>\n+        <param argument="-tp" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Target FASTA file contains peptides">\n+     '..b'  <param argument="-numberOfQuantitativePeaks" type="integer" value="3" min="1" max="10" label="numberOfQuantitativePeaks" optional="true"/>\n+<!--\n+                <param argument="-addDecoysToBackground" type="boolean" truevalue="true" falsevalue="false" checked="false" label="addDecoysToBackground"/>\n+                <param argument="-dontRunDecoys" type="boolean" truevalue="true" falsevalue="false" checked="false" label="dontRunDecoys"/>\n+-->\n+            </when>\n+        </conditional>\n+    </xml>\n+    <token name="@SEARCH_OPTIONS@">\n+    #if $options.search.set_search == \'yes\'\n+        -minCharge $options.search.minCharge\n+        -maxCharge $options.search.maxCharge\n+        -minLength $options.search.minLength\n+        -maxLength $options.search.maxLength\n+        -minEluteTime $options.search.minEluteTime\n+        -maxMissedCleavage $options.search.maxMissedCleavage\n+        -minQuantitativeIonNumber $options.search.minQuantitativeIonNumber\n+        -minNumOfQuantitativePeaks $options.search.minNumOfQuantitativePeaks\n+        -numberOfQuantitativePeaks $options.search.numberOfQuantitativePeaks\n+        ## -addDecoysToBackground $options.search.addDecoysToBackground\n+        ## -dontRunDecoys $options.search.dontRunDecoys\n+    #end if\n+    </token>\n+\n+    <xml name="options_section">\n+        <section name="options" title="Parameter Settings" expanded="false">\n+            <expand macro="common_options"/>\n+            <expand macro="mass_library_tolerance"/>\n+            <expand macro="percolator_options"/>\n+            <expand macro="peak_options"/>\n+            <expand macro="window_options"/>\n+            <expand macro="modification_options"/>\n+            <expand macro="search_options"/>\n+        </section>\n+    </xml>\n+\n+    <xml name="libexport">\n+        <param argument="-a" type="boolean" truevalue="true" falsevalue="false" checked="false" label="align between files"/>\n+    </xml>\n+\n+    <token name="@SEARCH2LIB_CMDS@"><![CDATA[\n+        @CMD_IMPORTS@\n+        @LINK_SCAN_INPUTS@\n+        @LINK_FASTA_INPUT@\n+        @LINK_TARGET_FASTA@\n+        @LINK_LIB_INPUT@\n+        for SCAN_FILE in `ls -1 inputs/*`; do\n+            echo "\\$SCAN_FILE" &&\n+            EncyclopeDIA -Djava.awt.headless=true -Duser.language=en-US -Duser.region=US\n+                -Xmx\\$[ \\${GALAXY_MEMORY_MB:-20480} / 1024 ]g\n+                -numberOfThreadsUsed "\\${GALAXY_SLOTS:-4}"\n+            #if not $library\n+                -walnut\n+            #end if\n+            -i \\$SCAN_FILE\n+            @FASTA_INPUT@\n+            @TARGET_FASTA@\n+            @LIB_INPUT@\n+            @COMMON_OPTIONS@\n+            @MASS_LIBRARY_TOLERANCE@\n+            @PERCOLATOR_OPTIONS@\n+            @PEAK_OPTIONS@\n+            @WINDOW_OPTIONS@\n+            @MODIFICATION_OPTIONS@\n+            @SEARCH_OPTIONS@ | tee -a search2lib.log\n+        ; done &&\n+        for TXT in `find inputs/*.mzML.[efw]*[ast].txt`; do TRGT=`echo \\$TXT | sed \'s/mzML/dia/\'`; ln -s \\$TXT \\$TRGT; done &&\n+        EncyclopeDIA -Djava.awt.headless=true -Duser.language=en-US -Duser.region=US -Xmx\\$[ \\${GALAXY_MEMORY_MB:-20480} / 1024 ]g -libexport\n+        #if not $library\n+            -pecan\n+        #end if\n+        @SCAN_INPUTS@\n+        @FASTA_INPUT@\n+        @TARGET_FASTA@\n+        @LIB_INPUT@\n+        -a $a\n+        -o chromatogram_library.elib\n+        && ls -l ./*.* inputs/*\n+        | tee -a search2lib.log\n+]]>\n+    </token>\n+    <token name="@MSCONVERT_CMD@"><![CDATA[\n+      msconvert  --zlib --64 --mzML --simAsSpectra --filter "peakPicking true 1-" --filter "demultiplex optimization=overlap_only" *.raw\n+]]>\n+    </token>\n+    <token name="@MSCONVERT_RAW@"><![CDATA[\n+mzML conversion from RAW requires special options: @MSCONVERT_CMD@\n+]]>\n+    </token>\n+    <token name="@MSCONVERT_HELP@"><![CDATA[\n+\n+    The MSConvert command can be used to convert and deconvolute DIA raw files to mzML format. You need to use these options:\n+\n+    ::\n+\n+      @MSCONVERT_CMD@\n+\n+]]>\n+    </token>\n+</macros>\n'
b
diff -r 000000000000 -r ca7a315fb902 static/images/SearchToLib_Workflow.png
b
Binary file static/images/SearchToLib_Workflow.png has changed