Mercurial > repos > bgruening > simsearch
changeset 1:0892f7ced10c draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
author | bgruening |
---|---|
date | Sat, 20 May 2017 13:06:07 -0400 |
parents | 52e5c0f2907f |
children | 497254c6c09e |
files | simsearch.xml test-data/simsearch_on_tragets_and_q.tabular test-data/target.fps test-data/targets.fps tool_dependencies.xml |
diffstat | 5 files changed, 54 insertions(+), 63 deletions(-) [+] |
line wrap: on
line diff
--- a/simsearch.xml Thu Aug 15 03:36:37 2013 -0400 +++ b/simsearch.xml Sat May 20 13:06:07 2017 -0400 @@ -1,12 +1,18 @@ -<tool id="ctb_simsearch" name="Similarity Search" version="0.1.1"> +<tool id="ctb_simsearch" name="Similarity Search" version="0.2"> <description>of fingerprint data sets</description> <requirements> <requirement type="package" version="1.1p1">chemfp</requirement> - <requirement type="package" version="2.3.2">openbabel</requirement> </requirements> <command> +<![CDATA[ #if $method_opts.method_opts_selector == "chemfp": - simsearch + ln -s '${method_opts.query_opts.targets}' ./targets.fps && + + #if $method_opts.query_opts.query_opts_selector == "normal": + ln -s '${method_opts.query_opts.query}' ./query.fps && + #end if + + simsearch #if int($method_opts.knn) == 0: #set $k = 'all' ## count is only available if k nearest neighbor search is disabled @@ -15,38 +21,38 @@ #set $k = int($method_opts.knn) #end if - -k $k - + -k $k --threshold $method_opts.threshold - --query-format fps - --target-format fps - -o "${outfile}" + -o ./output.fps ## build and search an in-memory data structure (faster for multiple queries) --memory #if $method_opts.query_opts.query_opts_selector == "normal": - -q "${method_opts.query_opts.query}" + -q ./query.fps #else: --NxN #end if - "${method_opts.query_opts.targets}" + ./targets.fps + && + mv ./output.fps '${outfile}' #else: ## OpenBabel needs the original molecule file (molecule.'fileformat') next to the fastsearch index (molecule.fs). We use a composite datatype to accomplish that. ## 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. ## A workaround is to create a symlink with a proper file-extension. - #import tempfile - #set $temp_file = tempfile.NamedTemporaryFile() - #set $temp_link = "%s.%s" % ($temp_file.name, $method_opts.query.ext) - $temp_file.close() - ln -s $method_opts.query $temp_link; - obabel -i fs "${os.path.join($method_opts.fastsearch.extra_files_path,'molecule.fs')}" -S "${temp_link}" -at${method_opts.threshold} -O "${outfile}" -osmi -aa 2>&1; - rm $temp_link + ln -s '$method_opts.query' ./temp_query.$method_opts.query.ext + obabel + -i fs '$method_opts.fastsearch.files_path/molecule.fs' + -S ./temp_query.$method_opts.query.ext + -at${method_opts.threshold} + -O '${outfile}' + -osmi + -aa #end if +]]> </command> <inputs> - <conditional name="method_opts"> <param name="method_opts_selector" type="select" label="Subject database/sequences"> <option value="chemfp">Chemfp fingerprint file</option> @@ -93,6 +99,7 @@ </test> </tests> <help> +<![CDATA[ .. class:: infomark @@ -104,18 +111,11 @@ .. _chemfp: http://chemfp.com/ .. _FastSearch: http://openbabel.org/wiki/FastSearch ------ -.. class:: infomark - -**Cite** - -| The chemfp_ project -| -| N M O'Boyle, M Banck, C A James, C Morley, T Vandermeersch and G R Hutchison - `Open Babel: An open chemical toolbox`_ - -.. _`Open Babel: An open chemical toolbox`: http://www.jcheminf.com/content/3/1/33 - - +]]> </help> + <citations> + <citation type="doi">10.1186/1758-2946-3-33</citation> + <citation type="doi">10.1186/1758-2946-5-S1-P36</citation> + </citations> </tool>
--- a/test-data/simsearch_on_tragets_and_q.tabular Thu Aug 15 03:36:37 2013 -0400 +++ b/test-data/simsearch_on_tragets_and_q.tabular Sat May 20 13:06:07 2017 -0400 @@ -1,9 +1,9 @@ #Simsearch/1 #num_bits=881 -#type=Tanimoto k=4 threshold=0.7 -#software=chemfp/1.0 -#queries=q.fps -#targets=target.fps +#type=Tanimoto k=all threshold=0.7 +#software=chemfp/1.1p1 +#queries=./query.fps +#targets=./targets.fps #query_sources=CID_28434379.sdf #target_sources=Desktop/3579363516810334491.sdf -4 28434379 55091752 0.9684 55091466 0.9682 55091416 0.9682 55102353 0.9682 +13 28434379 6499094 0.9615 6485578 0.9679 55079807 0.9313 3153534 0.9557 55102353 0.9682 55091466 0.9682 55091416 0.9682 6485577 0.9497 55169009 0.9560 55091752 0.9684 55091467 0.9623 55168823 0.9563 55091849 0.9563
--- a/test-data/target.fps Thu Aug 15 03:36:37 2013 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -#FPS1 -#num_bits=881 -#type=CACTVS-E_SCREEN/1.0 extended=2 -#software=CACTVS/unknown -#source=Desktop/3579363516810334491.sdf -#date=2012-02-03T13:07:47 -07ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000701487e960cc0bed3248000580644626004101b4844805901b041c2e19511e45039b8b2926101609401b13e40800000000000100200000040080000010000002000000000000 55169009 -07ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000701087e960cc0bed3248000580644626004101b4844805901b041c2e19111e45039b8b2926105609401313e40800000000000100200000040080000010000002000000000000 55079807 -07ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000b01087e960cc0bed3248000580644626004101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 3153534 -07ce0c000000000000000000000000000080060000000c000000000000001a800f0000780008100000103c87e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2926101609401b13e40800000000000100200000040080000010000002000000000000 55168823 -07ce05000000000000000000000000000080060000000c000000000000001a800f0000780008100000101087e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 55102353 -07ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000b01487e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800003000000100200000040080000010000002000000000000 55091849 -07ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000103c87e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 55091752 -07ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000b01487e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800001000000100200000040080000010000002000000000000 55091467 -07ce05000000000000000000000000000080060000000c000000000000001a800f0000780008100000101087e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 55091466 -07ce05000000000000000000000000000080060000000c000000000000001a800f0000780008100000101087e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 55091416 -03ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000101087e960cc0bed3248000580644626004101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 6499094 -03ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000101087e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 6485578 -07ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000b01087e960cc0bed3248000580644626004101b4844805901b041c2e19511e45039b8b2924101609401b13e40800001000000100200000040080000010000002000000000000 6485577
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/targets.fps Sat May 20 13:06:07 2017 -0400 @@ -0,0 +1,19 @@ +#FPS1 +#num_bits=881 +#type=CACTVS-E_SCREEN/1.0 extended=2 +#software=CACTVS/unknown +#source=Desktop/3579363516810334491.sdf +#date=2012-02-03T13:07:47 +07ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000701487e960cc0bed3248000580644626004101b4844805901b041c2e19511e45039b8b2926101609401b13e40800000000000100200000040080000010000002000000000000 55169009 +07ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000701087e960cc0bed3248000580644626004101b4844805901b041c2e19111e45039b8b2926105609401313e40800000000000100200000040080000010000002000000000000 55079807 +07ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000b01087e960cc0bed3248000580644626004101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 3153534 +07ce0c000000000000000000000000000080060000000c000000000000001a800f0000780008100000103c87e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2926101609401b13e40800000000000100200000040080000010000002000000000000 55168823 +07ce05000000000000000000000000000080060000000c000000000000001a800f0000780008100000101087e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 55102353 +07ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000b01487e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800003000000100200000040080000010000002000000000000 55091849 +07ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000103c87e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 55091752 +07ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000b01487e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800001000000100200000040080000010000002000000000000 55091467 +07ce05000000000000000000000000000080060000000c000000000000001a800f0000780008100000101087e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 55091466 +07ce05000000000000000000000000000080060000000c000000000000001a800f0000780008100000101087e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 55091416 +03ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000101087e960cc0bed3248000580644626004101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 6499094 +03ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000101087e960cc0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 6485578 +07ce04000000000000000000000000000080060000000c000000000000001a800f0000780008100000b01087e960cc0bed3248000580644626004101b4844805901b041c2e19511e45039b8b2924101609401b13e40800001000000100200000040080000010000002000000000000 6485577
--- a/tool_dependencies.xml Thu Aug 15 03:36:37 2013 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -<?xml version="1.0"?> -<tool_dependency> - <package name="openbabel" version="2.3.2"> - <repository changeset_revision="99a10425de93" name="package_openbabel_2_3" owner="iuc" toolshed="http://toolshed.g2.bx.psu.edu" /> - </package> - <package name="chemfp" version="1.1p1"> - <repository changeset_revision="f2676c09c535" name="package_chemfp_1_1" owner="iuc" toolshed="http://toolshed.g2.bx.psu.edu" /> - </package> -</tool_dependency>