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

Changeset 0:0202b8f3a516 (2020-09-14)
Next changeset 1:6278dd24a860 (2021-04-08)
Commit message:
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/encyclopedia/tools/encyclopedia commit d94002fc79f552c8a64ffca86298396b1568df97"
added:
encyclopedia_library_to_blib.xml
macros.xml
static/images/SearchToLib_Workflow.png
b
diff -r 000000000000 -r 0202b8f3a516 encyclopedia_library_to_blib.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/encyclopedia_library_to_blib.xml Mon Sep 14 17:07:04 2020 +0000
[
@@ -0,0 +1,43 @@
+<tool id="encyclopedia_library_to_blib" name="ConvertLibraryToBlib" version="@VERSION@.0" python_template_version="3.5">
+    <description>Convert EncyclopeDIA Library to BLIB for Skyline</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="aggressive"><![CDATA[
+        EncyclopeDIA -convert -libtoblib
+            -Djava.awt.headless=true -Duser.language=en-US -Duser.region=US
+            -Xmx\$[ \${GALAXY_MEMORY_MB:-20480} / 1024 ]g
+            -numberOfThreadsUsed "\${GALAXY_SLOTS:-4}"
+        -i '$i'
+        -o '$output'
+        #if $istest == 'yes'
+        && sqlite3 -readonly '$output' 'SELECT distinct peptideSeq FROM RefSpectra;' > '$test_output'
+        #end if
+    ]]></command>
+    <inputs>
+        <param argument="-i" type="data" format="elib,dlib" label="Library: Chromatagram .ELIB or Spectrum .DLIB"/>
+        <param name="istest" type="hidden" value="no"/>
+    </inputs>
+    <outputs>
+        <data name="output" format="blib" label="${i.name} blib"/>
+        <data name="test_output" format="txt" >
+            <filter>istest == 'yes'</filter>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="i" ftype="dlib" value="PrositLib.dlib"/>
+            <param name="istest" value="yes"/>
+            <output name="test_output" ftype="txt">
+                <assert_contents>
+                    <has_text text="AGGVLHDDENLWSFGK"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+        Convert EncyclopeDIA Library to BLIB for Skyline.
+    ]]></help>
+    <expand macro="citations" />
+</tool>
b
diff -r 000000000000 -r 0202b8f3a516 macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml Mon Sep 14 17:07:04 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 0202b8f3a516 static/images/SearchToLib_Workflow.png
b
Binary file static/images/SearchToLib_Workflow.png has changed