diff HR2.xml @ 0:86296c048e46 draft

Init repository for [hr2]
author fgiacomoni
date Wed, 05 Jun 2019 09:40:20 -0400
parents
children e2cbcf6fa22e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HR2.xml	Wed Jun 05 09:40:20 2019 -0400
@@ -0,0 +1,303 @@
+<tool id="hr2" name="HR2 formula" version="1.1.1.7">
+  <description>
+        find a chemical formula from a accurate mass
+  </description>
+  <requirements>
+      <requirement type="package" version="2.161">perl-data-dumper</requirement>
+      <requirement type="package" version="1.97">perl-text-csv</requirement>
+      <requirement type="package" version="2.97">perl-html-template</requirement>
+      <requirement type="package" version="1.04">hr2</requirement>
+  </requirements>
+  <stdio>
+      <exit_code range="1" level="fatal" />
+  </stdio>
+  
+  
+  <command><![CDATA[
+        perl $__tool_directory__/hr2_manager.pl
+    #if str($input_type.choice) == "YES":
+        -input "${input_type.input}"
+        #if str($input_type.header.header_choice) == "yes":
+            -nblineheader "${$input_type.header.nbHeader}"
+        #end if
+        -colId "${input_type.colId}" -colmass "${input_type.colmass}"
+    #else: 
+        -masse "${input_type.masse}"
+    #end if
+    
+    -tolerance "$tol"
+    -mode "${mode_condition.mode}"
+    #if str($mode_condition.mode) == "neutral":
+        -charge "0"
+    #else:
+        -charge "${mode_condition.qtCharge}"
+    #end if
+    
+    -regleOr "$regleOr" -atomes "$atomes_basic" -atomessup "$atomes_sup"
+    -output1 "$variableMetadata" -outputView "$hr2ResView"
+    -verbose "$verbose"
+  ]]></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="YES">YES</option>
+        <option value="NO">NO</option>
+      </param>
+      <when value="YES">
+        <param name="input" label="File of masses" format="tabular" type="data" />
+        <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" label="Number of header lines" type="integer" value="1" min="1" size="10" help="number of lines not containing masses"/>
+          </when>
+          <when value="no"/>
+        </conditional>
+        <param name="colId" label="Column of Id" type="data_column" data_ref="input" accept_default="true" />
+        <param name="colmass" label="Column of masses (MZ)" type="data_column" data_ref="input" accept_default="true" />
+      </when>
+      <when value="NO">
+        <param name="masse" size="20" type="text" label="Mass (MZ) to submit"  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>
+    
+    <param name="tol" label="Delta of mass (MZ) (in mmu)" type="float" value="1.0" min="0" max="9.0" help="Tolerance should be between 0 and 9.0 mmu. Default value is 1.0 mmu"/>
+    <conditional name="mode_condition">
+      <param name="mode" label="Molecular Species Searched" type="select" display="radio" help="Or ionization type of the molecule list. Use neutral only if only if the masses correspond to molecules and not to ions : query doesn't be a [M+H] or [M-H] ion">
+        <option value="positive">positive</option>
+        <option value="negative">negative</option>
+        <option value="neutral" selected="true">neutral</option>
+      </param>
+      <when value="neutral"/>
+      <when value="positive">
+        <param name="qtCharge" label="Molecule initial charge" type="select" help="Use 'neutral' if the molecule is not charged">
+          <option value="1">1</option>
+          <option value="2">2</option>
+          <option value="3">3</option>
+        </param>
+      </when>
+      <when value="negative">
+        <param name="qtCharge" label="Molecule initial charge" type="select" help="Use 'neutral' if the molecule is not charged">
+          <option value="1">1</option>
+          <option value="2">2</option>
+          <option value="3">3</option>
+        </param>
+      </when>
+    </conditional>
+    <param name="atomes_basic" label="Please unselect basic atom(s) from following list you want to exclude" type="select" display="checkboxes" multiple="True" help="Unselect one or more basic atoms to exclude them from the generated formula proposition">
+      <option value="C" selected="true">C</option>
+      <option value="N" selected="true">N</option>
+      <option value="O" selected="true">O</option>
+      <option value="H" selected="true">H</option>
+      <option value="P" selected="true">P</option>
+    </param>
+    <param name="regleOr" label="Use all 7 golden rules OR only the first 3 golden rules?" type="select" display="radio" help="Use 'only first 3 rules' if you want more empirical formulas">
+      <option value="YES">only first 3 rules</option>
+      <option value="NO" selected="true">all 7 rules</option>
+    </param>
+    <param name="atomes_sup" label="Add some atom(s) from following list if needed" type="select" display="checkboxes" multiple="True" help="C, H, N, O and P are available in basic atom section">
+      <option value="S">S</option>
+      <option value="F">F</option>
+      <option value="L">Cl</option>
+      <option value="K">K</option>
+      <option value="B">Br</option>
+      <option value="A">Na</option>
+      <option value="1">13C</option>
+    </param>
+    <param name="verbose" type="select" label="Verbose level" display="radio" help="">
+        <option value="1" selected="true">Low</option>
+        <option value="3" >High</option>
+    </param>
+  </inputs>
+  <outputs>
+    <data name="variableMetadata" format="tabular" label="${tool.name}_TSV"/>
+    <data name="hr2ResView" format="html" label="${tool.name}_VIEW"/>
+  </outputs>
+  
+  <tests>
+  	<test>
+  		<param name="choice" value="NO"/>
+  		<param name="masse" value="175.125"/>
+  		<param name="tolerance" value="1.0"/>
+  		<param name="mode" value="negative"/>
+  		<param name="qtCharge" value="1"/>
+  		<param name="atomes_basic" value="C,O,N,H"/>
+  		<param name="regleOr" value="NO"/>
+  		<param name="verbose" value="3"/>
+  		<output name="variableMetadata" file="out_test01.tabular"/>
+  		<output name="hr2ResView" file="out_test01.html"/>
+    </test>
+    <test>
+  		<param name="choice" value="NO"/>
+  		<param name="masse" value="88.052"/>
+  		<param name="tolerance" value="1.0"/>
+  		<param name="mode" value="neutral"/>
+  		<param name="qtCharge" value="1"/>
+  		<param name="atomes_basic" value="C,O,H"/>
+  		<param name="regleOr" value="NO"/>
+  		<param name="verbose" value="3"/>
+  		<output name="variableMetadata" file="out_test02.tabular"/>
+  		<output name="hr2ResView" file="out_test02.html"/>
+    </test>
+  </tests>
+  
+  <help><![CDATA[
+
+.. class:: infomark
+
+**Authors**
+  | HR2 original program and its documentation are Copyright (c) 1992-2005 by Joerg Hau under GNU General Public License ("GPL")
+
+.. class:: infomark
+
+**Wrapping**
+  | Marion Landi - FLAME ; PFEM ; INRA ; MetaboHUB (for xml interface and Perl wrapper)
+  | Franck Giacomoni - PFEM ; INRA ; MetaboHUB (for xml interface, conda dependancies and Perl wrapper)
+
+---------------------------------------------------
+
+.. class:: infomark
+
+**Please cite** If you use this tool, please cite
+ | Tobias Kind and Oliver Fiehn. (2007). "Seven Golden Rules for heuristic filtering of molecular formulas obtained by accurate mass spectrometry." BMC Bioinformatics p8:105 http://www.ncbi.nlm.nih.gov/pubmed/17389044
+ | HR2 original program and its documentation are under GNU General Public License ("GPL") : GPL is a"contaminating" license. http://fiehnlab.ucdavis.edu/projects/Seven_Golden_Rules/Software
+
+
+---------------------------------------------------
+
+==============
+HR2 formula
+==============
+
+-----------
+Description
+-----------
+
+ | Find a formula for the masses
+ | only molecules with carbon (C) will be search
+
+
+-----------------
+Workflow position
+-----------------
+
+
+.. image:: ./static/images/metabolomics/hr2.png
+        :width: 800
+
+
+
+
+-----------
+Input files
+-----------
+
++-------------------------+-----------+
+| Parameter : num + label |  Format   |
++=========================+===========+
+| 1 : variableMetadata    |  tabular  |
++-------------------------+-----------+
+
+File variableMetadata must have at least the 2 following columns : 
+  * Id : column to identify masses in the csv/tsv input file
+  * Masses : column with all the masses in the csv/tsv input file
+
+
+----------
+Parameters
+----------
+
+Would you use a file
+  | Choose whether the masses are in a file or entered manually
+  | YES (default) : parameters **File of masses ; Column of Id ; Number of header ; Column of masses** are visible
+  | NO : parameter **Mass of the molecule** is visible
+  |
+
+
+If 'use file'='YES'
+
+Column of Id
+  | Specify the column number for the id in the csv/tsv input file
+  |
+
+Number of header lines
+  | Number of lines not containing values 
+  |
+
+Column of masses
+  | Specify the column number for the mass in the csv/tsv input file
+  |
+
+If 'use file'='NO'
+
+Mass (MZ) 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
+  | Tolerance of the gap in the mass
+  | It should be between 0 and 9.0 mmu
+
+Ionization
+  | Type of ionization of the molecule : *positif, negatif, neutral*
+  | Use neutral if query doesn't be a [M+H] or [M-H] ion
+  | HR2 knows only the weight of uncharged molecules
+  | so we made ​​a correction to the masses of the value of a proton before the search
+  | if the masses are those from a spectrometry in positive or negatif mode.
+  | **neutral** : will do a search on the mass unchanged.
+
+Initial charge
+  | Use 0 if the molecule is not basically charged
+
+Exclude some basic atom(s)
+  List of atoms that can be exclude to the molecule : *C, N, O, H, P*
+
+Golden rules
+  | There are 7 golden rules
+  | Some are too stringent, especially for small molecules
+  | Use 'yes' if you want more empirical formulas
+
+Add some optionnal atom(s)
+  List of atoms that can be searched in addition to the molecule : *S, F, Cl, K, Br, Na, 13C*
+
+------------
+Output files
+------------
+
+Two types of files
+  | hr2_VIEW.HTML : for viewing result via HTML.
+  | hr2_TSV.tabular : for linking with others modules.
+  | an excel-like output will be available. 
+  
+---------------------------------------------------
+
+
+---------------
+Working example
+---------------
+
+
+.. class:: warningmark
+
+Refer to the corresponding "W4M HowTo" in http://workflow4metabolomics.org/howto section
+ | Format Data For Postprocessing
+ | Perform LCMS Annotations
+
+.. class:: warningmark
+
+And their "W4M courses 2018":
+ | Using Galaxy4Metabolomics - W4M table format for Galaxy
+ | Les banques d'annotation - Annotation
+
+  ]]></help>
+  <citations>
+    <citation type="doi">10.1186/1471-2105-8-105</citation>
+  </citations>
+</tool>
+