diff osra.xml @ 4:aeb1f7daa7c2 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/osra commit 74daed54894d9769a251a2ca6a46d96b7a27e461
author bgruening
date Thu, 09 Nov 2017 03:41:42 -0500
parents d2490712b67d
children b2edf498e8fb
line wrap: on
line diff
--- a/osra.xml	Tue Mar 01 10:41:20 2016 -0500
+++ b/osra.xml	Thu Nov 09 03:41:42 2017 -0500
@@ -1,40 +1,38 @@
-<tool id="ctb_osra" name="Molecule recognition" version="0.3">
+<tool id="ctb_osra" name="Molecule recognition" version="2.1.0">
     <description>in Images or PDF documents (OSRA)</description>
     <requirements>
-        <requirement type="package" version="2.0.0">osra</requirement>
-        <requirement type="package" version="2.3.2">openbabel</requirement>
-        <requirement type="package" version="1.3.18">graphicsmagick</requirement>
+        <requirement type="package" version="2.1.0">osra</requirement>
     </requirements>
-    <command interpreter='python'>
+    <command detect_errors="aggressive">
 <![CDATA[
-        ## OSRA_DATA_FILES is set during the toolshed Installation
-        ## if it is not set, use the standard configuration and hope the best
-        osra.py -f $oformat $infile
-        -l \$OSRA_DATA_FILES/spelling.txt -a \$OSRA_DATA_FILES/superatom.txt
+osra
+  -f $oformat
+  '$infile'
+  -l `which osra | xargs dirname`/../share/spelling.txt
+  -a `which osra | xargs dirname`/../share/superatom.txt
 
-        ## further additions of OSRA parameter should go after -l and -a
-        ## because -l and -a can be removed by the python wrapper
-
-        $confidence
-        $adaptive
-        $thinning
-
-        > $outfile
+  $confidence
+  $adaptive
+  $thinning
+  > '$outfile'
 ]]>
     </command>
     <inputs>
-        <param name="infile" type="data" format="png,pdf" label="Image or PDF with molecules"/>
+        <param name="infile" type="data" format="pdf" label="PDF with molecules"/>
         <param name="oformat" type="select" label="Output molecule format">
             <option value="can">SMILES</option>
             <option value="sdf">SDF</option>
         </param>
-        <param name="confidence" type="boolean" label="Print out confidence estimate (-p)" truevalue="-p" falsevalue="" checked="true" />
-        <param name="adaptive" type="boolean" label="Adaptive thresholding pre-processing, useful for low light/low contrast images (-i)" truevalue="-i" falsevalue="" checked="false" />
-        <param name="thinning" type="boolean" label="Additional thinning/scaling down of low quality documents (-j)" truevalue="-j" falsevalue="" checked="false" />
+        <param name="confidence" type="boolean" label="Print out confidence estimate" help=" (-p)"
+            truevalue="-p" falsevalue="" checked="true" />
+        <param name="adaptive" type="boolean" label="Adaptive thresholding pre-processing, useful for low light/low contrast images" help="(-i)"
+            truevalue="-i" falsevalue="" checked="false" />
+        <param name="thinning" type="boolean" label="Additional thinning/scaling down of low quality documents" help="(-j)"
+            truevalue="-j" falsevalue="" checked="false" />
 
     </inputs>
     <outputs>
-        <data name="outfile" type="data" format="sdf">
+        <data name="outfile" format="sdf">
             <change_format>
                 <when input="oformat" value="can" format="smi"/>
             </change_format>
@@ -42,16 +40,16 @@
     </outputs>
     <tests>
         <test>
-            <param name="infile" ftype="png" value="CID_2244.png"/>
+            <param name="infile" value="CID_2244.pdf" ftype="pdf"/>
             <param name="oformat" value="sdf"/>
             <output name="outfile" ftype="sdf" file="osra_on_CID2244.sdf"/>
         </test>
-        <test>
-            <param name="infile" ftype="png" value="2008001635_153_chem.png"/>
+        <!--test>
+            PNGs producing a core-dump in osra
+            <param name="infile" value="2008001635_153_chem.png"/>
             <param name="oformat" value="can"/>
-            <output name="outfile" ftype="sdf" file="2008001635_153_chem.smi"/>
-        </test>
-
+            <output name="outfile" ftype="smi" file="2008001635_153_chem.smi"/>
+        </test-->
     </tests>
     <help>
 <![CDATA[
@@ -64,15 +62,17 @@
 
 .. _OSRA: http://cactus.nci.nih.gov/osra/
 
------
-
-.. class:: infomark
-
-**Cite**
-
-Igor V Filippov and Marc C Nicklaus - `Optical Structure Recognition Software To Recover Chemical Information: OSRA, An Open Source Solution`_
-
 .. _`Optical Structure Recognition Software To Recover Chemical Information: OSRA, An Open Source Solution`: http://pubs.acs.org/doi/abs/10.1021/ci800067r
 ]]>
     </help>
+    <citations>
+        <citation type="bibtex">
+            @inproceedings{filippov2010improvements,
+            title={Improvements in Optical Structure Recognition Application},
+            author={Filippov, Igor V and Nicklaus, Marc C and Kinney, John},
+            booktitle={Document Analysis Systems Workshop},
+            year={2010}
+            }
+        </citation>
+    </citations>
 </tool>