diff annotationRmn2D_xml.xml @ 3:546c7ccd2ed4 draft default tip

"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit 911f4beba3dcb25c1033e8239426f8f763683523"
author workflow4metabolomics
date Fri, 04 Feb 2022 09:01:11 +0000
parents dff7bde22102
children
line wrap: on
line diff
--- a/annotationRmn2D_xml.xml	Tue Feb 04 10:59:26 2020 -0500
+++ b/annotationRmn2D_xml.xml	Fri Feb 04 09:01:11 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="2DNmrAnnotation" name="2DNMR_Annotation" version="1.0.0">
+<tool id="2DNmrAnnotation" name="2DNMRAnnotation" version="2.0.0" profile="20.09">
 
     <description> Annotation of complex mixture bidimensional NMR spectra </description>
 
@@ -9,6 +9,9 @@
         <requirement type="package" version="4.0.17">r-openxlsx</requirement>
         <requirement type="package" version="1.4.0">r-stringr</requirement>
         <requirement type="package" version="1.0.2">r-tidyr</requirement>
+        <requirement type="package" version="3.3">r-curl</requirement>
+        <requirement type="package" version="1.6">r-jsonlite</requirement>
+        <requirement type="package">r-stringi</requirement>
     </requirements>
 
     <stdio>
@@ -19,10 +22,13 @@
         ## Wrapper + Libraries of 2D-NMR sequences for reference compounds
         Rscript '$__tool_directory__/annotationRmn2DWrapper.R'
 
-
         ## XLS file
         xlsfile '$zip_xlsfile'
 
+        ## Parameters to reduce search
+        pH $pH
+        magneticField $magneticField
+
         ## 2D-NMR sequences to annotate
         cosy_2dsequences $cosy_2dsequences
         jres_2dsequences $jres_2dsequences
@@ -60,7 +66,6 @@
         tolppm2 $tolppm2
         tolppmJRES $tolppmJRES
 
-
         ## Treshold (probability score)
         threshold $threshold
 
@@ -81,20 +86,18 @@
         ppmCommunTOCSY '$ppmCommunTOCSY'
         annotationCombination '$annotationCombination'
         AnnotationGraph '$AnnotationGraph'
-
     </command>
 
     <inputs>
         <param name="zip_xlsfile" type="data" format="xlsx" label="File to annotate in xlsx format" />
 
+        <param name="pH" type="float" value="0" help="pH value of standards. Default value is 0 (no specific pH value required)" />
+        <param name="magneticField" type="integer" value="0" help="Magnetic filed of NMR spectrometer used to generate standard spectra. Default value is 0 (no specific field required)" />
+
         <param name="cosy_2dsequences" type="select" label="2D-NMR COSY sequence">
             <option value="yes" > yes </option>
             <option value="no" selected="true"> no </option>
         </param>
-        <param name="jres_2dsequences" type="select" label="2D-NMR JRES sequence">
-            <option value="yes" > yes </option>
-            <option value="no" selected="true"> no </option>
-        </param>
         <param name="hmbc_2dsequences" type="select" label="2D-NMR HMBC sequence">
             <option value="yes" > yes </option>
             <option value="no" selected="true"> no </option>
@@ -103,6 +106,10 @@
             <option value="yes" > yes </option>
             <option value="no" selected="true"> no </option>
         </param>
+        <param name="jres_2dsequences" type="select" label="2D-NMR JRES sequence">
+            <option value="yes" > yes </option>
+            <option value="no" selected="true"> no </option>
+        </param>
         <param name="tocsy_2dsequences" type="select" label="2D-NMR TOCSY sequence">
             <option value="yes" > yes </option>
             <option value="no" selected="true"> no </option>
@@ -168,53 +175,54 @@
             <when value="no" />
         </conditional>
 
-        <param name="tolppm1" type="float" value="0.01" help="Tolerance on chemical shift for the x-axis (H). Default value is 0.01ppm" />
-        <param name="tolppm2" type="float" value="0.5" help="Tolerance on chemical shift for the y-axis (C). Default value is 0.01ppm" />
-        <param name="tolppmJRES" type="float" value="0.002" help="Tolerance on chemical shift for the y-axis for the JRES sequence. Default value is 0.002 (Hz)" />
+        <param name="tolppm1" type="float" min="0" value="0.01" help="Tolerance on chemical shift for the x-axis (H). Default value is 0.01ppm" />
+        <param name="tolppm2" type="float" min="0" value="0.5" help="Tolerance on chemical shift for the y-axis (C). Default value is 0.01ppm" />
+        <param name="tolppmJRES" type="float" min="0" value="0.002" help="Tolerance on chemical shift for the y-axis for the JRES sequence. Default value is 0.002 (Hz)" />
 
-        <param name="threshold" type="float" value="0" help="Treshold on score of presence. Default value is 0" />
+        <param name="threshold" type="float" min="0" max="1" value="0" help="Treshold on score of presence. Default value is 0" />
 
-        <param name="unicity" label="Unicity of annotation" type="select" display="radio" help="">
+        <param name="unicity" label="Unicity of annotation" type="select" display="radio" help="Select only chemical shifts corresponding to one one metabolite">
             <option value="no">No</option>
-            <option value="yes"></option>
+            <option value="yes">Yes</option>
         </param>
 
     </inputs>
 
     <outputs>
         <data format="txt" name="logOut" label="${tool.name}_log" />
-        <data format="tabular" name="annotationCOSY" label="annotationCosy" >
+
+        <data format="tabular" name="annotationCOSY" label="${tool.name}_annotationCOSY" >
             <filter> cosy_2dsequences != "no" </filter>
         </data>
