view wsdl_hmdb.xml @ 22:453fbe98925a draft

" master branch Updating with tag :CI_COMMIT_TAG - - Fxx"
author fgiacomoni
date Fri, 20 Nov 2020 17:29:18 +0000
parents 63ba1cb240b7
children 2d8a310e86ce
line wrap: on
line source

<tool id="wsdl_hmdb" name="HMDB MS search" version="1.6.1">
  <description>
        search by masses on HMDB online LCMS bank
  </description>
  
  <requirements>
      <requirement type="package" version="2.161">perl-data-dumper</requirement>
      <requirement type="package" version="2.97">perl-html-template</requirement>
      <requirement type="package" version="1.19">perl-soap-lite</requirement>
      <requirement type="package" version="6.15">perl-lwp-simple</requirement>
      <requirement type="package" version="6.15">perl-libwww-perl</requirement>
      <requirement type="package" version="1.74">perl-uri</requirement>
      <requirement type="package" version="1.97">perl-text-csv</requirement>
      <requirement type="package" version="3.52">perl-xml-twig</requirement>
      <requirement type="package" version="1.91">perl-www-mechanize</requirement>
  </requirements>
  
  <stdio>
      <exit_code range="1" level="fatal" />
  </stdio>
  
  
  <command><![CDATA[
        perl $__tool_directory__/wsdl_hmdb.pl
        #if str($input_type.choice) == "YES":
            -masses "${input_type.masses}"
            -header_choice "${input_type.header.header_choice}"
            #if str($input_type.header.header_choice) == "yes":
                -nblineheader "${$input_type.header.nbHeader}"
            #end if
            -colfactor "${input_type.colfactor}"
            -output_tabular "$variableMetadata" -output_html "$HmdbOutWeb" -output_xls "$HmdbOutXlsx"
        #else:
            -mass "${input_type.mass}"
            -output_tabular "$variableMetadata2" -output_html "$HmdbOutWeb2" -output_xls "$HmdbOutXlsx2"
        #end if
        
        -mode "${mode_type.mode}"
        
        #if str($mode_type.mode) == "positive":
        	-adduct_type "${mode_type.data_positive_adducts}"
        #elif str($mode_type.mode) == "negative":
        	-adduct_type "${mode_type.data_negative_adducts}"
        #elif str($mode_type.mode) == "neutral":
        	-adduct_type "${mode_type.data_neutral_adducts}"
        #end if
        
        -delta "$delta" -maxquery "$maxquery"
        -advancedFeatures "$advancedFeatures"
        -verbose "$verbose"
        
  ]]></command>
  <inputs>
    <conditional name="input_type">
      <param name="choice" type="select" 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="masses" label="File of masses (Variable Metadata) " format="tabular" type="data" help="Generally variable metadata file. Please note : HMDB allows maximum 700 query masses per request" />
        <conditional name="header">
          <param name="header_choice" type="select" label="Do you have a header " help="if 'YES' is selected then enter your number of header lines">
            <option value="no">NO</option>
            <option value="yes" selected="true">YES</option>
          </param>
          <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="colfactor" label="Column of masses " type="data_column" data_ref="masses" accept_default="true" />
      </when>
      <when value="NO">
        <param name="mass" label="Mass to submit " type="text" 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>
    
    <param name="delta" label="Mass-to-charge ratio " type="float" value="0.05" min="0" max="10" size="10" help="Default value is 0.05 for HMDB (mass-to-charge ratio)"/>
    <param name="maxquery" label="Number of maximum entries returned by the query " type="integer" value="10" min="1" max="50" size="10" help="Default value is 10 for each queried mz / max is 50"/>
    
    <conditional name="mode_type">
    	<param name="mode" label="Molecular Species " type="select" display="radio" help="">
      		<option value="positive">Positif Mode</option>
      		<option value="negative">Negatif Mode</option>
      		<option value="neutral" selected="True">Neutral Mass</option>
    	</param>
    	<when value="positive">
    		<param name="data_positive_adducts" label="Select multiple adducts" type="select" display="checkboxes" multiple="True" help="">
    			<option value="Unknown">Unknown</option>
    			<option value="M+H" selected="True">M+H</option>
    			<option value="M+H-2H2O">M+H-2H2O</option>
    			<option value="M+H-H2O">M+H-H2O</option>
    			<option value="M+NH4-H2O">M+NH4-H2O</option>
    			<option value="M+Li">M+Li</option>
    			<option value="M+NH4">M+NH4</option>
    			<option value="M+Na">M+Na</option>
    			<option value="M+CH3OH+H">M+CH3OH+H</option>
    			<option value="M+K">M+K</option>
    			<option value="M+ACN+H">M+ACN+H</option>
    			<option value="M+2Na-H">M+2Na-H</option>
    			<option value="M+IsoProp+H">M+IsoProp+H</option>
    			<option value="M+ACN+Na">M+ACN+Na</option>
    			<option value="M+2K-H">M+2K-H</option>
    			<option value="M+DMSO+H">M+DMSO+H</option>
    			<option value="M+2ACN+H">M+2ACN+H</option>
    			<option value="M+IsoProp+Na+H">M+IsoProp+Na+H</option>
    			<option value="M+H+HCOONa">M+H+HCOONa</option>
    			<option value="2M+H">2M+H</option>
    			<option value="2M+NH4">2M+NH4</option>
    			<option value="2M+Na">2M+Na</option>
    			<option value="2M+2H+3H2O">2M+2H+3H2O</option>
    			<option value="2M+K">2M+K</option>
    			<option value="2M+ACN+H">2M+ACN+H</option>
    			<option value="2M+ACN+Na">2M+ACN+Na</option>
    			<option value="2M+H-H2O">2M+H-H2O</option>
    			<option value="M+2H">M+2H</option>
    			<option value="M+H+NH4">M+H+NH4</option>
    			<option value="M+H+Na">M+H+Na</option>
    			<option value="M+H+K">M+H+K</option>
    			<option value="M+ACN+2H">M+ACN+2H</option>
    			<option value="M+2Na">M+2Na</option>
    			<option value="M+2ACN+2H">M+2ACN+2H</option>
    			<option value="M+3ACN+2H">M+3ACN+2H</option>
    			<option value="M+3H">M+3H</option>
    			<option value="M+2H+Na">M+2H+Na</option>
    			<option value="M+H+2Na">M+H+2Na</option>
    			<option value="M+3Na">M+3Na</option>
    			<option value="M+H+2K">M+H+2K</option>
    		</param>
    	</when>
    	<when value="negative">
    		<param name="data_negative_adducts" label="Select multiple adducts" type="select" display="checkboxes" multiple="True" help="">
    			<option value="Unknown">Unknown</option>
    			<option value="M-H" selected="True">M-H</option>
    			<option value="M-H20-H">M-H20-H</option>
    			<option value="M+F">M+F</option>
    			<option value="M+Na-2H">M+Na-2H</option>
    			<option value="M+Cl">M+Cl</option>
    			<option value="M+K-2H">M+K-2H</option>
    			<option value="M+FA-H">M+FA-H</option>
    			<option value="M+Hac-H">M+Hac-H</option>
    			<option value="M+Br">M+Br</option>
    			<option value="M+TFA-H">M+TFA-H</option>
    			<option value="M-H+HCOONa">M-H+HCOONa</option>
    			<option value="2M-H">2M-H</option>
    			<option value="2M+FA-H">2M+FA-H</option>
    			<option value="2M+Hac-H">2M+Hac-H</option>
    			<option value="3M-H">3M-H</option>
    			<option value="M-2H">M-2H</option>
    			<option value="M-3H">M-3H</option>
    		</param>
    	</when>
    	<when value="neutral">
    		<param name="data_neutral_adducts" label="Select multiple adducts" type="select" display="checkboxes" multiple="True" help="">
    			<option value="Unknown">Unknown</option>
    			<option value="M" selected="True">M</option>
    		</param>
    	</when>
    </conditional>
    
    
    
    
    <param name="advancedFeatures" label="Performing advanced annotation " type="select" display="radio" help="Getting more information from HMDB (Inchi, logP, ...) but increase time of tool execution">
      <option value="1">Advanced mode</option>
      <option value="0" selected="True">Default mode</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="${input_type.masses.name[:-6]}.HMDB.tabular">
    	<filter>input_type['choice'] == "YES"</filter>
   	</data>
    <data name="HmdbOutWeb" format="html" label="${input_type.masses.name[:-6]}.HMDB_WEB.html">
    	<filter>input_type['choice'] == "YES"</filter>
   	</data>
    <data name="HmdbOutXlsx" label="${input_type.masses.name[:-6]}.HMDB_XLS.txt" format="tabular">
    	<filter>input_type['choice'] == "YES"</filter>
   	</data>
    <data name="variableMetadata2" format="tabular" label="HMDB.tabular">
    	<filter>input_type['choice'] == "NO"</filter>
   	</data>
    <data name="HmdbOutWeb2" format="html" label="HMDB_WEB.html">
    	<filter>input_type['choice'] == "NO"</filter>
   	</data>
    <data name="HmdbOutXlsx2" label="HMDB_XLS.txt" format="tabular">
    	<filter>input_type['choice'] == "NO"</filter>
   	</data>
  </outputs>
  
  <tests>
	<!--test 01 no result - fake-mzrt-input-with-id -->
  	<!--
  	<test>
  		<param name="choice" value="YES"/>
  		<param name="masses" value="input_test01_fake-mzrt-input-with-id.tabular"/>
  		<param name="header_choice" value="yes"/>
  		<param name="nblineheader" value="1"/>
  		<param name="colfactor" value="2"/>
  		<param name="delta" value="0.001"/>
  		<param name="mode" value="neutral"/>
  		<param name="maxquery" value="5"/>
  		<output name="variableMetadata" file="out_test01.tabular"/>
  		<output name="HmdbOutWeb" file="out_test01.html"/>
  		<output name="HmdbOutXlsx" file="out_test01.txt"/>
  	</test>
  	-->
  	<!--test 02 : some results - with-mzrt-input-with-id file-->
  	<!--
  	<test>
  		<param name="choice" value="YES"/>
  		<param name="masses" value="input_test02_mzrt-input-with-id.tabular"/>
  		<param name="header_choice" value="yes"/>
  		<param name="nblineheader" value="1"/>
  		<param name="colfactor" value="2"/>
  		<param name="delta" value="0.001"/>
  		<param name="mode" value="positive"/>
  		<param name="maxquery" value="5"/>
  		<output name="variableMetadata" file="out_test02.tabular"/>
  		<output name="HmdbOutWeb" file="out_test02.html"/>
  		<output name="HmdbOutXlsx" file="out_test02.txt"/>
  	</test>
 	-->
 	<!--test 03 : some results - with-mz list in manual mass mode-->
  	<test>
  		<param name="choice" value="NO"/>
  		<param name="mass" value="175.01 238.19 420.16 780.32 956.25 1100.45"/>
  		<param name="delta" value="0.05"/>
  		<param name="mode" value="positive"/>
  		<param name="maxquery" value="5"/>
  		<param name="adduct_type" value="M+H"/>
  		<output name="variableMetadata2" file="out_test03.tabular"/>
  		<output name="HmdbOutWeb2" file="out_test03.html"/>
  		<output name="HmdbOutXlsx2" file="out_test03.txt"/>
  	</test>
  </tests>

  <help><![CDATA[

.. class:: infomark

**Authors** Marion Landi and Franck Giacomoni

---------------------------------------------------

.. class:: infomark

**Please cite** If you use this tool, please add the following reference
  | Wishart DS, Jewison T, Guo AC, Wilson M, Knox C, et al., HMDB 3.0 — The Human Metabolome Database in 2013. Nucleic Acids Res. 2013.
  | Wishart DS, Feunang YD, Marcu A, Guo AC, Liang K, et al., HMDB 4.0 — The Human Metabolome Database for 2018. Nucleic Acids Res. 2018.


---------------------------------------------------

==============
HMDB MS search
==============

-----------
Description
-----------

 | Search informations (like : HMDB id,  Name, Adduct, delta mass) on HMDB online bank
 | with one or more mass(es) in a file or entered manually


-----------------
Workflow position
-----------------


.. image:: ./static/images/metabolomics/hmdb.png
        :width: 800


-----------
Input files
-----------


+-------------------------+-----------+
| Parameter : num + label |  Format   |
+=========================+===========+
| 1 : File of masses      |  tabular  |
+-------------------------+-----------+

File of masses (Generally variable metadata file) must have at least the following column : 
	* Masses : column with all the masses in the 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 ; Do you have a header ; 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 masses
	| Specify the column number for the mass in the tsv input file
	|


If 'use file'='NO'

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 :

Mass-to-charge ratio
	| Specify a delta (mass-to-charge ratio) to apply on mass - This value is a float, between 0.0000000000000001 and 10.
	|

Molecular Species
	| Type of ionization of the molecule : *positif, negatif, neutral*
	|


------------
Output files
------------

Two types of files
	| HMDB_WEB.HTML: for viewing result via HTML.
	| 
	| HMDB_TABULAR.tabular: for linking with others modules.
	| 
	| HMDB_XLS.txt: an excel-like output permitting manual annotation cleaning. 
	| 
	
---------------------------------------------------


---------------
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 2018":
 | Using Galaxy4Metabolomics - W4M table format for Galaxy
 | Annotation Banks - Annotation  
	

	]]></help>
	<!-- [RECOMMANDED] All citations associated to this tool (main citation given above and other references). Can be extracted from the history panel -->
  <citations>
    <citation type="doi">10.1093/nar/gks1065</citation>
    <citation type="doi">10.1093/nar/gkx1089</citation>
  </citations>
</tool>