diff bank_inhouse.xml @ 0:be582bcd6585 draft

Master branch Updating - - Fxx
author fgiacomoni
date Thu, 04 Oct 2018 10:37:14 -0400
parents
children 52798007c6b2
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bank_inhouse.xml	Thu Oct 04 10:37:14 2018 -0400
@@ -0,0 +1,446 @@
+<tool id="bank_inhouse" name="bank_inhouse" version="1.1.3">
+  <description>
+        search by accurate mass (and by Retention time) on a local bank
+  </description>
+  
+  <requirements>
+  	<requirement type="package" version="2.90">perl-json</requirement>
+  	<requirement type="package" version="1.97">perl-text-csv</requirement>
+  	<requirement type="package" version="6.15">perl-lwp-simple</requirement>
+  	<requirement type="package" version="1.74">perl-uri</requirement>
+  	<requirement type="package" version="1.19">perl-soap-lite</requirement>
+  	<requirement type="package" version="2.97">perl-html-template</requirement>
+  	<requirement type="package" version="0.428">perl-list-moreutils</requirement>
+  	<requirement type="package" version="6.15">perl-libwww-perl</requirement>
+  </requirements>
+  <stdio>
+      <exit_code range="1" level="fatal" />
+  </stdio>
+  
+   <command><![CDATA[
+      perl $__tool_directory__/bank_inhouse.pl
+      
+      #if str($input_type.choice) == "YES":
+         -input "${input_type.variableMetadata_in}"
+         #if str($input_type.header.header_choice) == "YES":
+             -nbheader "${input_type.header.nbheader}"
+         #end if
+         
+         -colmass "${input_type.colmass}"
+         #if str($input_type.use_file_rt.rt_file_choice) == "YES":
+             -colrt "${input_type.use_file_rt.colrt}"
+             -rt_delta "${input_type.use_file_rt.rt_file_delta}"
+         #end if
+      #else:
+         #if str($input_type.use_rt.rt_choice) == "YES":
+             -rt "${input_type.use_rt.rt}"
+             -rt_delta "${input_type.use_rt.rt_delta}"
+         #end if
+         -masse "${input_type.masse}"
+      #end if
+      
+      -mz_delta "${mz_delta_type.mz_delta}"
+      -mass_delta "${mz_delta_type.mass_delta}"
+
+      #if str($bank_type.perso_bank) == "YES":
+         -bank_in "${bank_type.bank_in}" -bank_name "${bank_type.bank_in.name}"
+         -mzdb "${bank_type.mzdb}"
+         #if str($bank_type.bank_rt.bank_rt_choice) == "YES":
+             -rtdb "${bank_type.bank_rt.rtdb}"
+         #end if
+      #end if
+
+      #if str($input_type.choice) == "YES":
+          -outputTab "$variableMetadata_out"
+          -outputXls "$bankInhouseResXls_filein"
+          #if str($outfiles) == "YES":
+            -outputFull "$variableMetadata_full_out"
+          #end if
+      #else:
+          -outputXls "$bankInhouseResXls_manualin"
+      #end if
+      
+      #if str($outfiles) == "YES":
+        -outputJson "$Json"
+      #end if
+  ]]></command>
+  
+  <inputs>
+      <conditional name="input_type">
+        <param name="choice" type="select" display="radio" label="* Would you use a file?" help="if 'NO' is selected then one or more mass(es) must be entered manually">
+          <option value="NO">NO</option>
+          <option value="YES" selected="true">YES</option>
+        </param>
+        <when value="YES">
+          <param name="variableMetadata_in" type="data" label="FILE OF MASSES (format: tabular)" help="Generally variable metadata file" format="tabular" />
+          
+          <conditional name="header">
+            <param name="header_choice" type="boolean" checked="true" truevalue="YES" falsevalue="NO" label="Do you have a header?" help="if 'YES' is selected then enter your number of header lines" />
+            <when value="YES">
+              <param name="nbheader" type="integer" label="Number of header lines" value="1" min="1" max="10" help="number of lines not containing masses"/>
+            </when>
+            <when value="NO"/>
+          </conditional>
+          
+          <conditional name="use_file_rt">
+            <param name="rt_file_choice" type="boolean" checked="true" truevalue="YES" falsevalue="NO" label="Would you use retention time (RT)?" help="Do you have retention times in your bank? In your analyzed file? Would you use it?" />
+            <when value="YES">
+              <param name="colrt" label="Column of retention time (RT)" type="data_column" data_ref="variableMetadata_in" accept_default="true" />
+              <param name="rt_file_delta" label="Delta of retention time (RT) (in minutes)" type="float" value="0.1" min="0" max="60" help="Default value is 0.1min"/>
+            </when>
+            <when value="NO"/>
+          </conditional>
+          
+          <param name="colmass" label="Column of masses (MZ)" type="data_column" data_ref="variableMetadata_in" accept_default="true" />
+        </when>
+        <when value="NO">
+          <conditional name="use_rt">
+            <param name="rt_choice" type="boolean" checked="true" truevalue="YES" falsevalue="NO" label="Would you use retention time (RT)?" help="Do you have retention times in your bank? Would you use it?" />
+            <when value="YES">
+              <param name="rt" label="retention time (RT) to submit" type="text" size="10" help="For a rt list, writes : rt1 rt2 rt3. Your values ​​must be separated by spaces. You should use dot (.) like decimal separator"/>
+              <param name="rt_delta" label="Delta of retention time (RT) (in minutes)" type="float" value="0.1" min="0" max="60" help="Default value is 0.1min"/>
+            </when>
+            <when value="NO"/>
+          </conditional>
+          
+          <param name="masse" type="text" label="Mass (MZ) to submit"  size="20" help="For a masses list, writes : m1 m2 m3. Your values ​​must be separated by spaces. You should use dot (.) like decimal separator"/>
+        </when>
+      </conditional>
+      
+      <conditional name="mz_delta_type">
+        <param name="mz_delta" label="Delta type" type="select"  display="radio" help="">
+          <option value="Da">Da</option>
+          <option value="ppm">ppm</option>
+        </param>
+        <when value="Da">
+          <param name="mass_delta" label="Delta of mass (MZ) (in Dalton)" type="float" value="0.005" min="0" max="3000" help="Default value is 0.005 Da"/>
+        </when>
+        <when value="ppm">
+          <param name="mass_delta" label="Delta of mass (MZ) (in ppm)" type="float" value="5" min="0" max="300000" help="Default value is 5 ppm"/>
+        </when>
+      </conditional>
+      
+      <conditional name="bank_type">
+         <param name="perso_bank" type="boolean" checked="true" truevalue="YES" falsevalue="NO" label="* Use personal data bank?" help="if 'NO' is selected an internal file will be used! It doesn't contain a retention time (RT)" />
+         <when value="YES">
+            <param name="bank_in" type="data" label="BANK FILE" help="" format="tabular" />
+            <param name="mzdb" label="Column of masses (MZ) in Bank file" type="data_column" data_ref="bank_in" accept_default="true" />
+            <conditional name="bank_rt">
+              <param name="bank_rt_choice" type="boolean" checked="true" truevalue="YES" falsevalue="NO" label="Have you used the retention time (RT) for your input data?" help="Do you have retention times in your bank? In your analyzed data? Would you use it?" />
+              <when value="YES">
+                <param name="rtdb" label="Column of retention time (RT) in Bank file" type="data_column" data_ref="bank_in" accept_default="true" />
+              </when>
+              <when value="NO"/>
+            </conditional>
+         </when>
+         <when value="NO"/>
+    </conditional>
+    <param name="outfiles" type="select" label="* Would you more output?" display="radio" help="if 'YES' is selected then 2 more files will be generate (JSON + variableMetadata and bank full column)">
+        <option value="YES">YES</option>
+        <option value="NO" selected="true">NO</option>
+    </param>
+  </inputs>
+  
+  <outputs>
+    <data name="variableMetadata_out" format="tabular" label="${tool.name}_${input_type.variableMetadata_in.name}_TSV" >
+      <filter>(input_type['choice'] == 'YES')</filter>
+    </data>
+    <data name="bankInhouseResXls_filein" format="tabular" label="${tool.name}_${input_type.variableMetadata_in.name}_XLS" >
+      <filter>(input_type['choice'] == 'YES')</filter>
+    </data>
+    <data name="variableMetadata_full_out" format="tabular" label="${tool.name}_${input_type.variableMetadata_in.name}_full_TSV" >
+      <filter>(input_type['choice'] == 'YES')</filter>
+      <filter>(outfiles == 'YES')</filter>
+    </data>
+    <data name="bankInhouseResXls_manualin" format="tabular" label="${tool.name}_manual_XLS" >
+      <filter>(input_type['choice'] == 'NO')</filter>
+    </data>
+    <data name="Json" format="vjson" label="${tool.name}_Json" >
+      <filter>(outfiles == 'YES')</filter>
+    </data>
+    <!--<data name="View" format="html" label="${tool.name}_View" ></data>-->
+  </outputs>
+  
+  <tests>
+    <test>
+      <param name="choice" value="NO"/>
+      <param name="rt_choice" value="NO"/>
+      <param name="masse" value="422.0849114 18.0105647 535.3181236 209.987659 98.952389"/>
+      <param name="mz_delta" value="Da"/>
+      <param name="mass_delta" value="0.005"/>
+      <param name="perso_bank" value="NO"/>
+      <param name="outfiles" value="NO"/>
+      <output name="bankInhouseResXls_manualin" file="out_test1.tabular"/>
+    </test>
+    <test>
+      <param name="choice" value="YES"/>
+      <param name="variableMetadata_in" value="in_test2.tabular"/>
+      <param name="header_choice" value="YES"/>
+      <param name="nbheader" value="1"/>
+      <param name="rt_file_choice" value="NO"/>
+      <param name="colmass" value="2"/>
+      <param name="mz_delta" value="Da"/>
+      <param name="mass_delta" value="0.005"/>
+      <param name="perso_bank" value="NO"/>
+      <param name="outfiles" value="NO"/>
+  
+      <output name="variableMetadata_out" file="out_test2a.tabular"/>
+      <output name="bankInhouseResXls_filein" file="out_test2b.tabular"/>
+    </test>
+    <!--
+    <test>
+      <param name="choice" value="YES"/>
+      <param name="variableMetadata_in" value="in_test3.tabular"/>
+      <param name="header_choice" value="YES"/>
+      <param name="nbheader" value="1"/>
+      <param name="rt_file_choice" value="NO"/>
+      <param name="colmass" value="2"/>
+      <param name="mz_delta" value="Da"/>
+      <param name="mass_delta" value="0.005"/>
+      <param name="perso_bank" value="NO"/>
+      <param name="outfiles" value="NO"/>
+  
+      <output name="variableMetadata_out" file="out_test3a.tabular"/>
+      <output name="bankInhouseResXls_filein" file="out_test3b.tabular"/>
+    </test>
+    <test>
+      <param name="choice" value="YES"/>
+      <param name="variableMetadata_in" value="in_test4.tabular"/>
+      <param name="header_choice" value="YES"/>
+      <param name="nbheader" value="1"/>
+      <param name="rt_file_choice" value="YES"/>
+      <param name="colrt" value="10"/>
+      <param name="rt_file_delta" value="0.2"/>
+      <param name="colmass" value="8"/>
+      <param name="mz_delta" value="Da"/>
+      <param name="mass_delta" value="0"/>
+      <param name="perso_bank" value="YES"/>
+      <param name="bank_in" value="in_test4.tabular"/>
+      <param name="mzdb" value="8"/>
+      <param name="bank_rt_choice" value="YES"/>
+      <param name="rtdb" value="10"/>
+      <param name="outfiles" value="YES"/>
+  
+      <output name="variableMetadata_out" file="out_test4a.tabular"/>
+      <output name="bankInhouseResXls_filein" file="out_test4b.tabular"/>
+      <output name="variableMetadata_full_out" file="out_test4c.tabular"/>
+      <output name="Json" file="out_test4d.vjson"/>
+    </test>-->
+  </tests>
+  
+  <help><![CDATA[
+
+.. class:: infomark
+
+**Authors**
+  | Marion Landi - FLAME ; PFEM ; INRA ; MetaboHUB (for original version and development of this Perl script and for xml interface and Perl wrapper)
+
+---------------------------------------------------
+
+
+==============
+bank_inhouse
+==============
+
+-----------
+Description
+-----------
+
+ | Search informations on a local bank with one or more mass(es), with or without retention time, in a file or entered manually
+
+
+Keywords
+========
+
+Masses + rt to inhouse info
+
+
+-----------------
+Workflow position
+-----------------
+
+
+.. image:: bank_inhouse.png
+        :width: 800
+
+
+-----------
+Input files
+-----------
+
+
++-----------------------------+-----------+
+| Parameter : num + label     |  Format   |
++=============================+===========+
+| 1 : File of masses          |  tabular  |
++-----------------------------+-----------+
+| 2 : personal data bank file |  tabular  |
++-----------------------------+-----------+
+
+File of masses (Generally variable metadata file) must have at least the 2 following column : 
+    | Id : column to identify masses in the tsv input file
+    | Masses : column with all the masses in the tsv input file
+    | RT : (optional) column with all the retention time in the tsv input file
+    | 
+
+personal data bank file must contain certain columns :
+    | Masses (Mandatory) and RT (optional)
+    | 
+
+----------
+Parameters
+----------
+
+Would you use a file
+    | Choose whether the masses are in a file or entered manually
+    | YES (default) : parameters **File of masses ; Do you have a header ; Column of Id ; Column of masses** are visible
+    | NO : parameter **Mass to submit** is visible
+    |
+
+
+If 'use file'='YES'
+
+File of masses
+    | see "Input files" section above
+    | Tabular file format, Generally variable metadata file
+    | 
+
+Do you have a header
+    | YES (default) : parameter **Number of header lines** is visible
+    | NO : all lines are considered to contain masses
+    |
+
+If 'have a header'='YES'
+
+Number of header lines
+    | Number of lines not containing masses values, these lines will be ignored
+    |
+
+In all header cases :
+
+Column of Id
+    | Specify the column number for the id in the tsv input file
+    |
+
+Would you use retention time (RT)
+    | YES (default) : parameter **Column of retention time (RT)** and **Delta of retention time (RT) (in minutes)** are visible
+    | NO : Search will be made solely on the basis of the masses
+    |
+
+If 'Would you use retention time (RT)'='YES'
+
+Column of retention time (RT)
+    | Specify the column number for the retention time (RT) in the tsv input file
+    |
+
+Delta of retention time (RT) (in minutes)
+    | Specify a delta to apply on  retention time - This value is a float.
+    |
+
+In all RT cases :
+
+Column of masses
+    | Specify the column number for the mass in the tsv input file
+    |
+
+
+If 'use file'='NO'
+
+Would you use retention time (RT)
+    | YES (default) : parameter **retention time (RT) to submit** and **Delta of retention time (RT) (in minutes)** are visible
+    | NO : Search will be made solely on the basis of the masses
+    |
+
+If 'Would you use retention time (RT)'='YES'
+
+retention time (RT) to submit 
+    | Specify a list of retention time to request
+    | one or more retention time entered manually
+    | For a RT list, writes : rt1 rt2 rt3
+    | You must separate yours values with space
+    | dot (.) is for float number
+    |
+Delta of retention time (RT) (in minutes)
+    | Specify a delta to apply on  retention time - This value is a float.
+    |
+
+In all RT cases :
+
+Mass to submit
+    | Specify a list of mass to request
+    | one or more mass(es) entered manually
+    | For a masses list, writes : m1 m2 m3
+    | You must separate yours values with space
+    | dot (.) is for float number
+    |
+
+In all cases :
+
+Delta type 
+    | Specify a delta type : "in Dalton" or "in ppm"
+    |
+
+Delta of mass ("in Dalton" or "in ppm" according to choice)
+    | Specify a delta to apply on mass - This value is a float.
+    |
+
+Use personal data bank
+    | YES : parameter **Bank file**, **Column of masses (MZ) in Bank file** and **Column of retention time (RT) in Bank file** (optional) are visible, the search will be made only on the information of the file
+    | NO : a internal bank will be used
+    |
+
+If 'Use personal data bank'='YES'
+
+Bank file
+    | see "Input files" section above
+    | Tabular file format, Generally variable metadata file
+    | 
+
+Column of masses
+    | Specify the column number for the mass in the bank input file
+    |
+
+Have you used the retention time (RT) for your input data 
+    | Answering same as for "Would you use retention time (RT)"
+    | YES (default) : parameter **Column of retention time (RT) in Bank file** is visible
+    | NO : Search will be made solely on the basis of the masses
+    |
+
+Column of retention time (RT) in Bank file
+    | Specify the column number for the rt in the bank input file
+    |
+
+
+------------
+Output files
+------------
+
+Two types of files (if you manually enter the masses both files are mingled):
+    | bank_inhouse_(input.name)_TSV.tabular : for linking with others modules.
+    | 
+    | bank_inhouse_(input.name)_XLS.tabular : an excel-like output will be available. 
+    | 
+
+
+---------------------------------------------------
+
+
+---------------
+Working example
+---------------
+
+
+.. class:: warningmark
+
+Refer to the corresponding W4M HowTo section: http://workflow4metabolomics.org/howto
+ | Format Data For Postprocessing
+ | Perform LCMS Annotations
+
+.. class:: warningmark
+
+And their "W4M courses 2016":
+ | Using Galaxy4Metabolomics - W4M table format for Galaxy
+ | Annotation Banks - Annotation  
+	
+	]]></help>
+</tool>