Mercurial > repos > bgruening > openbabel
annotate filter/ob_grep.xml @ 15:ec87a42dccec
ChemicalToolBoX update.
| author | Bjoern Gruening <bjoern.gruening@gmail.com> |
|---|---|
| date | Sat, 01 Jun 2013 20:02:50 +0200 |
| parents | 77b82f259298 |
| children | 3d3e7c1d0f49 |
| rev | line source |
|---|---|
| 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> | |
| 8 ## The command is a Cheetah template which allows some Python based syntax. | |
| 9 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces | |
| 10 obgrep | |
| 11 | |
| 12 $invert_matches | |
| 13 #if $n_times != 0: | |
| 14 -t $n_times | |
| 15 #end if | |
| 16 | |
| 17 $only_name | |
| 18 $full_match | |
| 19 $number_of_matches | |
| 20 -i ${infile.ext} | |
| 21 "${smarts_pattern}" | |
| 22 "${infile}" | |
| 23 > "${outfile}" 2>&1 | |
| 24 </command> | |
| 25 <inputs> | |
| 26 <param name="infile" type="data" format="sdf,mol,mol2,cml,inchi,smi" label="Compound File" help="Specify a compound file in SDF Format."/> | |
| 27 <param name="smarts_pattern" type="text" format="text" label="SMARTS Pattern" help="Specify a SMARTS Pattern for your search."/> | |
| 28 <param name="invert_matches" type="boolean" label="Invert the matching, print non-matching molecules" truevalue="-v" falsevalue="" checked="false" /> | |
| 29 <param name="n_times" type="integer" value="0" label="Print a molecule only if the pattern occurs # times inside the molecule" /> | |
| 30 <param name="only_name" type="boolean" label="Only print the name of the molecules" truevalue="-n" falsevalue="" checked="false" /> | |
| 31 <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" /> | |
| 32 <param name="number_of_matches" type="boolean" label="Print the number of matches" truevalue="-c" falsevalue="" checked="false" /> | |
| 33 </inputs> | |
| 34 <options sanitize="False"/> | |
| 35 <outputs> | |
|
11
77b82f259298
ChemicalToolBoX update.
Bjoern Gruening <bjoern.gruening@gmail.com>
parents:
0
diff
changeset
|
36 <data name="outfile" format_source="infile" label="${tool.name} on ${on_string}"/> |
| 0 | 37 </outputs> |
| 38 <tests> | |
| 39 <test> | |
| 40 <param name="infile" ftype="smi" value="8_mol.smi"/> | |
| 41 <param name="smarts_pattern" value="CO"/> | |
| 42 <param name="invert_matches" value="" /> | |
| 43 <param name="n_times" value="0"/> | |
| 44 <param name="only_name" value="" /> | |
| 45 <param name="full_match" value="" /> | |
| 46 <param name="number_of_matches" value="" /> | |
| 47 <output name="outfile" ftype="smi" file="obgrep_on_8_mol.smi"/> | |
| 48 </test> | |
| 49 </tests> | |
| 50 <help> | |
| 51 .. class:: warningmark | |
| 52 | |
| 53 **What it does** | |
| 54 | |
| 55 The obgrep tool can be used to search for molecules inside multi-molecule database files (e.g., SMILES, SDF, etc.) or across multiple files. | |
|
15
ec87a42dccec
ChemicalToolBoX update.
Bjoern Gruening <bjoern.gruening@gmail.com>
parents:
11
diff
changeset
|
56 It is known that not all SMARTS features from the Daylight Toolkit are supported, please have a look here_. |
|
ec87a42dccec
ChemicalToolBoX update.
Bjoern Gruening <bjoern.gruening@gmail.com>
parents:
11
diff
changeset
|
57 |
|
ec87a42dccec
ChemicalToolBoX update.
Bjoern Gruening <bjoern.gruening@gmail.com>
parents:
11
diff
changeset
|
58 |
|
ec87a42dccec
ChemicalToolBoX update.
Bjoern Gruening <bjoern.gruening@gmail.com>
parents:
11
diff
changeset
|
59 .. _obgrep: http://openbabel.org/wiki/Obgrep |
|
ec87a42dccec
ChemicalToolBoX update.
Bjoern Gruening <bjoern.gruening@gmail.com>
parents:
11
diff
changeset
|
60 .. _here: http://openbabel.org/wiki/SMARTS |
| 0 | 61 |
| 62 ----- | |
| 63 | |
| 64 **Output format** | |
| 65 | |
| 66 | |
| 67 **References** | |
| 68 | |
|
15
ec87a42dccec
ChemicalToolBoX update.
Bjoern Gruening <bjoern.gruening@gmail.com>
parents:
11
diff
changeset
|
69 N M O'Boyle, M Banck, C A James, C Morley, T Vandermeersch, and G R Hutchison. "Open Babel: An open chemical toolbox." J. Cheminf. (2011), 3, 33. `DOI:10.1186/1758-2946-3-33`_ |
| 0 | 70 The Open Babel Package http://openbabel.sourceforge.net/ |
| 71 | |
|
15
ec87a42dccec
ChemicalToolBoX update.
Bjoern Gruening <bjoern.gruening@gmail.com>
parents:
11
diff
changeset
|
72 .. _DOI:10.1186/1758-2946-3-33: http://www.jcheminf.com/content/3/1/33 |
|
ec87a42dccec
ChemicalToolBoX update.
Bjoern Gruening <bjoern.gruening@gmail.com>
parents:
11
diff
changeset
|
73 |
| 0 | 74 </help> |
| 75 </tool> |
