Mercurial > repos > shellac > sam_consensus_v3
diff env/lib/python3.9/site-packages/bioblend/galaxy/visual/__init__.py @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/env/lib/python3.9/site-packages/bioblend/galaxy/visual/__init__.py Mon Mar 22 18:12:50 2021 +0000 @@ -0,0 +1,57 @@ +""" +Contains possible interactions with the Galaxy visualization +""" +from bioblend.galaxy.client import Client + + +class VisualClient(Client): + + def __init__(self, galaxy_instance): + self.module = 'visualizations' + super().__init__(galaxy_instance) + + def get_visualizations(self): + """ + Get the list of all visualizations. + + :rtype: list + :return: A list of dicts with details on individual visualizations. + For example:: + + [{'dbkey': 'eschColi_K12', + 'id': 'df1c7c96fc427c2d', + 'title': 'AVTest1', + 'type': 'trackster', + 'url': '/api/visualizations/df1c7c96fc427c2d'}, + {'dbkey': 'mm9', + 'id': 'a669f50f8bf55b02', + 'title': 'Bam to Bigwig', + 'type': 'trackster', + 'url': '/api/visualizations/a669f50f8bf55b02'}] + """ + return self._get() + + def show_visualization(self, visual_id): + """ + Get details of a given visualization. + + :type visual_id: str + :param visual_id: Encoded visualization ID + + :rtype: dict + :return: A description of the given visualization. + For example:: + + {'annotation': None, + 'dbkey': 'mm9', + 'id': '18df9134ea75e49c', + 'latest_revision': { ... }, + 'model_class': 'Visualization', + 'revisions': ['aa90649bb3ec7dcb', '20622bc6249c0c71'], + 'slug': 'visualization-for-grant-1', + 'title': 'Visualization For Grant', + 'type': 'trackster', + 'url': '/u/azaron/v/visualization-for-grant-1', + 'user_id': '21e4aed91386ca8b'} + """ + return self._get(id=visual_id)