How to use the pyopencga.rest_clients._parent_rest_clients._ParentAclRestClient function in pyopencga

To help you get started, we’ve selected a few pyopencga examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github opencb / opencga / opencga-client / src / main / python / pyOpenCGA / pyopencga / rest_clients / panel_client.py View on Github external
from pyopencga.rest_clients._parent_rest_clients import _ParentBasicCRUDClient, _ParentAclRestClient

class Panels(_ParentBasicCRUDClient, _ParentAclRestClient):
    """
    This class contains the methods for Panels webservices
    """

    def __init__(self, configuration, session_id=None, login_handler=None, *args, **kwargs):
        _category = 'panels'
        super(Panels, self).__init__(configuration, _category, session_id, login_handler, *args, **kwargs)


    def search(self, **options):
        """
        Panel search
        URL: /{apiVersion}/panels/search

        :param study: Study [[user@]project:]study
        :param name: Panel name
github opencb / opencga / opencga-client / src / main / python / pyOpenCGA / pyopencga / rest_clients / job_client.py View on Github external
from pyopencga.rest_clients._parent_rest_clients import _ParentBasicCRUDClient, _ParentAclRestClient

class Jobs(_ParentBasicCRUDClient, _ParentAclRestClient):
    """
    This class cotains methods for the Jobs webservice
    """

    def __init__(self, configuration, session_id=None, login_handler=None, *args, **kwargs):
        _category = 'jobs'
        super(Jobs, self).__init__(configuration, _category, session_id, login_handler, *args, **kwargs)


    def search(self, **options):
        """
        Job search method
        URL: /{apiVersion}/jobs/search
        
        :param study: study [[user@]project:]study where study and project can be either the id or alias
        :param name: name
github opencb / opencga / opencga-client / src / main / python / pyOpenCGA / pyopencga / rest_clients / clinical_client.py View on Github external
:param action: Action to be performed [ADD, SET, REMOVE]
        """

        return self._post('interpretations', query_id=clinical_analysis, subquery_id=interpretation,
                          subcategory='comments/update', data=data, action=action, **options)

    def update_reported_variants(self, clinical_analysis, interpretation, data, **options):
        """
        Update reported variants of an interpretation
        URL: /{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretations/{interpretation}/reportedVariants/update
        """

        return self._post('interpretations', query_id=clinical_analysis, subquery_id=interpretation,
                           subcategory='reportedVariants/update', data=data, **options)

class Clinical(_ParentBasicCRUDClient, _ParentAclRestClient):
    """
    This class contains methods for the Analysis - Clinical webservices
    """

    def __init__(self, configuration, session_id=None, login_handler=None, *args, **kwargs):
        _category  = 'analysis/clinical'
        super(Clinical, self).__init__(configuration, _category, session_id, login_handler, *args, **kwargs)

        self.configuration = configuration
        self.session_id = session_id
        self.login_handler = login_handler
        self._create_clients()

    def _create_clients(self):

        ## undef all
github opencb / opencga / opencga-client / src / main / python / pyOpenCGA / pyopencga / rest_clients / study_client.py View on Github external
from pyopencga.rest_clients._parent_rest_clients import _ParentBasicCRUDClient, _ParentAclRestClient

class Studies(_ParentBasicCRUDClient, _ParentAclRestClient):
    """
    This class contains method for the Studies webservices
    """

    def __init__(self, configuration, session_id=None, login_handler=None, *args, **kwargs):
        _category = 'studies'
        super(Studies, self).__init__(configuration, _category, session_id, login_handler, *args, **kwargs)


    def aggregation_stats(self, study, **options):
        """
        Fetch catalog study stats
        URL: /{apiVersion}/studies/{studies}/aggregationStats

        :param study: study id
        :param default: calculate default stats (bool)