<commit_before>define([
  'dojo/_base/declare', 'dojo/_base/lang', 'dojo/on', 'dojo/topic', 'dojo/dom-construct',
  'dijit/popup', 'dijit/TooltipDialog',
  './GeneExpressionGrid', './GridContainer'
], function (
  declare, lang, on, Topic, domConstruct,
  popup, TooltipDialog,
  GeneExpressionGrid, GridContainer
) {

  var dfc = '<div>Download Table As...</div><div class="wsActionTooltip" rel="text/tsv">Text</div><div class="wsActionTooltip" rel="text/csv">CSV</div><div class="wsActionTooltip" rel="application/vnd.openxmlformats">Excel</div>';
  var downloadTT = new TooltipDialog({
    content: dfc,
    onMouseLeave: function () {
      popup.close(downloadTT);
    }
  });

  on(downloadTT.domNode, 'div:click', function (evt) {
    var rel = evt.target.attributes.rel.value;
    var self = this;

    // var selection = self.actionPanel.get('selection');
    var dataType = (self.actionPanel.currentContainerWidget.containerType == 'genome_group') ? 'genome' : 'genome_feature';
    var currentQuery = self.actionPanel.currentContainerWidget.get('query');

    window.open('/api/' + dataType + '/' + currentQuery + '&http_authorization=' + encodeURIComponent(window.App.authorizationToken) + '&http_accept=' + rel + '&http_download');
    popup.close(downloadTT);
  });

  var tgState = {
    keyword: '',
    upFold: 0,
    downFold: 0,
    upZscore: 0,
    downZscore: 0
  };
  return declare([GridContainer], {
    gridCtor: GeneExpressionGrid,
    containerType: 'gene_expression_data',
    facetFields: [],
    tgState: tgState,
    enableFilterPanel: false,
    constructor: function () {
      var self = this;
      Topic.subscribe('GeneExpression', lang.hitch(self, function () {
        var key = arguments[0],
          value = arguments[1];

        switch (key) {
          case 'updateTgState':
            self.tgState = value;
            break;
          default:
            break;
        }
      }));
    },
    buildQuery: function () {
      // prevent further filtering. DO NOT DELETE<commit_msg>updated link to user guide.<commit_after>define([
  'dojo/_base/declare', 'dojo/_base/lang', 'dojo/on', 'dojo/topic', 'dojo/dom-construct',
  'dijit/popup', 'dijit/TooltipDialog',
  './GeneExpressionGrid', './GridContainer'
], function (
  declare, lang, on, Topic, domConstruct,
  popup, TooltipDialog,
  GeneExpressionGrid, GridContainer
) {

  var dfc = '<div>Download Table As...</div><div class="wsActionTooltip" rel="text/tsv">Text</div><div class="wsActionTooltip" rel="text/csv">CSV</div><div class="wsActionTooltip" rel="application/vnd.openxmlformats">Excel</div>';
  var downloadTT = new TooltipDialog({
    content: dfc,
    onMouseLeave: function () {
      popup.close(downloadTT);
    }
  });

  on(downloadTT.domNode, 'div:click', function (evt) {
    var rel = evt.target.attributes.rel.value;
    var self = this;

    // var selection = self.actionPanel.get('selection');
    var dataType = (self.actionPanel.currentContainerWidget.containerType == 'genome_group') ? 'genome' : 'genome_feature';
    var currentQuery = self.actionPanel.currentContainerWidget.get('query');

    window.open('/api/' + dataType + '/' + currentQuery + '&http_authorization=' + encodeURIComponent(window.App.authorizationToken) + '&http_accept=' + rel + '&http_download');
    popup.close(downloadTT);
  });

  var tgState = {
    keyword: '',
    upFold: 0,
    downFold: 0,
    upZscore: 0,
    downZscore: 0
  };
  return declare([GridContainer], {
    gridCtor: GeneExpressionGrid,
    containerType: 'gene_expression_data',
    facetFields: [],
    tgState: tgState,
    enableFilterPanel: false,
    tutorialLink: 'user_guides/organisms_gene/transcriptomics.html',
    constructor: function () {
      var self = this;
      Topic.subscribe('GeneExpression', lang.hitch(self, function () {
        var key = arguments[0],
          value = arguments[1];

        switch (key) {
          case 'updateTgState':
            self.tgState = value;
            break;
          default:
            break;
        }
      }));
    },
    buildQuery: function () {
      // prevent further filtering. DO NOT DELETE
{'fraction_non_alphanumeric': 0.148756339048539, 'fraction_numerical': 0.0028978507606858247, 'mean_word_length': 3.3100936524453695, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '129534', 'n_tokens_mistral': 1321, 'n_tokens_neox': 1285, 'n_words': 251}