-        <data format="tabular" name="ppmCommunCOSY" label="duplicateCosy" >
+        <data format="tabular" name="ppmCommunCOSY" label="${tool.name}_uplicateCOSY" >
             <filter> cosy_2dsequences != "no" </filter>
         </data>
 
-        <data format="tabular" name="annotationJRES" label="annotationJres" >
+        <data format="tabular" name="annotationJRES" label="${tool.name}_annotationJRES" >
             <filter> jres_2dsequences != "no" </filter>
         </data>
-        <data format="tabular" name="ppmCommunJRES" label="duplicateJres" >
+        <data format="tabular" name="ppmCommunJRES" label="${tool.name}_duplicateJRES" >
             <filter> jres_2dsequences != "no" </filter>
         </data>
 
-        <data format="tabular" name="annotationHMBC" label="annotationHmbc" >
+        <data format="tabular" name="annotationHMBC" label="${tool.name}_annotationHMBC" >
             <filter> hmbc_2dsequences != "no" </filter>
         </data>
-        <data format="tabular" name="ppmCommunHMBC" label="duplicateHmbc" >
+        <data format="tabular" name="ppmCommunHMBC" label="${tool.name}_duplicateHMBC" >
             <filter> hmbc_2dsequences != "no" </filter>
         </data>
 
-        <data format="tabular" name="annotationHSQC" label="annotationHsqc" >
+        <data format="tabular" name="annotationHSQC" label="${tool.name}_annotationHSQC" >
             <filter> hsqc_2dsequences != "no" </filter>
         </data>
-        <data format="tabular" name="ppmCommunHSQC" label="duplicateHsqc" >
+        <data format="tabular" name="ppmCommunHSQC" label="${tool.name}_duplicateHSQC" >
             <filter> hsqc_2dsequences != "no" </filter>
         </data>
 
-        <data format="tabular" name="annotationTOCSY" label="annotationTocsy" >
+        <data format="tabular" name="annotationTOCSY" label="${tool.name}_annotationTOCSY" >
             <filter> tocsy_2dsequences != "no" </filter>
         </data>
-        <data format="tabular" name="ppmCommunTOCSY" label="duplicateTocsy" >
+        <data format="tabular" name="ppmCommunTOCSY" label="${tool.name}_duplicateTOCSY" >
             <filter> tocsy_2dsequences != "no" </filter>
         </data>
 
@@ -222,28 +230,33 @@
         <data format="pdf" name="AnnotationGraph" label="${tool.name}_graph" />
     </outputs>
     <tests>
-    	<test>
-    		<param name="zip_xlsfile" value="Template_melange.xlsm" ftype="xlsx"/>
-    		<param name="cosy_2dsequences" value="no"/>
-    		<param name="jres_2dsequences" value="yes"/>
-    		<param name="hmbc_2dsequences" value="no"/>
-    		<param name="hsqc_2dsequences" value="yes"/>
-    		<param name="tocsy_2dsequences" value="no"/>
-    		<param name="tocsy_2dsequences" value="no"/>
-    		<param name="inHouse_DB_choices.choice" value="no"/>
-    		<param name="tolppm1" value="0.01"/>
-    		<param name="tolppm2" value="0.5"/>
-    		<param name="tolppmJRES" value="0.002"/>
-    		<param name="threshold" value="0.3"/>
-    		<param name="unicity" value="no"/>
-    		<output name="annotationJRES" file="annotationJres.tabular"/>
-    		<output name="ppmCommunJRES" file="duplicateJres.tabular"/>
-    		<output name="annotationHSQC" file="annotationHsqc.tabular"/>
-    		<output name="ppmCommunHSQC" file="duplicateHsqc.tabular"/>
-    		<output name="annotationCombination" file="2DNMR_Annotation_annotationCombination.tabular"/>
-    	</test>
-	</tests>
-<help>
+        <test expect_num_outputs="13">
+            <param name="zip_xlsfile" value="Template_melange.xlsx" ftype="xlsx"/>
+            <param name="cosy_2dsequences" value="yes"/>
+            <param name="jres_2dsequences" value="yes"/>
+            <param name="hmbc_2dsequences" value="yes"/>
+            <param name="hsqc_2dsequences" value="yes"/>
+            <param name="tocsy_2dsequences" value="yes"/>
+            <param name="inHouse_DB_choices.choice" value="no"/>
+            <param name="tolppm1" value="0.01"/>
+            <param name="tolppm2" value="0.5"/>
+            <param name="tolppmJRES" value="0.002"/>
+            <param name="threshold" value="0.3"/>
+            <param name="unicity" value="no"/>
+            <output name="annotationCOSY" file="2DNMRAnnotation_annotationCOSY.tabular"/>
+            <output name="ppmCommunCOSY" file="2DNMRAnnotation_duplicateCOSY.tabular"/>
+            <output name="annotationHMBC" file="2DNMRAnnotation_annotationHMBC.tabular"/>
+            <output name="ppmCommunHMBC" file="2DNMRAnnotation_duplicateHMBC.tabular"/>
+            <output name="annotationHSQC" file="2DNMRAnnotation_annotationHSQC.tabular"/>
+            <output name="ppmCommunHSQC" file="2DNMRAnnotation_duplicateHSQC.tabular"/>
+            <output name="annotationJRES" file="2DNMRAnnotation_annotationJRES.tabular"/>
+            <output name="ppmCommunJRES" file="2DNMRAnnotation_duplicateJRES.tabular"/>
+            <output name="annotationTOCSY" file="2DNMRAnnotation_annotationTOCSY.tabular"/>
+            <output name="ppmCommunTOCSY" file="2DNMRAnnotation_duplicateTOCSY.tabular"/>
+            <output name="annotationCombination" file="2DNMRAnnotation_annotationCombination.tabular"/>
+        </test>
+    </tests>
+    <help>
 
 .. class:: infomark