Mercurial > repos > bgruening > simsearch
annotate simsearch.xml @ 3:9f1a8df0b437 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit 944ea4bb8a9cd4244152a4a4fecd0485fabc2ad0"
author | bgruening |
---|---|
date | Tue, 28 Jul 2020 08:47:23 -0400 |
parents | 497254c6c09e |
children | 425469deb136 |
rev | line source |
---|---|
3
9f1a8df0b437
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit 944ea4bb8a9cd4244152a4a4fecd0485fabc2ad0"
bgruening
parents:
2
diff
changeset
|
1 <tool id="ctb_simsearch" name="Similarity search" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@"> |
9f1a8df0b437
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit 944ea4bb8a9cd4244152a4a4fecd0485fabc2ad0"
bgruening
parents:
2
diff
changeset
|
2 <description>of fingerprint data sets with chemfp</description> |
9f1a8df0b437
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit 944ea4bb8a9cd4244152a4a4fecd0485fabc2ad0"
bgruening
parents:
2
diff
changeset
|
3 <macros> |
9f1a8df0b437
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit 944ea4bb8a9cd4244152a4a4fecd0485fabc2ad0"
bgruening
parents:
2
diff
changeset
|
4 <token name="@TOOL_VERSION@">1.6</token> |
9f1a8df0b437
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit 944ea4bb8a9cd4244152a4a4fecd0485fabc2ad0"
bgruening
parents:
2
diff
changeset
|
5 <token name="@GALAXY_VERSION@">0</token> |
9f1a8df0b437
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit 944ea4bb8a9cd4244152a4a4fecd0485fabc2ad0"
bgruening
parents:
2
diff
changeset
|
6 </macros> |
0 | 7 <requirements> |
3
9f1a8df0b437
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit 944ea4bb8a9cd4244152a4a4fecd0485fabc2ad0"
bgruening
parents:
2
diff
changeset
|
8 <requirement type="package" version="1.6">chemfp</requirement> |
0 | 9 </requirements> |
10 <command> | |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
11 <![CDATA[ |
0 | 12 #if $method_opts.method_opts_selector == "chemfp": |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
13 ln -s '${method_opts.query_opts.targets}' ./targets.fps && |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
14 |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
15 #if $method_opts.query_opts.query_opts_selector == "normal": |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
16 ln -s '${method_opts.query_opts.query}' ./query.fps && |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
17 #end if |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
18 |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
19 simsearch |
0 | 20 #if int($method_opts.knn) == 0: |
21 #set $k = 'all' | |
22 ## count is only available if k nearest neighbor search is disabled | |
23 $method_opts.counts | |
24 #else: | |
25 #set $k = int($method_opts.knn) | |
26 #end if | |
27 | |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
28 -k $k |
0 | 29 --threshold $method_opts.threshold |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
30 -o ./output.fps |
0 | 31 |
32 ## build and search an in-memory data structure (faster for multiple queries) | |
33 --memory | |
34 | |
35 #if $method_opts.query_opts.query_opts_selector == "normal": | |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
36 -q ./query.fps |
0 | 37 #else: |
38 --NxN | |
39 #end if | |
40 | |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
41 ./targets.fps |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
42 && |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
43 mv ./output.fps '${outfile}' |
0 | 44 #else: |
45 ## OpenBabel needs the original molecule file (molecule.'fileformat') next to the fastsearch index (molecule.fs). We use a composite datatype to accomplish that. | |
46 ## Furthermore OpenBabel is really picky with file extensions. We need to specify every datatype. I did not find a solution to specify the query-filetype. | |
47 ## A workaround is to create a symlink with a proper file-extension. | |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
48 ln -s '$method_opts.query' ./temp_query.$method_opts.query.ext |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
49 obabel |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
50 -i fs '$method_opts.fastsearch.files_path/molecule.fs' |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
51 -S ./temp_query.$method_opts.query.ext |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
52 -at${method_opts.threshold} |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
53 -O '${outfile}' |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
54 -osmi |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
55 -aa |
0 | 56 #end if |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
57 ]]> |
0 | 58 </command> |
59 <inputs> | |
60 <conditional name="method_opts"> | |
61 <param name="method_opts_selector" type="select" label="Subject database/sequences"> | |
62 <option value="chemfp">Chemfp fingerprint file</option> | |
63 <option value="obabel">OpenBabel Fastsearch Index</option> | |
64 </param> | |
65 <when value="chemfp"> | |
66 <conditional name="query_opts"> | |
2
497254c6c09e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit ed9b6859de648aa5f7cde483732f5df20aaff90e
bgruening
parents:
1
diff
changeset
|
67 <param name="query_opts_selector" type="select" label="Query mode"> |
0 | 68 <option value="normal">Query molecules are stores in a separate file</option> |
69 <option value="nxn">Target molecules are also queries (NxN)</option> | |
70 </param> | |
71 <when value="normal"> | |
72 <param name='query' type='data' format="fps" label='Query molecules'/> | |
73 <param name='targets' type='data' format="fps" label='Target molecules'/> | |
74 </when> | |
75 <when value="nxn"> | |
76 <param name='targets' type='data' format="fps" label='Target moleculs'/> | |
77 </when> | |
78 </conditional> | |
2
497254c6c09e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit ed9b6859de648aa5f7cde483732f5df20aaff90e
bgruening
parents:
1
diff
changeset
|
79 <param name='knn' type='integer' value='0' label='Select the k nearest neighbors' help='0 means all neighbors'> |
0 | 80 <validator type="in_range" min="0" /> |
81 </param> | |
2
497254c6c09e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit ed9b6859de648aa5f7cde483732f5df20aaff90e
bgruening
parents:
1
diff
changeset
|
82 <param name='threshold' type='float' value='0.7' label='Minimum similarity score threshold' /> |
497254c6c09e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit ed9b6859de648aa5f7cde483732f5df20aaff90e
bgruening
parents:
1
diff
changeset
|
83 <param name="counts" type="boolean" truevalue="-c" falsevalue="" checked="false" label="Report counts (-c)" help="Is ignored if k nearest neighbor search is enabled" /> |
0 | 84 </when> |
85 <when value="obabel"> | |
2
497254c6c09e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit ed9b6859de648aa5f7cde483732f5df20aaff90e
bgruening
parents:
1
diff
changeset
|
86 <param name="query" type='data' format="smi,mol,sdf,inchi" label="Query"/> |
0 | 87 <param name="fastsearch" type='data' format="obfs" label="OpenBabel Fastsearch Index"/> |
2
497254c6c09e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit ed9b6859de648aa5f7cde483732f5df20aaff90e
bgruening
parents:
1
diff
changeset
|
88 <param name="threshold" type='float' label="Minimum similarity score threshold" value='0.7'/> |
0 | 89 </when> |
90 </conditional> | |
91 | |
92 </inputs> | |
93 <outputs> | |
94 <data name="outfile" format="tabular" /> | |
95 </outputs> | |
96 <tests> | |
97 <test> | |
98 <param name="targets" ftype="fps" value="targets.fps"/> | |
99 <param name="query" ftype="fps" value="q.fps"/> | |
100 <param name="k" value='4'/> | |
101 <param name="th" value='0.7'/> | |
102 <output name="outfile" ftype="tabular" file="simsearch_on_tragets_and_q.tabular"/> | |
103 </test> | |
104 </tests> | |
105 <help> | |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
106 <![CDATA[ |
0 | 107 |
108 | |
109 .. class:: infomark | |
110 | |
111 **What this tool does** | |
112 | |
113 Similarity searches using a variety of different fingerprints using either the chemfp_ FPS type or the Open Babel FastSearch_ index. | |
114 | |
115 .. _chemfp: http://chemfp.com/ | |
116 .. _FastSearch: http://openbabel.org/wiki/FastSearch | |
117 | |
118 | |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
119 ]]> |
0 | 120 </help> |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
121 <citations> |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
122 <citation type="doi">10.1186/1758-2946-3-33</citation> |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
123 <citation type="doi">10.1186/1758-2946-5-S1-P36</citation> |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
124 </citations> |
0 | 125 </tool> |