<commit_before>//Set the regions
jviz.modules.ideogram.prototype.regions = function(data)
{
  //Check for undefined data
  if(typeof data === 'undefined'){ return this._regions.list; }

  //Set loading as true
  this.loading(true);

  //Reset the regions list
  this._regions.list = {};

  //Read all the regions
  for(var i = 0; i < data.length; i++)
  {
    //Get the region
    var region = data[i];

    //Check if chromosome exists
    if(typeof this._regions.list[region.chromosome] === 'undefined')
    {
      //Create the chromosome
      this._regions.list[region.chromosome] = [];
    }

    //Check the region name or label
    region.name = (typeof region.name === 'undefined') ? 'Region ' + i : region.name;

    //Check the region label
    region.label = (typeof region.label === 'undefined') ? region.name : region.label;

    //Parse the start position
    region.start = parseInt(region.start);

    //Parse the end position
    region.end = parseInt(region.end);

    //Save the region
    this._regions.list[region.chromosome].push(region);
  }

  //Draw the preview
  this.draw(-1);<commit_msg>js/regions.js: draw the actual state after parsing data<commit_after>//Set the regions
jviz.modules.ideogram.prototype.regions = function(data)
{
  //Check for undefined data
  if(typeof data === 'undefined'){ return this._regions.list; }

  //Set loading as true
  this.loading(true);

  //Reset the regions list
  this._regions.list = {};

  //Read all the regions
  for(var i = 0; i < data.length; i++)
  {
    //Get the region
    var region = data[i];

    //Check if chromosome exists
    if(typeof this._regions.list[region.chromosome] === 'undefined')
    {
      //Create the chromosome
      this._regions.list[region.chromosome] = [];
    }

    //Check the region name or label
    region.name = (typeof region.name === 'undefined') ? 'Region ' + i : region.name;

    //Check the region label
    region.label = (typeof region.label === 'undefined') ? region.name : region.label;

    //Parse the start position
    region.start = parseInt(region.start);

    //Parse the end position
    region.end = parseInt(region.end);

    //Save the region
    this._regions.list[region.chromosome].push(region);
  }

  //Draw the data
  this.draw(this._chromosome.now);
{'fraction_non_alphanumeric': 0.13892529488859764, 'fraction_numerical': 0.001310615989515072, 'mean_word_length': 2.8487394957983194, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '173836', 'n_tokens_mistral': 734, 'n_tokens_neox': 679, 'n_words': 194}