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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
9 </requirements>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
20 #if int($method_opts.knn) == 0:
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
21 #set $k = 'all'
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
22 ## count is only available if k nearest neighbor search is disabled
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
23 $method_opts.counts
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
24 #else:
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
25 #set $k = int($method_opts.knn)
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
26 #end if
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
31
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
32 ## build and search an in-memory data structure (faster for multiple queries)
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
33 --memory
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
34
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
37 #else:
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
38 --NxN
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
39 #end if
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
44 #else:
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
45 ## OpenBabel needs the original molecule file (molecule.'fileformat') next to the fastsearch index (molecule.fs). We use a composite datatype to accomplish that.
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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.
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
58 </command>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
59 <inputs>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
60 <conditional name="method_opts">
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
61 <param name="method_opts_selector" type="select" label="Subject database/sequences">
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
62 <option value="chemfp">Chemfp fingerprint file</option>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
63 <option value="obabel">OpenBabel Fastsearch Index</option>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
64 </param>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
65 <when value="chemfp">
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
68 <option value="normal">Query molecules are stores in a separate file</option>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
69 <option value="nxn">Target molecules are also queries (NxN)</option>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
70 </param>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
71 <when value="normal">
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
72 <param name='query' type='data' format="fps" label='Query molecules'/>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
73 <param name='targets' type='data' format="fps" label='Target molecules'/>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
74 </when>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
75 <when value="nxn">
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
76 <param name='targets' type='data' format="fps" label='Target moleculs'/>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
77 </when>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
80 <validator type="in_range" min="0" />
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
84 </when>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
89 </when>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
90 </conditional>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
91
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
92 </inputs>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
93 <outputs>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
94 <data name="outfile" format="tabular" />
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
95 </outputs>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
96 <tests>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
97 <test>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
98 <param name="targets" ftype="fps" value="targets.fps"/>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
99 <param name="query" ftype="fps" value="q.fps"/>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
100 <param name="k" value='4'/>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
101 <param name="th" value='0.7'/>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
102 <output name="outfile" ftype="tabular" file="simsearch_on_tragets_and_q.tabular"/>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
103 </test>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
104 </tests>
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
107
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
108
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
109 .. class:: infomark
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
110
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
111 **What this tool does**
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
112
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
113 Similarity searches using a variety of different fingerprints using either the chemfp_ FPS type or the Open Babel FastSearch_ index.
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
114
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
115 .. _chemfp: http://chemfp.com/
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
116 .. _FastSearch: http://openbabel.org/wiki/FastSearch
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
117
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
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
52e5c0f2907f Uploaded
bgruening
parents:
diff changeset
125 </tool>