Mercurial > repos > bgruening > openbabel_obgrep
comparison ob_grep.xml @ 6:99517f9b780d draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/openbabel commit ed9b6859de648aa5f7cde483732f5df20aaff90e
author | bgruening |
---|---|
date | Tue, 07 May 2019 13:33:55 -0400 |
parents | b0311f002a5f |
children | 78640d0127ce |
comparison
equal
deleted
inserted
replaced
5:50dc8ca09a50 | 6:99517f9b780d |
---|---|
1 <tool id="openbabel_obgrep" name="Compound Search" version="@VERSION@.0"> | 1 <tool id="openbabel_obgrep" name="Compound search" version="@VERSION@.0"> |
2 <description>an advanced molecular grep program using SMARTS</description> | 2 <description>- an advanced molecular search program using SMARTS</description> |
3 <!--parallelism method="multi" split_inputs="infile" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="outfile"></parallelism--> | 3 <!--parallelism method="multi" split_inputs="infile" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="outfile"></parallelism--> |
4 <macros> | 4 <macros> |
5 <import>macros.xml</import> | 5 <import>macros.xml</import> |
6 </macros> | 6 </macros> |
7 <expand macro="requirements"/> | 7 <expand macro="requirements"/> |
8 <command> | 8 <command> |
9 <![CDATA[ | 9 <![CDATA[ |
10 obgrep | 10 |
11 $invert_matches | 11 #if $input_type.inp == 'single': |
12 #if $n_times: | 12 obgrep |
13 -t $n_times | 13 $invert_matches |
14 #end if | 14 #if $n_times: |
15 $only_name | 15 -t $n_times |
16 $full_match | 16 #end if |
17 $number_of_matches | 17 $only_name |
18 -i '${infile.ext}' | 18 $full_match |
19 '${smarts_pattern}' | 19 $number_of_matches |
20 '${infile}' | 20 -i '${infile.ext}' |
21 > '${outfile}' | 21 '${input_type.smarts_pattern}' |
22 '${infile}' | |
23 > '${outfile}' | |
24 #else if $input_type.inp == 'multi': | |
25 python '$__tool_directory__/multi_obgrep.py' | |
26 -i $infile | |
27 --iformat ${infile.ext} | |
28 -q '${input_type.query}' | |
29 -o '${outfile}' | |
30 $invert_matches | |
31 --n-times $n_times | |
32 $only_name | |
33 $full_match | |
34 $number_of_matches | |
35 --processors "\${GALAXY_SLOTS:-12}" | |
36 #end if | |
37 | |
22 ]]> | 38 ]]> |
23 </command> | 39 </command> |
24 <inputs> | 40 <inputs> |
25 <expand macro="infile_all_types"/> | 41 <expand macro="infile_all_types"/> |
26 <param name="smarts_pattern" type="text" format="text" label="SMARTS Pattern" help="Specify a SMARTS Pattern for your search."/> | 42 <conditional name="input_type"> |
27 <param name="invert_matches" type="boolean" label="Invert the matching, print non-matching molecules" truevalue="-v" falsevalue="" checked="false" /> | 43 <param name="inp" type="select" label="Input"> |
28 <param name="n_times" type="integer" value="" min="1" optional="True" | 44 <option value="single">Enter a single SMARTS pattern</option> |
29 label="Print a molecule only if the pattern occurs # times inside the molecule" /> | 45 <option value="multi">Upload one or more SMARTS patterns in a text file</option> |
46 </param> | |
47 <when value="single"> | |
48 <param name="smarts_pattern" type="text" format="text" label="SMARTS Pattern" help="Specify a SMARTS Pattern for your search."/> | |
49 </when> | |
50 <when value="multi"> | |
51 <param name="query" type='data' format="tabular,text" label="Query file" help="One SMARTS pattern in each line."/> | |
52 </when> | |
53 </conditional> | |
54 <param name="invert_matches" type="boolean" label="Perform an inverted search, i.e. print non-matching molecules" truevalue="-v" falsevalue="" checked="false" /> | |
55 <param name="n_times" type="integer" value="0" min="0" optional="True" | |
56 label="Print a molecule only if the pattern occurs this often inside the molecule" /> | |
30 <param name="only_name" type="boolean" label="Only print the name of the molecules" truevalue="-n" falsevalue="" checked="false" /> | 57 <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" /> | 58 <param name="full_match" type="boolean" label="Full match" help="Print matching molecules only when the number of heavy atoms equals 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" /> | 59 <param name="number_of_matches" type="boolean" label="Print the number of matches" truevalue="-c" falsevalue="" checked="false" /> |
33 </inputs> | 60 </inputs> |
34 <options sanitize="False"/> | 61 <options sanitize="False"/> |
35 <outputs> | 62 <outputs> |
36 <expand macro="output_like_input"/> | 63 <expand macro="output_like_input"/> |
37 </outputs> | 64 </outputs> |
38 <tests> | 65 <tests> |
39 <test> | 66 <test> |
40 <param name="infile" ftype="smi" value="8_mol.smi"/> | 67 <param name="infile" ftype="smi" value="8_mol.smi"/> |
68 <param name="inp" value="single"/> | |
41 <param name="smarts_pattern" value="CO"/> | 69 <param name="smarts_pattern" value="CO"/> |
42 <param name="invert_matches" value="False" /> | 70 <param name="invert_matches" value="False" /> |
43 <param name="only_name" value="False" /> | 71 <param name="only_name" value="False" /> |
44 <param name="full_match" value="False" /> | 72 <param name="full_match" value="False" /> |
45 <param name="number_of_matches" value="False" /> | 73 <param name="number_of_matches" value="False" /> |
46 <output name="outfile" ftype="smi" file="obgrep_on_8_mol.smi"/> | 74 <output name="outfile" ftype="smi" file="obgrep_on_8_mol.smi"/> |
75 </test> | |
76 <test> | |
77 <param name="infile" ftype="smi" value="2_mol.smi"/> | |
78 <param name="inp" value="multi"/> | |
79 <param name="query" value="pattern.smarts" /> | |
80 <output name="outfile" ftype="smi" file="ob_multi_obgrep.smi" /> | |
47 </test> | 81 </test> |
48 </tests> | 82 </tests> |
49 <help> | 83 <help> |
50 <![CDATA[ | 84 <![CDATA[ |
51 | 85 |
52 .. class:: infomark | 86 .. class:: infomark |
53 | 87 |
54 **What this tool does** | 88 **What this tool does** |
55 | 89 |
56 Uses the Open Babel Obgrep_ to search for molecules inside multi-molecule files (e.g. SMI, SDF, etc.) or across multiple files. | 90 Uses the Open Babel Obgrep_ to search for molecules inside multi-molecule files (e.g. SMI, SDF, etc.) or across multiple files. Not all SMARTS features from the original implementation in the Daylight Toolkit are supported by OpenBabel; please have a look here_. |
57 It is known that not all SMARTS features from the Daylight Toolkit are supported, please have a look here_. | |
58 | 91 |
92 The search query can be submitted either as a single SMARTS pattern or as a file containing multiple SMARTS patterns. | |
59 | 93 |
60 .. _Obgrep: http://openbabel.org/wiki/Obgrep | 94 .. _Obgrep: http://openbabel.org/wiki/Obgrep |
61 .. _here: http://openbabel.org/wiki/SMARTS | 95 .. _here: http://openbabel.org/wiki/SMARTS |
62 | 96 |
63 ----- | 97 ----- |