Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/bioblend/toolshed/tools/__init__.py @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4f3585e2f14b |
---|---|
1 """ | |
2 Interaction with a Tool Shed instance tools | |
3 """ | |
4 from bioblend.galaxy.client import Client | |
5 | |
6 | |
7 class ToolShedToolClient(Client): | |
8 | |
9 def __init__(self, toolshed_instance): | |
10 self.module = 'tools' | |
11 super().__init__(toolshed_instance) | |
12 | |
13 def search_tools(self, q, page=1, page_size=10): | |
14 """ | |
15 Search for tools in a Galaxy Tool Shed. | |
16 | |
17 :type q: str | |
18 :param q: query string for searching purposes | |
19 | |
20 :type page: int | |
21 :param page: page requested | |
22 | |
23 :type page_size: int | |
24 :param page_size: page size requested | |
25 | |
26 :rtype: dict | |
27 :return: dictionary containing search hits as well as metadata for the | |
28 search. For example:: | |
29 | |
30 {'hits': [{'matched_terms': [], | |
31 'score': 3.0, | |
32 'tool': {'description': 'convert between various FASTQ quality formats', | |
33 'id': '69819b84d55f521efda001e0926e7233', | |
34 'name': 'FASTQ Groomer', | |
35 'repo_name': None, | |
36 'repo_owner_username': 'devteam'}}, | |
37 {'matched_terms': [], | |
38 'score': 3.0, | |
39 'tool': {'description': 'converts a bam file to fastq files.', | |
40 'id': '521e282770fd94537daff87adad2551b', | |
41 'name': 'Defuse BamFastq', | |
42 'repo_name': None, | |
43 'repo_owner_username': 'jjohnson'}}], | |
44 'hostname': 'https://testtoolshed.g2.bx.psu.edu/', | |
45 'page': '1', | |
46 'page_size': '2', | |
47 'total_results': '118'} | |
48 """ | |
49 params = dict(q=q, page=page, page_size=page_size) | |
50 return self._get(params=params) |