text: # -*- coding: utf-8 -*-
  ############################################################
  #
  # Autogenerated by the KBase type compiler -
  # any changes made here will be overwritten
  #
  ############################################################
  
  from __future__ import print_function
  # the following is a hack to get the baseclient to import whether we're in a
  # package or not. This makes pep8 unhappy hence the annotations.
  try:
      # baseclient and this client are in a package
      from .baseclient import BaseClient as _BaseClient  # @UnusedImport
  except:
      # no they aren't
      from baseclient import BaseClient as _BaseClient  # @Reimport
  import time
  
  
  class kb_cummerbund(object):
  
      def __init__(
              self, url=None, timeout=30 * 60, user_id=None,
              password=None, token=None, ignore_authrc=False,
              trust_all_ssl_certificates=False,
              auth_svc='https://kbase.us/services/authorization/Sessions/Login',
              service_ver=None,
              async_job_check_time_ms=100, async_job_check_time_scale_percent=150, 
              async_job_check_max_time_ms=300000):
          if url is None:
              raise ValueError('A url is required')
          self._service_ver = service_ver
          self._client = _BaseClient(
              url, timeout=timeout, user_id=user_id, password=password,
              token=token, ignore_authrc=ignore_authrc,
              trust_all_ssl_certificates=trust_all_ssl_certificates,
              auth_svc=auth_svc,
              async_job_check_time_ms=async_job_check_time_ms,
              async_job_check_time_scale_percent=async_job_check_time_scale_percent,
              async_job_check_max_time_ms=async_job_check_max_time_ms)
  
      def _check_job(self, job_id):
          return self._client._check_job('kb_cummerbund', job_id)
  
      def _generate_cummerbund_plots_submit(self, cummerbundParams, context=None):
          return self._client._submit_job(
               'kb_cummerbund.generate_cummerbund_plots', [cummerbundParams],
               self._service_ver, context)
  
      def generate_cummerbund_plots(self, cummerbundParams, context=None):
          """
          :param cummerbundParams: instance of type "cummerbundParams" ->
             structure: parameter "workspace_name" of String, parameter
             "ws_cuffdiff_id" of type "ws_cuffdiff_id" (@id ws
             KBaseRNASeq.RNASeqCuffdiffdifferentialExpression), parameter
             "ws_cummerbund_output" of type "ws_cummerbund_output" (@id ws
             KBaseRNASeq.cummerbund_output)
          :returns: instance of type "ws_cummerbund_output" (@id ws
             KBaseRNASeq.cummerbund_output)
          """
          job_id = self._generate_cummerbund_plots_submit(cummerbundParams, context)
          async_job_check_time = self._client.async_job_check_time
          while True:
              time.sleep(async_job_check_time)
              async_job_check_time = (async_job_check_time *
                  self._client.async_job_check_time_scale_percent / 100.0)
              if async_job_check_time > self._client.async_job_check_max_time:
                  async_job_check_time = self._client.async_job_check_max_time
              job_state = self._check_job(job_id)
              if job_state['finished']:
                  return job_state['result'][0]
  
      def _generate_cummerbund_plot2_submit(self, cummerbundstatParams, context=None):
          return self._client._submit_job(
               'kb_cummerbund.generate_cummerbund_plot2', [cummerbundstatParams],
               self._service_ver, context)
  
      def generate_cummerbund_plot2(self, cummerbundstatParams, context=None):
          """
          :param cummerbundstatParams: instance of type "cummerbundstatParams"
             -> structure: parameter "workspace" of String, parameter
             "ws_cuffdiff_id" of type "ws_cuffdiff_id" (@id ws
             KBaseRNASeq.RNASeqCuffdiffdifferentialExpression), parameter
             "ws_cummerbund_output" of type "ws_cummerbund_output" (@id ws
             KBaseRNASeq.cummerbund_output), parameter "ws_diffstat_output" of
             type "ws_diffstat_output" (Differential stat workspace id)
          :returns: instance of type "ws_cummerbund_output" (@id ws
             KBaseRNASeq.cummerbund_output)
          """
          job_id = self._generate_cummerbund_plot2_submit(cummerbundstatParams, context)
          async_job_check_time = self._client.async_job_check_time
          while True:
              time.sleep(async_job_check_time)
              async_job_check_time = (async_job_check_time *
                  self._client.async_job_check_time_scale_percent / 100.0)
              if async_job_check_time > self._client.async_job_check_max_time:
                  async_job_check_time = self._client.async_job_check_max_time
              job_state = self._check_job(job_id)
              if job_state['finished']:
                  return job_state['result'][0]
  
      def _create_expression_matrix_submit(self, expressionMatrixParams, context=None):
          return self._client._submit_job(
               'kb_cummerbund.create_expression_matrix', [expressionMatrixParams],
               self._service_ver, context)
  
      def create_expression_matrix(self, expressionMatrixParams, context=None):
          """
          :param expressionMatrixParams: instance of type
             "expressionMatrixParams" -> structure: parameter "workspace_name"
             of type "workspace_name" (workspace name of the object), parameter
             "ws_cuffdiff_id" of type "ws_cuffdiff_id" (@id ws
             KBaseRNASeq.RNASeqCuffdiffdifferentialExpression), parameter
             "ws_expression_matrix_id" of type "ws_expression_matrix_id" (@id
             ws KBaseFeatureValues.ExpressionMatrix), parameter
             "include_replicates" of type "bool" (indicates true or false
             values, false <= 0, true >=1)
          :returns: instance of type "ws_expression_matrix_id" (@id ws
             KBaseFeatureValues.ExpressionMatrix)
          """
          job_id = self._create_expression_matrix_submit(expressionMatrixParams, context)
          async_job_check_time = self._client.async_job_check_time
          while True:
              time.sleep(async_job_check_time)
              async_job_check_time = (async_job_check_time *
                  self._client.async_job_check_time_scale_percent / 100.0)
              if async_job_check_time > self._client.async_job_check_max_time:
                  async_job_check_time = self._client.async_job_check_max_time
              job_state = self._check_job(job_id)
              if job_state['finished']:
                  return job_state['result'][0]
  
      def _create_interactive_heatmap_de_genes_submit(self, interactiveHeatmapParams, context=None):
          return self._client._submit_job(
               'kb_cummerbund.create_interactive_heatmap_de_genes', [interactiveHeatmapParams],
               self._service_ver, context)
  
      def create_interactive_heatmap_de_genes(self, interactiveHeatmapParams, context=None):
          """
          :param interactiveHeatmapParams: instance of type
             "interactiveHeatmapParams" -> structure: parameter
             "workspace_name" of String, parameter "sample1" of String,
             parameter "sample2" of String, parameter "logMode" of String,
             parameter "removezeroes" of String, parameter "condition_select"
             of String, parameter "q_value_cutoff" of Double, parameter
             "log2_fold_change_cutoff" of Double, parameter "num_genes" of
             Long, parameter "ws_cuffdiff_id" of type "ws_cuffdiff_id" (@id ws
             KBaseRNASeq.RNASeqCuffdiffdifferentialExpression), parameter
             "ws_expression_matrix_id" of type "ws_expression_matrix_id" (@id
             ws KBaseFeatureValues.ExpressionMatrix)
          :returns: instance of type "ResultsToReport" -> structure: parameter
             "report_name" of String, parameter "report_ref" of String
          """
          job_id = self._create_interactive_heatmap_de_genes_submit(interactiveHeatmapParams, context)
          async_job_check_time = self._client.async_job_check_time
          while True:
              time.sleep(async_job_check_time)
              async_job_check_time = (async_job_check_time *
                  self._client.async_job_check_time_scale_percent / 100.0)
              if async_job_check_time > self._client.async_job_check_max_time:
                  async_job_check_time = self._client.async_job_check_max_time
              job_state = self._check_job(job_id)
              if job_state['finished']:
                  return job_state['result'][0]
  
      def _create_interactive_heatmap_de_genes_old_submit(self, heatmapParams, context=None):
          return self._client._submit_job(
               'kb_cummerbund.create_interactive_heatmap_de_genes_old', [heatmapParams],
               self._service_ver, context)
  
      def create_interactive_heatmap_de_genes_old(self, heatmapParams, context=None):
          """
          :param heatmapParams: instance of type "heatmapParams" -> structure:
             parameter "workspace" of String, parameter "sample1" of String,
             parameter "sample2" of String, parameter "q_value_cutoff" of
             Double, parameter "log2_fold_change_cutoff" of Double, parameter
             "num_genes" of Long, parameter "ws_cuffdiff_id" of type
             "ws_cuffdiff_id" (@id ws
             KBaseRNASeq.RNASeqCuffdiffdifferentialExpression), parameter
             "ws_expression_matrix_id" of type "ws_expression_matrix_id" (@id
             ws KBaseFeatureValues.ExpressionMatrix), parameter
             "ws_cummerbund_output" of type "ws_cummerbund_output" (@id ws
             KBaseRNASeq.cummerbund_output)
          :returns: instance of type "ResultsToReport" -> structure: parameter
             "report_name" of String, parameter "report_ref" of String
          """
          job_id = self._create_interactive_heatmap_de_genes_old_submit(heatmapParams, context)
          async_job_check_time = self._client.async_job_check_time
          while True:
              time.sleep(async_job_check_time)
              async_job_check_time = (async_job_check_time *
                  self._client.async_job_check_time_scale_percent / 100.0)
              if async_job_check_time > self._client.async_job_check_max_time:
                  async_job_check_time = self._client.async_job_check_max_time
              job_state = self._check_job(job_id)
              if job_state['finished']:
                  return job_state['result'][0]
  
      def status(self, context=None):
          return self._client.call_method('kb_cummerbund.status',
                                          [], self._service_ver, context)
  