"""
WARNING: AUTOGENERATED CODE

    This code was generated by a tool.
    
    Manual changes to this file may cause unexpected behavior in your application.
    Manual changes to this file will be overwritten if the code is regenerated.
"""

from pyopencga_enterprise_enterprise.rest_clients._parent_rest_clients import _ParentRestClient


class ClinicalAnalysis(_ParentRestClient):
    """
    This class contains methods for the 'Analysis - Clinical' webservices
    PATH: /{apiVersion}/analysis/clinical
    """

    def __init__(self, configuration, token=None, login_handler=None, *args, **kwargs):
        super(ClinicalAnalysis, self).__init__(configuration, token, login_handler, *args, **kwargs)

    def update_acl(self, members, action, data=None, **options):
        """
        Update the set of permissions granted for the member.
        PATH: /{apiVersion}/analysis/clinical/acl/{members}/update

        :param dict data: JSON containing the parameters to add ACLs.
            (REQUIRED)
        :param str action: Action to be performed [ADD, SET, REMOVE or RESET].
            Allowed values: ['SET ADD REMOVE RESET'] (REQUIRED)
        :param str members: Comma separated list of user or group IDs.
            (REQUIRED)
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param bool propagate: Propagate permissions to related families,
            individuals, samples and files.
        """

        options['action'] = action
        return self._post(category='analysis', resource='update', subcategory='clinical/acl', second_query_id=members, data=data, **options)

    def aggregation_stats(self, **options):
        """
        Fetch catalog clinical analysis aggregation stats.
        PATH: /{apiVersion}/analysis/clinical/aggregationStats

        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str id: Comma separated list of Clinical Analysis IDs up to a
            maximum of 100. Also admits basic regular expressions using the
            operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
            sensitive, '~/value/i' for case insensitive search.
        :param str uuid: Comma separated list of Clinical Analysis UUIDs up to
            a maximum of 100.
        :param str type: Clinical Analysis type.
        :param str disorder: Clinical Analysis disorder. Also admits basic
            regular expressions using the operator '~', i.e. '~{perl-regex}'
            e.g. '~value' for case sensitive, '~/value/i' for case insensitive
            search.
        :param str files: Clinical Analysis files.
        :param str sample: Sample associated to the proband or any member of a
            family.
        :param str individual: Proband or any member of a family.
        :param str proband: Clinical Analysis proband.
        :param str proband_samples: Clinical Analysis proband samples.
        :param str family: Clinical Analysis family.
        :param str family_members: Clinical Analysis family members.
        :param str family_member_samples: Clinical Analysis family members
            samples.
        :param str panels: Clinical Analysis panels.
        :param bool locked: Locked Clinical Analyses.
        :param str analyst_id: Clinical Analysis analyst id.
        :param str priority: Clinical Analysis priority.
        :param str flags: Clinical Analysis flags.
        :param str creation_date: Clinical Analysis Creation date. Format:
            yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str modification_date: Clinical Analysis Modification date.
            Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str due_date: Clinical Analysis due date. Format:
            yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str quality_control_summary: Clinical Analysis quality control
            summary.
        :param str release: Release when it was created.
        :param int snapshot: Snapshot value (Latest version of the entry in
            the specified release).
        :param str status: Filter by status.
        :param str internal_status: Filter by internal status.
        :param str annotation: Annotation filters. Example:
            age>30;gender=FEMALE. For more information, please visit
            http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
        :param bool deleted: Boolean to retrieve deleted entries.
        :param str field: Field to apply aggregation statistics to (or a list
            of fields separated by semicolons), e.g.:
            studies;type;numSamples[0..10]:1;format:sum(size).
        """

        return self._get(category='analysis', resource='aggregationStats', subcategory='clinical', **options)

    def load_annotation_sets(self, variable_set_id, path, data=None, **options):
        """
        Load annotation sets from a TSV file.
        PATH: /{apiVersion}/analysis/clinical/annotationSets/load

        :param str path: Path where the TSV file is located in OpenCGA or
            where it should be located. (REQUIRED)
        :param str variable_set_id: Variable set ID or name. (REQUIRED)
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param bool parents: Flag indicating whether to create parent
            directories if they don't exist (only when TSV file was not
            previously associated).
        :param str annotation_set_id: Annotation set id. If not provided,
            variableSetId will be used.
        :param dict data: JSON containing the 'content' of the TSV file if
            this has not yet been registered into OpenCGA.
        """

        options['variableSetId'] = variable_set_id
        options['path'] = path
        return self._post(category='analysis', resource='load', subcategory='clinical/annotationSets', data=data, **options)

    def update_clinical_configuration(self, data=None, **options):
        """
        Update Clinical Analysis configuration.
        PATH: /{apiVersion}/analysis/clinical/clinical/configuration/update

        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param dict data: Configuration params to update.
        """

        return self._post(category='analysis', resource='update', subcategory='clinical/clinical/configuration', data=data, **options)

    def create(self, data=None, **options):
        """
        Create a new clinical analysis.
        PATH: /{apiVersion}/analysis/clinical/create

        :param dict data: JSON containing clinical analysis information.
            (REQUIRED)
        :param str include: Fields included in the response, whole JSON path
            must be provided.
        :param str exclude: Fields excluded in the response, whole JSON path
            must be provided.
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param bool skip_create_default_interpretation: Flag to skip creating
            and initialise an empty default primary interpretation (Id will be
            '{clinicalAnalysisId}.1'). This flag is only considered if no
            Interpretation object is passed.
        :param bool include_result: Flag indicating to include the created or
            updated document result in the response.
        """

        return self._post(category='analysis', resource='create', subcategory='clinical', data=data, **options)

    def distinct(self, field, **options):
        """
        Clinical Analysis distinct method.
        PATH: /{apiVersion}/analysis/clinical/distinct

        :param str field: Comma separated list of fields for which to obtain
            the distinct values. (REQUIRED)
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str id: Comma separated list of Clinical Analysis IDs up to a
            maximum of 100. Also admits basic regular expressions using the
            operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
            sensitive, '~/value/i' for case insensitive search.
        :param str uuid: Comma separated list of Clinical Analysis UUIDs up to
            a maximum of 100.
        :param str type: Clinical Analysis type.
        :param str disorder: Clinical Analysis disorder. Also admits basic
            regular expressions using the operator '~', i.e. '~{perl-regex}'
            e.g. '~value' for case sensitive, '~/value/i' for case insensitive
            search.
        :param str files: Clinical Analysis files.
        :param str sample: Sample associated to the proband or any member of a
            family.
        :param str individual: Proband or any member of a family.
        :param str proband: Clinical Analysis proband.
        :param str proband_samples: Clinical Analysis proband samples.
        :param str family: Clinical Analysis family.
        :param str family_members: Clinical Analysis family members.
        :param str family_member_samples: Clinical Analysis family members
            samples.
        :param str panels: Clinical Analysis panels.
        :param bool locked: Locked Clinical Analyses.
        :param str analyst_id: Clinical Analysis analyst id.
        :param str priority: Clinical Analysis priority.
        :param str flags: Clinical Analysis flags.
        :param str creation_date: Clinical Analysis Creation date. Format:
            yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str modification_date: Clinical Analysis Modification date.
            Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str due_date: Clinical Analysis due date. Format:
            yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str quality_control_summary: Clinical Analysis quality control
            summary.
        :param str release: Release when it was created.
        :param int snapshot: Snapshot value (Latest version of the entry in
            the specified release).
        :param str status: Filter by status.
        :param str internal_status: Filter by internal status.
        :param str annotation: Annotation filters. Example:
            age>30;gender=FEMALE. For more information, please visit
            http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
        :param bool deleted: Boolean to retrieve deleted entries.
        """

        options['field'] = field
        return self._get(category='analysis', resource='distinct', subcategory='clinical', **options)

    def aggregation_stats_interpretation(self, **options):
        """
        Fetch catalog interpretation aggregation stats.
        PATH: /{apiVersion}/analysis/clinical/interpretation/aggregationStats

        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str id: Comma separated list of Interpretation IDs up to a
            maximum of 100. Also admits basic regular expressions using the
            operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
            sensitive, '~/value/i' for case insensitive search.
        :param str uuid: Comma separated list of Interpretation UUIDs up to a
            maximum of 100.
        :param str name: Comma separated list of Interpretation names up to a
            maximum of 100.
        :param str clinical_analysis_id: Clinical Analysis id.
        :param str analyst_id: Analyst ID.
        :param str method_name: Interpretation method name. Also admits basic
            regular expressions using the operator '~', i.e. '~{perl-regex}'
            e.g. '~value' for case sensitive, '~/value/i' for case insensitive
            search.
        :param str panels: Interpretation panels.
        :param str primary_findings: Interpretation primary findings.
        :param str secondary_findings: Interpretation secondary findings.
        :param str creation_date: Interpretation Creation date. Format:
            yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str modification_date: Interpretation Modification date.
            Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str status: Filter by status.
        :param str internal_status: Filter by internal status.
        :param str release: Release when it was created.
        :param str field: Field to apply aggregation statistics to (or a list
            of fields separated by semicolons), e.g.:
            studies;type;numSamples[0..10]:1;format:sum(size).
        """

        return self._get(category='analysis', resource='aggregationStats', subcategory='clinical/interpretation', **options)

    def distinct_interpretation(self, field, **options):
        """
        Interpretation distinct method.
        PATH: /{apiVersion}/analysis/clinical/interpretation/distinct

        :param str field: Comma separated list of fields for which to obtain
            the distinct values. (REQUIRED)
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str id: Comma separated list of Interpretation IDs up to a
            maximum of 100. Also admits basic regular expressions using the
            operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
            sensitive, '~/value/i' for case insensitive search.
        :param str uuid: Comma separated list of Interpretation UUIDs up to a
            maximum of 100.
        :param str name: Comma separated list of Interpretation names up to a
            maximum of 100.
        :param str clinical_analysis_id: Clinical Analysis id.
        :param str analyst_id: Analyst ID.
        :param str method_name: Interpretation method name. Also admits basic
            regular expressions using the operator '~', i.e. '~{perl-regex}'
            e.g. '~value' for case sensitive, '~/value/i' for case insensitive
            search.
        :param str panels: Interpretation panels.
        :param str primary_findings: Interpretation primary findings.
        :param str secondary_findings: Interpretation secondary findings.
        :param str creation_date: Interpretation Creation date. Format:
            yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str modification_date: Interpretation Modification date.
            Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str status: Filter by status.
        :param str internal_status: Filter by internal status.
        :param str release: Release when it was created.
        """

        options['field'] = field
        return self._get(category='analysis', resource='distinct', subcategory='clinical/interpretation', **options)

    def search_interpretation(self, **options):
        """
        Search clinical interpretations.
        PATH: /{apiVersion}/analysis/clinical/interpretation/search

        :param str include: Fields included in the response, whole JSON path
            must be provided.
        :param str exclude: Fields excluded in the response, whole JSON path
            must be provided.
        :param int limit: Number of results to be returned.
        :param int skip: Number of results to skip.
        :param bool sort: Sort the results.
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str id: Comma separated list of Interpretation IDs up to a
            maximum of 100. Also admits basic regular expressions using the
            operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
            sensitive, '~/value/i' for case insensitive search.
        :param str uuid: Comma separated list of Interpretation UUIDs up to a
            maximum of 100.
        :param str name: Comma separated list of Interpretation names up to a
            maximum of 100.
        :param str clinical_analysis_id: Clinical Analysis id.
        :param str analyst_id: Analyst ID.
        :param str method_name: Interpretation method name. Also admits basic
            regular expressions using the operator '~', i.e. '~{perl-regex}'
            e.g. '~value' for case sensitive, '~/value/i' for case insensitive
            search.
        :param str panels: Interpretation panels.
        :param str primary_findings: Interpretation primary findings.
        :param str secondary_findings: Interpretation secondary findings.
        :param str creation_date: Interpretation Creation date. Format:
            yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str modification_date: Interpretation Modification date.
            Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str status: Filter by status.
        :param str internal_status: Filter by internal status.
        :param str release: Release when it was created.
        """

        return self._get(category='analysis', resource='search', subcategory='clinical/interpretation', **options)

    def info_interpretation(self, interpretations, **options):
        """
        Clinical interpretation information.
        PATH: /{apiVersion}/analysis/clinical/interpretation/{interpretations}/info

        :param str interpretations: Comma separated list of clinical
            interpretation IDs  up to a maximum of 100. (REQUIRED)
        :param str include: Fields included in the response, whole JSON path
            must be provided.
        :param str exclude: Fields excluded in the response, whole JSON path
            must be provided.
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str version: Comma separated list of interpretation versions.
            'all' to get all the interpretation versions. Not supported if
            multiple interpretation ids are provided.
        :param bool deleted: Boolean to retrieve deleted entries.
        """

        return self._get(category='analysis', resource='info', subcategory='clinical/interpretation', second_query_id=interpretations, **options)

    def run_interpreter_cancer_tiering(self, data=None, **options):
        """
        Run cancer tiering interpretation analysis.
        PATH: /{apiVersion}/analysis/clinical/interpreter/cancerTiering/run

        :param dict data: Cancer tiering interpretation analysis params.
            (REQUIRED)
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str job_id: Job ID. It must be a unique string within the
            study. An ID will be autogenerated automatically if not provided.
        :param str job_description: Job description.
        :param str job_depends_on: Comma separated list of existing job IDs
            the job will depend on.
        :param str job_tags: Job tags.
        :param str job_scheduled_start_time: Time when the job is scheduled to
            start.
        :param str job_priority: Priority of the job.
        :param bool job_dry_run: Flag indicating that the job will be executed
            in dry-run mode. In this mode, OpenCGA will validate that all
            parameters and prerequisites are correctly set for successful
            execution, but the job will not actually run.
        """

        return self._post(category='analysis', resource='run', subcategory='clinical/interpreter/cancerTiering', data=data, **options)

    def run_interpreter_exomiser(self, data=None, **options):
        """
        Run exomiser interpretation analysis.
        PATH: /{apiVersion}/analysis/clinical/interpreter/exomiser/run

        :param dict data: Exomiser interpretation analysis params. (REQUIRED)
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str job_id: Job ID. It must be a unique string within the
            study. An ID will be autogenerated automatically if not provided.
        :param str job_description: Job description.
        :param str job_depends_on: Comma separated list of existing job IDs
            the job will depend on.
        :param str job_tags: Job tags.
        :param str job_scheduled_start_time: Time when the job is scheduled to
            start.
        :param str job_priority: Priority of the job.
        :param bool job_dry_run: Flag indicating that the job will be executed
            in dry-run mode. In this mode, OpenCGA will validate that all
            parameters and prerequisites are correctly set for successful
            execution, but the job will not actually run.
        """

        return self._post(category='analysis', resource='run', subcategory='clinical/interpreter/exomiser', data=data, **options)

    def run_interpreter_team(self, data=None, **options):
        """
        Run TEAM interpretation analysis.
        PATH: /{apiVersion}/analysis/clinical/interpreter/team/run

        :param dict data: TEAM interpretation analysis params. (REQUIRED)
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str job_id: Job ID. It must be a unique string within the
            study. An ID will be autogenerated automatically if not provided.
        :param str job_description: Job description.
        :param str job_depends_on: Comma separated list of existing job IDs
            the job will depend on.
        :param str job_tags: Job tags.
        :param str job_scheduled_start_time: Time when the job is scheduled to
            start.
        :param str job_priority: Priority of the job.
        :param bool job_dry_run: Flag indicating that the job will be executed
            in dry-run mode. In this mode, OpenCGA will validate that all
            parameters and prerequisites are correctly set for successful
            execution, but the job will not actually run.
        """

        return self._post(category='analysis', resource='run', subcategory='clinical/interpreter/team', data=data, **options)

    def run_interpreter_tiering(self, data=None, **options):
        """
        Run tiering interpretation analysis.
        PATH: /{apiVersion}/analysis/clinical/interpreter/tiering/run

        :param dict data: Tiering interpretation analysis params. (REQUIRED)
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str job_id: Job ID. It must be a unique string within the
            study. An ID will be autogenerated automatically if not provided.
        :param str job_description: Job description.
        :param str job_depends_on: Comma separated list of existing job IDs
            the job will depend on.
        :param str job_tags: Job tags.
        :param str job_scheduled_start_time: Time when the job is scheduled to
            start.
        :param str job_priority: Priority of the job.
        :param bool job_dry_run: Flag indicating that the job will be executed
            in dry-run mode. In this mode, OpenCGA will validate that all
            parameters and prerequisites are correctly set for successful
            execution, but the job will not actually run.
        """

        return self._post(category='analysis', resource='run', subcategory='clinical/interpreter/tiering', data=data, **options)

    def run_interpreter_zetta(self, data=None, **options):
        """
        Run Zetta interpretation analysis.
        PATH: /{apiVersion}/analysis/clinical/interpreter/zetta/run

        :param dict data: Zetta interpretation analysis params. (REQUIRED)
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str job_id: Job ID. It must be a unique string within the
            study. An ID will be autogenerated automatically if not provided.
        :param str job_description: Job description.
        :param str job_depends_on: Comma separated list of existing job IDs
            the job will depend on.
        :param str job_tags: Job tags.
        :param str job_scheduled_start_time: Time when the job is scheduled to
            start.
        :param str job_priority: Priority of the job.
        :param bool job_dry_run: Flag indicating that the job will be executed
            in dry-run mode. In this mode, OpenCGA will validate that all
            parameters and prerequisites are correctly set for successful
            execution, but the job will not actually run.
        """

        return self._post(category='analysis', resource='run', subcategory='clinical/interpreter/zetta', data=data, **options)

    def load(self, data=None, **options):
        """
        Load clinical analyses from a file.
        PATH: /{apiVersion}/analysis/clinical/load

        :param dict data: Parameters to load clinical analysis in OpenCGA
            catalog from a file. (REQUIRED)
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str job_id: Job ID. It must be a unique string within the
            study. An ID will be autogenerated automatically if not provided.
        :param str job_description: Job description.
        :param str job_depends_on: Comma separated list of existing job IDs
            the job will depend on.
        :param str job_tags: Job tags.
        :param str job_scheduled_start_time: Time when the job is scheduled to
            start.
        :param str job_priority: Priority of the job.
        :param bool job_dry_run: Flag indicating that the job will be executed
            in dry-run mode. In this mode, OpenCGA will validate that all
            parameters and prerequisites are correctly set for successful
            execution, but the job will not actually run.
        """

        return self._post(category='analysis', resource='load', subcategory='clinical', data=data, **options)

    def aggregation_stats_rga(self, field, **options):
        """
        RGA aggregation stats.
        PATH: /{apiVersion}/analysis/clinical/rga/aggregationStats

        :param str field: List of fields separated by semicolons, e.g.:
            clinicalSignificances;type. For nested fields use >>, e.g.:
            type>>clinicalSignificances;knockoutType. (REQUIRED)
        :param int limit: Number of results to be returned.
        :param int skip: Number of results to skip.
        :param str sample_id: Filter by sample id.
        :param str individual_id: Filter by individual id.
        :param str sex: Filter by sex.
        :param str phenotypes: Filter by phenotypes.
        :param str disorders: Filter by disorders.
        :param str num_parents: Filter by the number of parents registered.
        :param str gene_id: Filter by gene id.
        :param str gene_name: Filter by gene name.
        :param str chromosome: Filter by chromosome.
        :param str start: Filter by start position.
        :param str end: Filter by end position.
        :param str transcript_id: Filter by transcript id.
        :param str variants: Filter by variant id.
        :param str db_snps: Filter by DB_SNP id.
        :param str knockout_type: Filter by knockout type.
        :param str filter: Filter by filter (PASS, NOT_PASS).
        :param str type: Filter by variant type.
        :param str clinical_significance: Filter by clinical significance.
        :param str population_frequency: Filter by population frequency.
        :param str consequence_type: Filter by consequence type.
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        """

        options['field'] = field
        return self._get(category='analysis', resource='aggregationStats', subcategory='clinical/rga', **options)

    def query_rga_gene(self, **options):
        """
        Query gene RGA.
        PATH: /{apiVersion}/analysis/clinical/rga/gene/query

        :param str include: Fields included in the response, whole JSON path
            must be provided.
        :param str exclude: Fields excluded in the response, whole JSON path
            must be provided.
        :param int limit: Number of results to be returned.
        :param int skip: Number of results to skip.
        :param bool count: Get the total number of results matching the query.
            Deactivated by default.
        :param str include_individual: Include only the comma separated list
            of individuals to the response.
        :param int skip_individual: Number of individuals to skip.
        :param int limit_individual: Limit number of individuals returned
            (default: 1000).
        :param str sample_id: Filter by sample id.
        :param str individual_id: Filter by individual id.
        :param str sex: Filter by sex.
        :param str phenotypes: Filter by phenotypes.
        :param str disorders: Filter by disorders.
        :param str num_parents: Filter by the number of parents registered.
        :param str gene_id: Filter by gene id.
        :param str gene_name: Filter by gene name.
        :param str chromosome: Filter by chromosome.
        :param str start: Filter by start position.
        :param str end: Filter by end position.
        :param str transcript_id: Filter by transcript id.
        :param str variants: Filter by variant id.
        :param str db_snps: Filter by DB_SNP id.
        :param str knockout_type: Filter by knockout type.
        :param str filter: Filter by filter (PASS, NOT_PASS).
        :param str type: Filter by variant type.
        :param str clinical_significance: Filter by clinical significance.
        :param str population_frequency: Filter by population frequency.
        :param str consequence_type: Filter by consequence type.
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        """

        return self._get(category='analysis', resource='query', subcategory='clinical/rga/gene', **options)

    def summary_rga_gene(self, **options):
        """
        RGA gene summary stats.
        PATH: /{apiVersion}/analysis/clinical/rga/gene/summary

        :param int limit: Number of results to be returned.
        :param int skip: Number of results to skip.
        :param bool count: Get the total number of results matching the query.
            Deactivated by default.
        :param str sample_id: Filter by sample id.
        :param str individual_id: Filter by individual id.
        :param str sex: Filter by sex.
        :param str phenotypes: Filter by phenotypes.
        :param str disorders: Filter by disorders.
        :param str num_parents: Filter by the number of parents registered.
        :param str gene_id: Filter by gene id.
        :param str gene_name: Filter by gene name.
        :param str chromosome: Filter by chromosome.
        :param str start: Filter by start position.
        :param str end: Filter by end position.
        :param str transcript_id: Filter by transcript id.
        :param str variants: Filter by variant id.
        :param str db_snps: Filter by DB_SNP id.
        :param str knockout_type: Filter by knockout type.
        :param str filter: Filter by filter (PASS, NOT_PASS).
        :param str type: Filter by variant type.
        :param str clinical_significance: Filter by clinical significance.
        :param str population_frequency: Filter by population frequency.
        :param str consequence_type: Filter by consequence type.
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        """

        return self._get(category='analysis', resource='summary', subcategory='clinical/rga/gene', **options)

    def run_rga_index(self, data=None, **options):
        """
        Generate Recessive Gene Analysis secondary index.
        PATH: /{apiVersion}/analysis/clinical/rga/index/run

        :param dict data: Recessive Gene Analysis index params. (REQUIRED)
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str job_id: Job ID. It must be a unique string within the
            study. An ID will be autogenerated automatically if not provided.
        :param str job_description: Job description.
        :param str job_depends_on: Comma separated list of existing job IDs
            the job will depend on.
        :param str job_tags: Job tags.
        :param str job_scheduled_start_time: Time when the job is scheduled to
            start.
        :param str job_priority: Priority of the job.
        :param bool job_dry_run: Flag indicating that the job will be executed
            in dry-run mode. In this mode, OpenCGA will validate that all
            parameters and prerequisites are correctly set for successful
            execution, but the job will not actually run.
        :param bool auxiliar_index: Index auxiliar collection to improve
            performance assuming RGA is completely indexed.
        """

        return self._post(category='analysis', resource='run', subcategory='clinical/rga/index', data=data, **options)

    def query_rga_individual(self, **options):
        """
        Query individual RGA.
        PATH: /{apiVersion}/analysis/clinical/rga/individual/query

        :param str include: Fields included in the response, whole JSON path
            must be provided.
        :param str exclude: Fields excluded in the response, whole JSON path
            must be provided.
        :param int limit: Number of results to be returned.
        :param int skip: Number of results to skip.
        :param bool count: Get the total number of results matching the query.
            Deactivated by default.
        :param str sample_id: Filter by sample id.
        :param str individual_id: Filter by individual id.
        :param str sex: Filter by sex.
        :param str phenotypes: Filter by phenotypes.
        :param str disorders: Filter by disorders.
        :param str num_parents: Filter by the number of parents registered.
        :param str gene_id: Filter by gene id.
        :param str gene_name: Filter by gene name.
        :param str chromosome: Filter by chromosome.
        :param str start: Filter by start position.
        :param str end: Filter by end position.
        :param str transcript_id: Filter by transcript id.
        :param str variants: Filter by variant id.
        :param str db_snps: Filter by DB_SNP id.
        :param str knockout_type: Filter by knockout type.
        :param str filter: Filter by filter (PASS, NOT_PASS).
        :param str type: Filter by variant type.
        :param str clinical_significance: Filter by clinical significance.
        :param str population_frequency: Filter by population frequency.
        :param str consequence_type: Filter by consequence type.
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        """

        return self._get(category='analysis', resource='query', subcategory='clinical/rga/individual', **options)

    def summary_rga_individual(self, **options):
        """
        RGA individual summary stats.
        PATH: /{apiVersion}/analysis/clinical/rga/individual/summary

        :param int limit: Number of results to be returned.
        :param int skip: Number of results to skip.
        :param bool count: Get the total number of results matching the query.
            Deactivated by default.
        :param str sample_id: Filter by sample id.
        :param str individual_id: Filter by individual id.
        :param str sex: Filter by sex.
        :param str phenotypes: Filter by phenotypes.
        :param str disorders: Filter by disorders.
        :param str num_parents: Filter by the number of parents registered.
        :param str gene_id: Filter by gene id.
        :param str gene_name: Filter by gene name.
        :param str chromosome: Filter by chromosome.
        :param str start: Filter by start position.
        :param str end: Filter by end position.
        :param str transcript_id: Filter by transcript id.
        :param str variants: Filter by variant id.
        :param str db_snps: Filter by DB_SNP id.
        :param str knockout_type: Filter by knockout type.
        :param str filter: Filter by filter (PASS, NOT_PASS).
        :param str type: Filter by variant type.
        :param str clinical_significance: Filter by clinical significance.
        :param str population_frequency: Filter by population frequency.
        :param str consequence_type: Filter by consequence type.
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        """

        return self._get(category='analysis', resource='summary', subcategory='clinical/rga/individual', **options)

    def query_rga_variant(self, **options):
        """
        Query variant RGA.
        PATH: /{apiVersion}/analysis/clinical/rga/variant/query

        :param str include: Fields included in the response, whole JSON path
            must be provided.
        :param str exclude: Fields excluded in the response, whole JSON path
            must be provided.
        :param int limit: Number of results to be returned.
        :param int skip: Number of results to skip.
        :param bool count: Get the total number of results matching the query.
            Deactivated by default.
        :param str include_individual: Include only the comma separated list
            of individuals to the response.
        :param int skip_individual: Number of individuals to skip.
        :param int limit_individual: Limit number of individuals returned
            (default: 1000).
        :param str sample_id: Filter by sample id.
        :param str individual_id: Filter by individual id.
        :param str sex: Filter by sex.
        :param str phenotypes: Filter by phenotypes.
        :param str disorders: Filter by disorders.
        :param str num_parents: Filter by the number of parents registered.
        :param str gene_id: Filter by gene id.
        :param str gene_name: Filter by gene name.
        :param str chromosome: Filter by chromosome.
        :param str start: Filter by start position.
        :param str end: Filter by end position.
        :param str transcript_id: Filter by transcript id.
        :param str variants: Filter by variant id.
        :param str db_snps: Filter by DB_SNP id.
        :param str knockout_type: Filter by knockout type.
        :param str filter: Filter by filter (PASS, NOT_PASS).
        :param str type: Filter by variant type.
        :param str clinical_significance: Filter by clinical significance.
        :param str population_frequency: Filter by population frequency.
        :param str consequence_type: Filter by consequence type.
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        """

        return self._get(category='analysis', resource='query', subcategory='clinical/rga/variant', **options)

    def summary_rga_variant(self, **options):
        """
        RGA variant summary stats.
        PATH: /{apiVersion}/analysis/clinical/rga/variant/summary

        :param int limit: Number of results to be returned.
        :param int skip: Number of results to skip.
        :param bool count: Get the total number of results matching the query.
            Deactivated by default.
        :param str sample_id: Filter by sample id.
        :param str individual_id: Filter by individual id.
        :param str sex: Filter by sex.
        :param str phenotypes: Filter by phenotypes.
        :param str disorders: Filter by disorders.
        :param str num_parents: Filter by the number of parents registered.
        :param str gene_id: Filter by gene id.
        :param str gene_name: Filter by gene name.
        :param str chromosome: Filter by chromosome.
        :param str start: Filter by start position.
        :param str end: Filter by end position.
        :param str transcript_id: Filter by transcript id.
        :param str variants: Filter by variant id.
        :param str db_snps: Filter by DB_SNP id.
        :param str knockout_type: Filter by knockout type.
        :param str filter: Filter by filter (PASS, NOT_PASS).
        :param str type: Filter by variant type.
        :param str clinical_significance: Filter by clinical significance.
        :param str population_frequency: Filter by population frequency.
        :param str consequence_type: Filter by consequence type.
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        """

        return self._get(category='analysis', resource='summary', subcategory='clinical/rga/variant', **options)

    def search(self, **options):
        """
        Clinical analysis search.
        PATH: /{apiVersion}/analysis/clinical/search

        :param str include: Fields included in the response, whole JSON path
            must be provided.
        :param str exclude: Fields excluded in the response, whole JSON path
            must be provided.
        :param int limit: Number of results to be returned.
        :param int skip: Number of results to skip.
        :param bool count: Get the total number of results matching the query.
            Deactivated by default.
        :param bool flatten_annotations: Flatten the annotations?.
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str id: Comma separated list of Clinical Analysis IDs up to a
            maximum of 100. Also admits basic regular expressions using the
            operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
            sensitive, '~/value/i' for case insensitive search.
        :param str uuid: Comma separated list of Clinical Analysis UUIDs up to
            a maximum of 100.
        :param str type: Clinical Analysis type.
        :param str disorder: Clinical Analysis disorder. Also admits basic
            regular expressions using the operator '~', i.e. '~{perl-regex}'
            e.g. '~value' for case sensitive, '~/value/i' for case insensitive
            search.
        :param str files: Clinical Analysis files.
        :param str sample: Sample associated to the proband or any member of a
            family.
        :param str individual: Proband or any member of a family.
        :param str proband: Clinical Analysis proband.
        :param str proband_samples: Clinical Analysis proband samples.
        :param str family: Clinical Analysis family.
        :param str family_members: Clinical Analysis family members.
        :param str family_member_samples: Clinical Analysis family members
            samples.
        :param str panels: Clinical Analysis panels.
        :param bool locked: Locked Clinical Analyses.
        :param str analyst_id: Clinical Analysis analyst id.
        :param str priority: Clinical Analysis priority.
        :param str flags: Clinical Analysis flags.
        :param str creation_date: Clinical Analysis Creation date. Format:
            yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str modification_date: Clinical Analysis Modification date.
            Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str due_date: Clinical Analysis due date. Format:
            yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        :param str quality_control_summary: Clinical Analysis quality control
            summary.
        :param str release: Release when it was created.
        :param int snapshot: Snapshot value (Latest version of the entry in
            the specified release).
        :param str status: Filter by status.
        :param str internal_status: Filter by internal status.
        :param str annotation: Annotation filters. Example:
            age>30;gender=FEMALE. For more information, please visit
            http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
        :param bool deleted: Boolean to retrieve deleted entries.
        """

        return self._get(category='analysis', resource='search', subcategory='clinical', **options)

    def query_variant(self, **options):
        """
        Fetch clinical variants.
        PATH: /{apiVersion}/analysis/clinical/variant/query

        :param str include: Fields included in the response, whole JSON path
            must be provided.
        :param str exclude: Fields excluded in the response, whole JSON path
            must be provided.
        :param int limit: Number of results to be returned.
        :param int skip: Number of results to skip.
        :param bool count: Get the total number of results matching the query.
            Deactivated by default.
        :param bool approximate_count: Get an approximate count, instead of an
            exact total count. Reduces execution time.
        :param int approximate_count_sampling_size: Sampling size to get the
            approximate count. Larger values increase accuracy but also
            increase execution time.
        :param str saved_filter: Use a saved filter at User level.
        :param str include_interpretation: Interpretation ID to include the
            fields related to this interpretation.
        :param str id: List of variant IDs in the format chrom:start:ref:alt,
            e.g. 19:7177679:C:T.
        :param str region: List of regions, these can be just a single
            chromosome name or regions in the format chr:start-end, e.g.:
            2,3:100000-200000.
        :param str type: List of types, accepted values are SNV, MNV, INDEL,
            SV, COPY_NUMBER, COPY_NUMBER_LOSS, COPY_NUMBER_GAIN, INSERTION,
            DELETION, DUPLICATION, TANDEM_DUPLICATION, BREAKEND, e.g.
            SNV,INDEL.
        :param str study: Filter variants from the given studies, these can be
            either the numeric ID or the alias with the format
            organization@project:study.
        :param str file: Filter variants from the files specified. This will
            set includeFile parameter when not provided.
        :param str filter: Specify the FILTER for any of the files. If 'file'
            filter is provided, will match the file and the filter. e.g.:
            PASS,LowGQX.
        :param str qual: Specify the QUAL for any of the files. If 'file'
            filter is provided, will match the file and the qual. e.g.: >123.4.
        :param str file_data: Filter by file data (i.e. FILTER, QUAL and INFO
            columns from VCF file). [{file}:]{key}{op}{value}[,;]* . If no file
            is specified, will use all files from 'file' filter. e.g. AN>200 or
            file_1.vcf:AN>200;file_2.vcf:AN<10 . Many fields can be combined.
            e.g. file_1.vcf:AN>200;DB=true;file_2.vcf:AN<10,FILTER=PASS,LowDP.
        :param str sample: Filter variants by sample genotype. This will
            automatically set 'includeSample' parameter when not provided. This
            filter accepts multiple 3 forms: 1) List of samples: Samples that
            contain the main variant. Accepts AND ';' and OR ',' operators. 
            e.g. HG0097,HG0098 . 2) List of samples with genotypes:
            {sample}:{gt1},{gt2}. Accepts AND ';' and OR ',' operators.  e.g.
            HG0097:0/0;HG0098:0/1,1/1 . Unphased genotypes (e.g. 0/1, 1/1) will
            also include phased genotypes (e.g. 0|1, 1|0, 1|1), but not vice
            versa. When filtering by multi-allelic genotypes, any secondary
            allele will match, regardless of its position e.g. 1/2 will match
            with genotypes 1/2, 1/3, 1/4, .... Genotype aliases accepted:
            HOM_REF, HOM_ALT, HET, HET_REF, HET_ALT, HET_MISS and MISS  e.g.
            HG0097:HOM_REF;HG0098:HET_REF,HOM_ALT . 3) Sample with segregation
            mode: {sample}:{segregation}. Only one sample accepted.Accepted
            segregation modes: [ autosomalDominant, autosomalRecessive,
            XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo,
            deNovoStrict, mendelianError, compoundHeterozygous ]. Value is case
            insensitive. e.g. HG0097:DeNovo Sample must have parents defined
            and indexed. .
        :param str sample_data: Filter by any SampleData field from samples.
            [{sample}:]{key}{op}{value}[,;]* . If no sample is specified, will
            use all samples from 'sample' or 'genotype' filter. e.g. DP>200 or
            HG0097:DP>200,HG0098:DP<10 . Many FORMAT fields can be combined.
            e.g. HG0097:DP>200;GT=1/1,0/1,HG0098:DP<10.
        :param str sample_annotation: Selects some samples using metadata
            information from Catalog. e.g.
            age>20;phenotype=hpo:123,hpo:456;name=smith.
        :param str cohort: Select variants with calculated stats for the
            selected cohorts.
        :param str cohort_stats_ref: Reference Allele Frequency:
            [{study:}]{cohort}[<|>|<=|>=]{number}. e.g. ALL<=0.4.
        :param str cohort_stats_alt: Alternate Allele Frequency:
            [{study:}]{cohort}[<|>|<=|>=]{number}. e.g. ALL<=0.4.
        :param str cohort_stats_maf: Minor Allele Frequency:
            [{study:}]{cohort}[<|>|<=|>=]{number}. e.g. ALL<=0.4.
        :param str cohort_stats_mgf: Minor Genotype Frequency:
            [{study:}]{cohort}[<|>|<=|>=]{number}. e.g. ALL<=0.4.
        :param str cohort_stats_pass: Filter PASS frequency:
            [{study:}]{cohort}[<|>|<=|>=]{number}. e.g. ALL>0.8.
        :param str missing_alleles: Number of missing alleles:
            [{study:}]{cohort}[<|>|<=|>=]{number}.
        :param str missing_genotypes: Number of missing genotypes:
            [{study:}]{cohort}[<|>|<=|>=]{number}.
        :param str score: Filter by variant score:
            [{study:}]{score}[<|>|<=|>=]{number}.
        :param str family: Filter variants where any of the samples from the
            given family contains the variant (HET or HOM_ALT).
        :param str family_disorder: Specify the disorder to use for the family
            segregation.
        :param str family_segregation: Filter by segregation mode from a given
            family. Accepted values: [ autosomalDominant, autosomalRecessive,
            XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo,
            deNovoStrict, mendelianError, compoundHeterozygous ].
        :param str family_members: Sub set of the members of a given family.
        :param str family_proband: Specify the proband child to use for the
            family segregation.
        :param str gene: List of genes, most gene IDs are accepted (HGNC,
            Ensembl gene, ...). This is an alias to 'xref' parameter.
        :param str ct: List of SO consequence types, e.g.
            missense_variant,stop_lost or SO:0001583,SO:0001578. Accepts
            aliases 'loss_of_function' and 'protein_altering'.
        :param str xref: List of any external reference, these can be genes,
            proteins or variants. Accepted IDs include HGNC, Ensembl genes,
            dbSNP, ClinVar, HPO, Cosmic, HGVS ...
        :param str biotype: List of biotypes, e.g. protein_coding.
        :param str protein_substitution: Protein substitution scores include
            SIFT and PolyPhen. You can query using the score
            {protein_score}[<|>|<=|>=]{number} or the description
            {protein_score}[~=|=]{description} e.g. polyphen>0.1,sift=tolerant.
        :param str conservation: Filter by conservation score:
            {conservation_score}[<|>|<=|>=]{number} e.g.
            phastCons>0.5,phylop<0.1,gerp>0.1.
        :param str population_frequency_alt: Alternate Population Frequency:
            {study}:{population}[<|>|<=|>=]{number}. e.g. 1000G:ALL<0.01.
        :param str population_frequency_ref: Reference Population Frequency:
            {study}:{population}[<|>|<=|>=]{number}. e.g. 1000G:ALL<0.01.
        :param str population_frequency_maf: Population minor allele
            frequency: {study}:{population}[<|>|<=|>=]{number}. e.g.
            1000G:ALL<0.01.
        :param str transcript_flag: List of transcript flags. e.g. canonical,
            CCDS, basic, LRG, MANE Select, MANE Plus Clinical, EGLH_HaemOnc,
            TSO500.
        :param str gene_trait_id: List of gene trait association id. e.g.
            'umls:C0007222' , 'OMIM:269600'.
        :param str go: List of GO (Gene Ontology) terms. e.g. 'GO:0002020'.
        :param str expression: List of tissues of interest. e.g. 'lung'.
        :param str protein_keyword: List of Uniprot protein variant annotation
            keywords.
        :param str drug: List of drug names.
        :param str functional_score: Functional score:
            {functional_score}[<|>|<=|>=]{number} e.g. cadd_scaled>5.2 ,
            cadd_raw<=0.3.
        :param str clinical: Clinical source: clinvar, cosmic.
        :param str clinical_significance: Clinical significance: benign,
            likely_benign, likely_pathogenic, pathogenic.
        :param bool clinical_confirmed_status: Clinical confirmed status.
        :param str custom_annotation: Custom annotation:
            {key}[<|>|<=|>=]{number} or {key}[~=|=]{text}.
        :param str panel: Filter by genes from the given disease panel.
        :param str panel_mode_of_inheritance: Filter genes from specific
            panels that match certain mode of inheritance. Accepted values : [
            autosomalDominant, autosomalRecessive, XLinkedDominant,
            XLinkedRecessive, YLinked, mitochondrial, deNovo, mendelianError,
            compoundHeterozygous ].
        :param str panel_confidence: Filter genes from specific panels that
            match certain confidence. Accepted values : [ high, medium, low,
            rejected ].
        :param str panel_role_in_cancer: Filter genes from specific panels
            that match certain role in cancer. Accepted values : [ both,
            oncogene, tumorSuppressorGene, fusion ].
        :param str panel_feature_type: Filter elements from specific panels by
            type. Accepted values : [ gene, region, str, variant ].
        :param bool panel_intersection: Intersect panel genes and regions with
            given genes and regions from que input query. This will prevent
            returning variants from regions out of the panel.
        :param str trait: List of traits, based on ClinVar, HPO, COSMIC, i.e.:
            IDs, histologies, descriptions,...
        :param str ci_status_id: Clinical interpretation status ID (or list of
            IDs separated by commas). Valid values: NOT_STARTED, ACTIVE, DONE,
            CLOSED.
        """

        return self._get(category='analysis', resource='query', subcategory='clinical/variant', **options)

    def acl(self, clinical_analyses, **options):
        """
        Returns the acl of the clinical analyses. If member is provided, it
            will only return the acl for the member.
        PATH: /{apiVersion}/analysis/clinical/{clinicalAnalyses}/acl

        :param str clinical_analyses: Comma separated list of clinical
            analysis IDs or names up to a maximum of 100. (REQUIRED)
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str member: User or group ID.
        :param bool silent: Boolean to retrieve all possible entries that are
            queried for, false to raise an exception whenever one of the
            entries looked for cannot be shown for whichever reason.
        """

        return self._get(category='analysis', resource='acl', subcategory='clinical', second_query_id=clinical_analyses, **options)

    def delete(self, clinical_analyses, **options):
        """
        Delete clinical analyses.
        PATH: /{apiVersion}/analysis/clinical/{clinicalAnalyses}/delete

        :param str clinical_analyses: Comma separated list of clinical
            analysis IDs or names up to a maximum of 100. (REQUIRED)
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param bool force: Force deletion if the ClinicalAnalysis contains
            interpretations or is locked.
        """

        return self._delete(category='analysis', resource='delete', subcategory='clinical', second_query_id=clinical_analyses, **options)

    def update(self, clinical_analyses, data=None, **options):
        """
        Update clinical analysis attributes.
        PATH: /{apiVersion}/analysis/clinical/{clinicalAnalyses}/update

        :param dict data: JSON containing clinical analysis information.
            (REQUIRED)
        :param str clinical_analyses: Comma separated list of clinical
            analysis IDs. (REQUIRED)
        :param str include: Fields included in the response, whole JSON path
            must be provided.
        :param str exclude: Fields excluded in the response, whole JSON path
            must be provided.
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str comments_action: Action to be performed if the array of
            comments is being updated. Allowed values: ['ADD REMOVE REPLACE']
        :param str flags_action: Action to be performed if the array of flags
            is being updated. Allowed values: ['ADD SET REMOVE']
        :param str analysts_action: Action to be performed if the array of
            analysts is being updated. Allowed values: ['ADD SET REMOVE']
        :param str files_action: Action to be performed if the array of files
            is being updated. Allowed values: ['ADD SET REMOVE']
        :param str panels_action: Action to be performed if the array of
            panels is being updated. Allowed values: ['ADD SET REMOVE']
        :param str annotation_sets_action: Action to be performed if the array
            of annotationSets is being updated. Allowed values: ['ADD SET
            REMOVE']
        :param bool include_result: Flag indicating to include the created or
            updated document result in the response.
        """

        return self._post(category='analysis', resource='update', subcategory='clinical', second_query_id=clinical_analyses, data=data, **options)

    def update_annotation_sets_annotations(self, clinical_analysis, annotation_set, data=None, **options):
        """
        Update annotations from an annotationSet.
        PATH: /{apiVersion}/analysis/clinical/{clinicalAnalysis}/annotationSets/{annotationSet}/annotations/update

        :param str annotation_set: AnnotationSet ID to be updated. (REQUIRED)
        :param str clinical_analysis: Clinical analysis ID. (REQUIRED)
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str action: Action to be performed: ADD to add new annotations;
            REPLACE to replace the value of an already existing annotation; SET
            to set the new list of annotations removing any possible old
            annotations; REMOVE to remove some annotations; RESET to set some
            annotations to the default value configured in the corresponding
            variables of the VariableSet if any. Allowed values: ['ADD SET
            REMOVE RESET REPLACE']
        :param dict data: Json containing the map of annotations when the
            action is ADD, SET or REPLACE, a json with only the key 'remove'
            containing the comma separated variables to be removed as a value
            when the action is REMOVE or a json with only the key 'reset'
            containing the comma separated variables that will be set to the
            default value when the action is RESET.
        """

        return self._post(category='analysis/clinical', resource='annotations/update', query_id=clinical_analysis, subcategory='annotationSets', second_query_id=annotation_set, data=data, **options)

    def info(self, clinical_analysis, **options):
        """
        Clinical analysis info.
        PATH: /{apiVersion}/analysis/clinical/{clinicalAnalysis}/info

        :param str clinical_analysis: Comma separated list of clinical
            analysis IDs or names up to a maximum of 100. (REQUIRED)
        :param str include: Fields included in the response, whole JSON path
            must be provided.
        :param str exclude: Fields excluded in the response, whole JSON path
            must be provided.
        :param bool flatten_annotations: Flatten the annotations?.
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str version: Comma separated list of clinical versions. 'all'
            to get all the clinical versions. Not supported if multiple
            clinical ids are provided.
        :param bool deleted: Boolean to retrieve deleted entries.
        """

        return self._get(category='analysis', resource='info', subcategory='clinical', second_query_id=clinical_analysis, **options)

    def create_interpretation(self, clinical_analysis, data=None, **options):
        """
        Create a new Interpretation.
        PATH: /{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/create

        :param dict data: JSON containing clinical interpretation information.
            (REQUIRED)
        :param str clinical_analysis: Clinical analysis ID. (REQUIRED)
        :param str include: Fields included in the response, whole JSON path
            must be provided.
        :param str exclude: Fields excluded in the response, whole JSON path
            must be provided.
        :param str study: [[organization@]project:]study id.
        :param str set_as: Set interpretation as. Allowed values: ['PRIMARY
            SECONDARY']
        :param bool include_result: Flag indicating to include the created or
            updated document result in the response.
        """

        return self._post(category='analysis/clinical', resource='create', query_id=clinical_analysis, subcategory='interpretation', data=data, **options)

    def clear_interpretation(self, clinical_analysis, interpretations, **options):
        """
        Clear the fields of the main interpretation of the Clinical Analysis.
        PATH: /{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/{interpretations}/clear

        :param str clinical_analysis: Clinical analysis ID. (REQUIRED)
        :param str interpretations: Interpretation IDs of the Clinical
            Analysis. (REQUIRED)
        :param str study: [[organization@]project:]study ID.
        """

        return self._post(category='analysis/clinical', resource='clear', query_id=clinical_analysis, subcategory='interpretation', second_query_id=interpretations, **options)

    def delete_interpretation(self, clinical_analysis, interpretations, **options):
        """
        Delete interpretation.
        PATH: /{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/{interpretations}/delete

        :param str interpretations: Interpretation IDs of the Clinical
            Analysis. (REQUIRED)
        :param str clinical_analysis: Clinical analysis ID. (REQUIRED)
        :param str study: [[organization@]project:]study ID.
        :param str set_as_primary: Interpretation id to set as primary from
            the list of secondaries in case of deleting the actual primary one.
        """

        return self._delete(category='analysis/clinical', resource='delete', query_id=clinical_analysis, subcategory='interpretation', second_query_id=interpretations, **options)

    def revert_interpretation(self, clinical_analysis, interpretation, version, **options):
        """
        Revert to a previous interpretation version.
        PATH: /{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/{interpretation}/revert

        :param int version: Version to revert to. (REQUIRED)
        :param str interpretation: Interpretation ID. (REQUIRED)
        :param str clinical_analysis: Clinical analysis ID. (REQUIRED)
        :param str study: [[organization@]project:]study ID.
        """

        options['version'] = version
        return self._post(category='analysis/clinical', resource='revert', query_id=clinical_analysis, subcategory='interpretation', second_query_id=interpretation, **options)

    def update_interpretation(self, clinical_analysis, interpretation, data=None, **options):
        """
        Update interpretation fields.
        PATH: /{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/{interpretation}/update

        :param dict data: JSON containing clinical interpretation information.
            (REQUIRED)
        :param str interpretation: Interpretation ID. (REQUIRED)
        :param str clinical_analysis: Clinical analysis ID. (REQUIRED)
        :param str include: Fields included in the response, whole JSON path
            must be provided.
        :param str exclude: Fields excluded in the response, whole JSON path
            must be provided.
        :param str study: [[organization@]project:]study ID.
        :param str primary_findings_action: Action to be performed if the
            array of primary findings is being updated. Allowed values: ['ADD
            SET REMOVE REPLACE']
        :param str methods_action: Action to be performed if the array of
            methods is being updated. Allowed values: ['ADD SET REMOVE']
        :param str secondary_findings_action: Action to be performed if the
            array of secondary findings is being updated. Allowed values: ['ADD
            SET REMOVE REPLACE']
        :param str comments_action: Action to be performed if the array of
            comments is being updated. To REMOVE or REPLACE, the date will need
            to be provided to identify the comment. Allowed values: ['ADD
            REMOVE REPLACE']
        :param str panels_action: Action to be performed if the array of
            panels is being updated. Allowed values: ['ADD SET REMOVE']
        :param str set_as: Set interpretation as. Allowed values: ['PRIMARY
            SECONDARY']
        :param bool include_result: Flag indicating to include the created or
            updated document result in the response.
        """

        return self._post(category='analysis/clinical', resource='update', query_id=clinical_analysis, subcategory='interpretation', second_query_id=interpretation, data=data, **options)

    def update_report(self, clinical_analysis, data=None, **options):
        """
        Update clinical analysis report.
        PATH: /{apiVersion}/analysis/clinical/{clinicalAnalysis}/report/update

        :param dict data: JSON containing clinical report information.
            (REQUIRED)
        :param str clinical_analysis: Clinical analysis ID. (REQUIRED)
        :param str include: Fields included in the response, whole JSON path
            must be provided.
        :param str exclude: Fields excluded in the response, whole JSON path
            must be provided.
        :param str study: Study [[organization@]project:]study where study and
            project can be either the ID or UUID.
        :param str comments_action: Action to be performed if the array of
            comments is being updated. Allowed values: ['ADD REMOVE REPLACE']
        :param str supporting_evidences_action: Action to be performed if the
            array of supporting evidences is being updated. Allowed values:
            ['ADD SET REMOVE']
        :param str files_action: Action to be performed if the array of files
            is being updated. Allowed values: ['ADD SET REMOVE']
        :param bool include_result: Flag indicating to include the created or
            updated document result in the response.
        """

        return self._post(category='analysis/clinical', resource='update', query_id=clinical_analysis, subcategory='report', data=data, **options)

