diff change_title_to_metadata_value.xml @ 10:eed751918a20 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/openbabel commit c4274133a07c323627e3ac5374502da9ecf669fe-dirty"
author bgruening
date Sat, 21 Mar 2020 10:26:59 -0400
parents 9c15e92bed39
children 3ecaa9634126
line wrap: on
line diff
--- a/change_title_to_metadata_value.xml	Thu Aug 22 10:28:24 2019 -0400
+++ b/change_title_to_metadata_value.xml	Sat Mar 21 10:26:59 2020 -0400
@@ -1,4 +1,4 @@
-<tool id="openbabel_change_title" name="Change title" version="@VERSION@.0">
+<tool id="openbabel_change_title" name="Change title" version="@VERSION@.1">
     <description>to metadata value.</description>
     <!--parallelism method="multi" split_inputs="infile" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="outfile"></parallelism-->
     <macros>
@@ -11,11 +11,14 @@
             --infile '${infile}'
             --key '${key}'
             --outfile '${outfile}'
+            $random
 ]]>
     </command>
     <inputs>
         <param name="infile" type="data" format="sdf,mol2" label="Compound file" help="Specify a compound file in SDF or MOL2 format."/>
         <param name="key" type="text" format="text" label="Compound identifier encoded in the SD-file." help="Specify the key name of the SDF metadata which contains the molecule identifier (e.g. 'PUBCHEM_SHAPE_VOLUME')"/>
+        <param name="random" type="boolean" truevalue="--random" falsevalue="" label="Add a random suffix to the title"
+            help="The title will be named like TITLE__xbrsjqssafh2t"/>
     </inputs>
     <outputs>
         <expand macro="output_like_input"/>
@@ -26,6 +29,16 @@
             <param name="key" value="PUBCHEM_SHAPE_VOLUME"/>
             <output name="outfile" ftype="sdf" file="change_title_on_CID_3033.sdf" lines_diff="2"/>
         </test>
+        <test>
+            <param name="infile" ftype="sdf" value="transfs.sdf"/>
+            <param name="key" value="Name"/>
+            <param name="random" value="true"/>
+            <output name="outfile" ftype="sdf">
+                <assert_contents>
+                    <has_text_matching expression="NC\(=NO\)NCCc1ccc\(S\(N\)\(=O\)=O\)cc1__(.*){13}" />
+                </assert_contents>
+            </output>
+        </test>
     </tests>
     <help>
 <![CDATA[