<commit_before>define(
  ['dojo/date/locale', 'dojo/dom-construct', 'dojo/dom-class', 'dijit/Tooltip'],
  function (locale, domConstruct, domClass, Tooltip) {

    var dateFormatter = function (obj, format) {
      if (!obj || obj == '0001-01-01T00:00:00Z') {
        return '';
      }
      if (typeof obj == 'string') {
        var x = Date.parse(obj);
        if (!x) {
          return ' ';
        }
        obj = new Date(x);
      } else if (typeof obj == 'number') {
        obj = new Date(obj);
      }
      if (!obj || !obj.getMonth) {
        return ' ';
      }

      return locale.format(obj, format || { formatLength: 'short' });
    };

    var decimalFormatter = function (number, decimal) {
      return Math.round(number * Math.pow(10, decimal)) / Math.pow(10, decimal);
    };

    var findObjectByLabel = function (obj, label) {
      if (obj.label === label) {
        return obj;
      }
      for (var i in obj) {
        if (Object.prototype.hasOwnProperty.call(obj, i)) {
          var foundLabel = findObjectByLabel(obj[i], label);
          if (foundLabel) {
            return foundLabel;
          }
        }
      }
      return null;
    };

    var dateFromEpoch = function (obj, format) {
      obj = new Date(new Date().setTime(obj * 1000));
      if (!obj || !obj.getMonth) {
        return ' ';
      }
      return locale.format(obj, format || { formatLength: 'short' });
    };

    var getExternalLinks = function (target) {
      var link;

      if (target.match(/ncbi_gene/i)) {
        link = '//www.ncbi.nlm.nih.gov/sites/entrez?db=gene&cmd=Retrieve&dopt=full_report&list_uids=';
      }
      else if (target.match(/ncbi_accession/i)) {
        link = '//www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=nucleotide&val=';
      }
      else if (target.match(/ncbi_protein/i) || target.match(/RefSeq/i) || target.match(/GI/i)) {
        link = '//www.ncbi.nlm.nih.gov/protein/';
      }
      else if (target.match(/RefSeq_NT/i)) {
        link = '//www.ncbi.nlm.nih.gov/nuccore/'; // NC_010067.1 - // nucleotide db
      }
      else if (target.match(/go_term/i)) {
        link = 'http://amigo.geneontology.org/cgi-bin/amigo/term_details?term='; // GO:0004747
      }
      else if (target.match(/ec_number/i)) {
        link = 'http://enzyme.expasy.org/EC/'; // 2.7.1.15
      }
      else if (target.match(/kegg_pathwaymap/i) || target.match(/KEGG/i)) {
        link = 'http://www.genome.jp/dbget-bin/www_bget?'; // pathway+map00010
      }
      else if (target.match(/UniProtKB-Accession/i) || target.match(/UniProtKB-ID/i)) {
        link = 'http://www.uniprot.org/uniprot/'; // A9MFG0 or ASTD_SALAR
      }
      else if (target.match(/UniRef100/i) || target.match(/UniRef90/i) || target.match(/UniRef50/i)) {
        link = 'http://www.uniprot.org/uniref/'; // UniRef100_A9MFG0, UniRef90_B5F7J0, or // UniRef50_Q1C8A9
      }
      else if (target.match(/UniParc/i)) {
        link = 'http://www.uniprot.org/uniparc/'; // UPI0001603B3F
      }
      else if (target.match(/^EMBL$/i) || target.match(/^EMBL-CDS$/i)) {
        link = '//www.ebi.ac.uk/ena/data/view/'; // CP000880, ABX21565
      }
      else if (target.match(/GeneID/i)) {
        link = '//www.ncbi.nlm.nih.gov/sites/entrez?db=gene&term='; // 5763416;
      }
      else if (target.match(/GenomeReviews/i)) {
        link = 'http://www.genomereviews.ebi.ac.uk/GR/contigview?chr='; // CP000880_GR
      }
      else if (target.match(/eggNOG/i)) {
        link = 'http://eggnogdb.embl.de/#/app/results?seqid='; // Q2YII1 -- uniprot accession
      }
      else if (target.match(/HOGENOM/i)) {
        link = 'http://hogenom.univ-lyon1.fr/query_sequence?seq='; // A9MFG0 -- uniprot accession
      }
      else if (target.match(/OMA/i)) {
        link = 'https://omabrowser.org/oma/group/'; // A9MFG0 -- uniprot accession
      }
      else if (target.match(/ProtClustDB/i)) {
        link = 'https://www.ncbi.nlm.nih.gov/proteinclusters/?term='; // A9MFG0 -- uniprot accession
      }
      else if (target.match(/BioCyc/i)) {
        link = 'http://biocyc.org/getid?id='; // BMEL359391:BAB2_0179-MONOMER
      }
      else if (target.match(/NMPDR/i)) {
        link = '//www.nmpdr.org/linkin.cgi?id='; // fig|382638.8.peg.1669"
      }
      else if (target.match(/EnsemblGenome/i) || target.match(/EnsemblGenome_TRS/i)
        || target.match(/EnsemblGenome_PRO/i)) {
        link = 'http://www.ensemblgenomes.org/id/'; // EBMYCT00000005579
      }
      else if (target.match(/BEIR/i)) {
        link = 'http://www.beiresources.org/Catalog/ItemDetails/tabid/522/Default.aspx?Template=Clones&BEINum=';
      }
      else if (target.match(/PDB/i)) {
        link = 'http://www.rcsb.org/3d-view/';
      }
      else if (target.match(/STRING/i)) { // 204722.BR0001
        link = 'http://string.embl.de/newstring_cgi/show_network_section.pl?identifier=';
      }
      else if (target.match(/MEROPS/i)) { // M50.005
        link = 'http://merops.sanger.ac.uk/cgi-bin/pepsum?id=';
      }
      else if (target.match(/^PATRIC$/i)) { // 17788255
        link = 'https://www.patricbrc.org/view/Feature/';
      }
      else if (target.match(/OrthoDB/i)) { // EOG689HR1
        link = 'http://cegg.unige.ch/orthodb7/results?searchtext=';
      }
      else if (target.match(/NCBI_TaxID/i)) { // 29461
        link = '//www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=';
      }
      else if (target.match(/KO/i)) { // K04756
        link = 'http://www.genome.jp/dbget-bin/www_bget?ko:';
      }
      else if (target.match(/TubercuList/i)) { // Rv2429
        link = 'https://mycobrowser.epfl.ch/genes/';
      }
      else if (target.match(/PeroxiBase/i)) { // 4558<commit_msg>Remove PATRIC hard link<commit_after>define(
  ['dojo/date/locale', 'dojo/dom-construct', 'dojo/dom-class', 'dijit/Tooltip'],
  function (locale, domConstruct, domClass, Tooltip) {

    var dateFormatter = function (obj, format) {
      if (!obj || obj == '0001-01-01T00:00:00Z') {
        return '';
      }
      if (typeof obj == 'string') {
        var x = Date.parse(obj);
        if (!x) {
          return ' ';
        }
        obj = new Date(x);
      } else if (typeof obj == 'number') {
        obj = new Date(obj);
      }
      if (!obj || !obj.getMonth) {
        return ' ';
      }

      return locale.format(obj, format || { formatLength: 'short' });
    };

    var decimalFormatter = function (number, decimal) {
      return Math.round(number * Math.pow(10, decimal)) / Math.pow(10, decimal);
    };

    var findObjectByLabel = function (obj, label) {
      if (obj.label === label) {
        return obj;
      }
      for (var i in obj) {
        if (Object.prototype.hasOwnProperty.call(obj, i)) {
          var foundLabel = findObjectByLabel(obj[i], label);
          if (foundLabel) {
            return foundLabel;
          }
        }
      }
      return null;
    };

    var dateFromEpoch = function (obj, format) {
      obj = new Date(new Date().setTime(obj * 1000));
      if (!obj || !obj.getMonth) {
        return ' ';
      }
      return locale.format(obj, format || { formatLength: 'short' });
    };

    var getExternalLinks = function (target) {
      var link;

      if (target.match(/ncbi_gene/i)) {
        link = '//www.ncbi.nlm.nih.gov/sites/entrez?db=gene&cmd=Retrieve&dopt=full_report&list_uids=';
      }
      else if (target.match(/ncbi_accession/i)) {
        link = '//www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=nucleotide&val=';
      }
      else if (target.match(/ncbi_protein/i) || target.match(/RefSeq/i) || target.match(/GI/i)) {
        link = '//www.ncbi.nlm.nih.gov/protein/';
      }
      else if (target.match(/RefSeq_NT/i)) {
        link = '//www.ncbi.nlm.nih.gov/nuccore/'; // NC_010067.1 - // nucleotide db
      }
      else if (target.match(/go_term/i)) {
        link = 'http://amigo.geneontology.org/cgi-bin/amigo/term_details?term='; // GO:0004747
      }
      else if (target.match(/ec_number/i)) {
        link = 'http://enzyme.expasy.org/EC/'; // 2.7.1.15
      }
      else if (target.match(/kegg_pathwaymap/i) || target.match(/KEGG/i)) {
        link = 'http://www.genome.jp/dbget-bin/www_bget?'; // pathway+map00010
      }
      else if (target.match(/UniProtKB-Accession/i) || target.match(/UniProtKB-ID/i)) {
        link = 'http://www.uniprot.org/uniprot/'; // A9MFG0 or ASTD_SALAR
      }
      else if (target.match(/UniRef100/i) || target.match(/UniRef90/i) || target.match(/UniRef50/i)) {
        link = 'http://www.uniprot.org/uniref/'; // UniRef100_A9MFG0, UniRef90_B5F7J0, or // UniRef50_Q1C8A9
      }
      else if (target.match(/UniParc/i)) {
        link = 'http://www.uniprot.org/uniparc/'; // UPI0001603B3F
      }
      else if (target.match(/^EMBL$/i) || target.match(/^EMBL-CDS$/i)) {
        link = '//www.ebi.ac.uk/ena/data/view/'; // CP000880, ABX21565
      }
      else if (target.match(/GeneID/i)) {
        link = '//www.ncbi.nlm.nih.gov/sites/entrez?db=gene&term='; // 5763416;
      }
      else if (target.match(/GenomeReviews/i)) {
        link = 'http://www.genomereviews.ebi.ac.uk/GR/contigview?chr='; // CP000880_GR
      }
      else if (target.match(/eggNOG/i)) {
        link = 'http://eggnogdb.embl.de/#/app/results?seqid='; // Q2YII1 -- uniprot accession
      }
      else if (target.match(/HOGENOM/i)) {
        link = 'http://hogenom.univ-lyon1.fr/query_sequence?seq='; // A9MFG0 -- uniprot accession
      }
      else if (target.match(/OMA/i)) {
        link = 'https://omabrowser.org/oma/group/'; // A9MFG0 -- uniprot accession
      }
      else if (target.match(/ProtClustDB/i)) {
        link = 'https://www.ncbi.nlm.nih.gov/proteinclusters/?term='; // A9MFG0 -- uniprot accession
      }
      else if (target.match(/BioCyc/i)) {
        link = 'http://biocyc.org/getid?id='; // BMEL359391:BAB2_0179-MONOMER
      }
      else if (target.match(/NMPDR/i)) {
        link = '//www.nmpdr.org/linkin.cgi?id='; // fig|382638.8.peg.1669"
      }
      else if (target.match(/EnsemblGenome/i) || target.match(/EnsemblGenome_TRS/i)
        || target.match(/EnsemblGenome_PRO/i)) {
        link = 'http://www.ensemblgenomes.org/id/'; // EBMYCT00000005579
      }
      else if (target.match(/BEIR/i)) {
        link = 'http://www.beiresources.org/Catalog/ItemDetails/tabid/522/Default.aspx?Template=Clones&BEINum=';
      }
      else if (target.match(/PDB/i)) {
        link = 'http://www.rcsb.org/3d-view/';
      }
      else if (target.match(/STRING/i)) { // 204722.BR0001
        link = 'http://string.embl.de/newstring_cgi/show_network_section.pl?identifier=';
      }
      else if (target.match(/MEROPS/i)) { // M50.005
        link = 'http://merops.sanger.ac.uk/cgi-bin/pepsum?id=';
      }
      else if (target.match(/^PATRIC$/i)) { // 17788255
        link = '/view/Feature/';
      }
      else if (target.match(/OrthoDB/i)) { // EOG689HR1
        link = 'http://cegg.unige.ch/orthodb7/results?searchtext=';
      }
      else if (target.match(/NCBI_TaxID/i)) { // 29461
        link = '//www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=';
      }
      else if (target.match(/KO/i)) { // K04756
        link = 'http://www.genome.jp/dbget-bin/www_bget?ko:';
      }
      else if (target.match(/TubercuList/i)) { // Rv2429
        link = 'https://mycobrowser.epfl.ch/genes/';
      }
      else if (target.match(/PeroxiBase/i)) { // 4558
{'fraction_non_alphanumeric': 0.18265601685245325, 'fraction_numerical': 0.03405599929781445, 'mean_word_length': 2.128500823723229, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 43, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5915483', 'n_tokens_mistral': 4592, 'n_tokens_neox': 4204, 'n_words': 624}