0
|
1 <tool id="ctb_obgrep" name="Compound Search" version="0.1">
|
|
2 <description>an advanced molecular grep program using SMARTS</description>
|
|
3 <parallelism method="multi" split_inputs="infile" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="outfile"></parallelism>
|
|
4 <requirements>
|
|
5 <requirement type="package" version="2.3.2">openbabel</requirement>
|
|
6 </requirements>
|
|
7 <command>
|
2
|
8 <![CDATA[
|
0
|
9 ## The command is a Cheetah template which allows some Python based syntax.
|
|
10 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
|
|
11 obgrep
|
|
12
|
|
13 $invert_matches
|
|
14 #if $n_times != 0:
|
|
15 -t $n_times
|
|
16 #end if
|
|
17
|
|
18 $only_name
|
|
19 $full_match
|
|
20 $number_of_matches
|
|
21 -i ${infile.ext}
|
|
22 "${smarts_pattern}"
|
|
23 "${infile}"
|
2
|
24 > "${outfile}" 2>&1
|
|
25 ]]>
|
0
|
26 </command>
|
|
27 <inputs>
|
|
28 <param name="infile" type="data" format="sdf,mol,mol2,cml,inchi,smi" label="Compound File" help="Specify a compound file in SDF Format."/>
|
|
29 <param name="smarts_pattern" type="text" format="text" label="SMARTS Pattern" help="Specify a SMARTS Pattern for your search."/>
|
|
30 <param name="invert_matches" type="boolean" label="Invert the matching, print non-matching molecules" truevalue="-v" falsevalue="" checked="false" />
|
|
31 <param name="n_times" type="integer" value="0" label="Print a molecule only if the pattern occurs # times inside the molecule" />
|
|
32 <param name="only_name" type="boolean" label="Only print the name of the molecules" truevalue="-n" falsevalue="" checked="false" />
|
|
33 <param name="full_match" type="boolean" label="Full match, print matching-molecules only when the number of heavy atoms is also equal to the number of atoms in the SMARTS pattern" truevalue="-f" falsevalue="" checked="false" />
|
|
34 <param name="number_of_matches" type="boolean" label="Print the number of matches" truevalue="-c" falsevalue="" checked="false" />
|
|
35 </inputs>
|
|
36 <options sanitize="False"/>
|
|
37 <outputs>
|
|
38 <data name="outfile" format_source="infile" label="${tool.name} on ${on_string}"/>
|
|
39 </outputs>
|
|
40 <tests>
|
|
41 <test>
|
|
42 <param name="infile" ftype="smi" value="8_mol.smi"/>
|
|
43 <param name="smarts_pattern" value="CO"/>
|
|
44 <param name="invert_matches" value="" />
|
|
45 <param name="n_times" value="0"/>
|
|
46 <param name="only_name" value="" />
|
|
47 <param name="full_match" value="" />
|
|
48 <param name="number_of_matches" value="" />
|
|
49 <output name="outfile" ftype="smi" file="obgrep_on_8_mol.smi"/>
|
|
50 </test>
|
|
51 </tests>
|
|
52 <help>
|
2
|
53 <![CDATA[
|
0
|
54
|
|
55 .. class:: infomark
|
|
56
|
|
57 **What this tool does**
|
|
58
|
|
59 Uses the Open Babel Obgrep_ to search for molecules inside multi-molecule files (e.g. SMI, SDF, etc.) or across multiple files.
|
|
60 It is known that not all SMARTS features from the Daylight Toolkit are supported, please have a look here_.
|
|
61
|
|
62
|
|
63 .. _Obgrep: http://openbabel.org/wiki/Obgrep
|
|
64 .. _here: http://openbabel.org/wiki/SMARTS
|
|
65
|
|
66 -----
|
|
67
|
|
68 .. class:: infomark
|
|
69
|
|
70 **Input**
|
|
71
|
|
72 | - `SD-Format`_
|
|
73 | - `SMILES Format`_
|
|
74
|
|
75 .. _SD-Format: http://en.wikipedia.org/wiki/Chemical_table_file
|
|
76 .. _SMILES Format: http://en.wikipedia.org/wiki/Simplified_molecular_input_line_entry_specification
|
|
77
|
|
78 -----
|
|
79
|
|
80 .. class:: infomark
|
|
81
|
|
82 **Output**
|
|
83
|
|
84 Same as input format.
|
|
85
|
|
86 -----
|
|
87
|
|
88 .. class:: infomark
|
|
89
|
|
90 **Cite**
|
|
91
|
|
92 N M O'Boyle, M Banck, C A James, C Morley, T Vandermeersch, and G R Hutchison - `Open Babel: An open chemical toolbox.`_
|
|
93
|
|
94 .. _`Open Babel: An open chemical toolbox.`: http://www.jcheminf.com/content/3/1/33
|
|
95
|
|
96 `Open Babel`_
|
|
97
|
|
98 .. _`Open Babel`: http://openbabel.org/wiki/Main_Page
|
|
99
|
2
|
100 ]]>
|
0
|
101 </help>
|
|
102 </tool>
|