11
|
1 <tool id="osra" name="Molecule recognition" version="0.3">
|
3
|
2 <description>in Images or PDF documents (OSRA)</description>
|
0
|
3 <requirements>
|
11
|
4 <requirement type="package" version="2.0.0">osra</requirement>
|
0
|
5 </requirements>
|
3
|
6 <command interpreter='python'>
|
2
|
7 ## OSRA_DATA_FILES is set during the toolshed Installation
|
|
8 ## if it is not set, use the standard configuration and hope the best
|
3
|
9 osra.py -f $oformat $infile
|
|
10 -l \$OSRA_DATA_FILES/spelling.txt -a \$OSRA_DATA_FILES/superatom.txt
|
|
11
|
|
12 ## further additions of OSRA parameter should go after -l and -a
|
|
13 ## because -l and -a can be removed by the python wrapper
|
|
14
|
11
|
15 $confidence
|
|
16 $adaptive
|
|
17 $thinning
|
|
18
|
2
|
19 > $outfile
|
0
|
20 </command>
|
|
21 <inputs>
|
|
22 <param name="infile" type="data" format="png,pdf" label="Image or PDF with molecules"/>
|
|
23 <param name="oformat" type="select" label="Output molecule format">
|
|
24 <option value="can">SMILES</option>
|
|
25 <option value="sdf">SDF</option>
|
|
26 </param>
|
11
|
27 <param name="confidence" type="boolean" label="Print out confidence estimate (-p)" truevalue="-p" falsevalue="" checked="true" />
|
|
28 <param name="adaptive" type="boolean" label="Adaptive thresholding pre-processing, useful for low light/low contrast images (-i)" truevalue="-i" falsevalue="" checked="false" />
|
|
29 <param name="thinning" type="boolean" label="Additional thinning/scaling down of low quality documents (-j)" truevalue="-j" falsevalue="" checked="false" />
|
|
30
|
0
|
31 </inputs>
|
|
32 <outputs>
|
|
33 <data name="outfile" type="data" format="sdf">
|
|
34 <change_format>
|
|
35 <when input="oformat" value="can" format="smi"/>
|
|
36 </change_format>
|
|
37 </data>
|
|
38 </outputs>
|
|
39 <tests>
|
|
40 <test>
|
|
41 <param name="infile" ftype="png" value="CID_2244.png"/>
|
|
42 <param name="oformat" value="sdf"/>
|
|
43 <output name="outfile" ftype="sdf" file="osra_on_CID2244.sdf"/>
|
|
44 </test>
|
11
|
45 <test>
|
|
46 <param name="infile" ftype="png" value="2008001635_153_chem.png"/>
|
|
47 <param name="oformat" value="can"/>
|
|
48 <output name="outfile" ftype="sdf" file="2008001635_153_chem.smi"/>
|
|
49 </test>
|
|
50
|
0
|
51 </tests>
|
|
52 <help>
|
|
53
|
|
54 **What it does**
|
|
55
|
|
56 OSRA detects molecules in images and converts them to standard molecule formats.
|
|
57
|
|
58
|
|
59 </help>
|
|
60 </tool>
|