def load(config_file = DEFAULTS[:config_file])
      user_config_params = {}
      dirname = Dir.pwd
      if File.exists?(File.expand_path(config_file, Dir.pwd))
        begin
          config_file_path = File.expand_path config_file, Dir.pwd
          user_config_params = Psych.load(File.open(config_file_path))
          dirname = File.dirname config_file_path
        rescue ArgumentError => e
          raise Nimbus::WrongFormatFileError, "It was not posible to parse the config file (#{config_file}): \r\n#{e.message} "
        end
      end

      if user_config_params['input']
        @training_file = File.expand_path(user_config_params['input']['training'], dirname) if user_config_params['input']['training']
        @testing_file  = File.expand_path(user_config_params['input']['testing' ], dirname) if user_config_params['input']['testing']
        @forest_file   = File.expand_path(user_config_params['input']['forest'  ], dirname) if user_config_params['input']['forest']
        @classes       = user_config_params['input']['classes'] if user_config_params['input']['classes']
      else
        @training_file = File.expand_path(DEFAULTS[:training_file], Dir.pwd) if File.exists? File.expand_path(DEFAULTS[:training_file], Dir.pwd)
        @testing_file  = File.expand_path(DEFAULTS[:testing_file ], Dir.pwd) if File.exists? File.expand_path(DEFAULTS[:testing_file ], Dir.pwd)
        @forest_file   = File.expand_path(DEFAULTS[:forest_file  ], Dir.pwd) if File.exists? File.expand_path(DEFAULTS[:forest_file  ], Dir.pwd)
      end

      @do_training = true unless @training_file.nil?
      @do_testing  = true unless @testing_file.nil?
      @classes = @classes.map{|c| c.to_s.strip} if @classes

      if @do_testing && !@do_training && !@forest_file
        raise Nimbus::InputFileError, "There is not random forest data (training file not defined, and forest file not found)."
      end

      if user_config_params['forest']
        @forest_size          = user_config_params['forest']['forest_size'].to_i if user_config_params['forest']['forest_size']
        @tree_SNP_total_count = user_config_params['forest']['SNP_total_count'].to_i if user_config_params['forest']['SNP_total_count']
        @tree_SNP_sample_size = user_config_params['forest']['SNP_sample_size_mtry'].to_i  if user_config_params['forest']['SNP_sample_size_mtry']
        @tree_node_min_size   = user_config_params['forest']['node_min_size'].to_i if user_config_params['forest']['node_min_size']
        @do_importances       = user_config_params['forest']['var_importances'].to_s.strip.downcase
        @do_importances       = (@do_importances != 'no' && @do_importances != 'false')
      end

      check_configuration
      log_configuration
    end
def load(config_file = DEFAULTS[:config_file])
      user_config_params = {}
      dirname = Dir.pwd
      if File.exists?(File.expand_path(config_file, Dir.pwd))
        begin
          config_file_path = File.expand_path config_file, Dir.pwd
          user_config_params = Psych.load(File.open(config_file_path))
          dirname = File.dirname config_file_path
        rescue ArgumentError => e
          raise Nimbus::WrongFormatFileError, "It was not posible to parse the config file (#{config_file}): \r\n#{e.message} "
        end
      end

      if user_config_params['input']
        @training_file = File.expand_path(user_config_params['input']['training'], dirname) if user_config_params['input']['training']
        @testing_file  = File.expand_path(user_config_params['input']['testing' ], dirname) if user_config_params['input']['testing']
        @forest_file   = File.expand_path(user_config_params['input']['forest'  ], dirname) if user_config_params['input']['forest']
        @classes       = user_config_params['input']['classes'] if user_config_params['input']['classes']
      else
        @training_file = File.expand_path(DEFAULTS[:training_file], Dir.pwd) if File.exists? File.expand_path(DEFAULTS[:training_file], Dir.pwd)
        @testing_file  = File.expand_path(DEFAULTS[:testing_file ], Dir.pwd) if File.exists? File.expand_path(DEFAULTS[:testing_file ], Dir.pwd)
        @forest_file   = File.expand_path(DEFAULTS[:forest_file  ], Dir.pwd) if File.exists? File.expand_path(DEFAULTS[:forest_file  ], Dir.pwd)
      end

      @do_training = true unless @training_file.nil?
      @do_testing  = true unless @testing_file.nil?
      @classes = @classes.map{|c| c.to_s.strip} if @classes

      if @do_testing && !@do_training && !@forest_file
        raise Nimbus::InputFileError, "There is not random forest data (training file not defined, and forest file not found)."
      end

      if user_config_params['forest']
        @forest_size          = user_config_params['forest']['forest_size'].to_i if user_config_params['forest']['forest_size']
        @tree_SNP_total_count = user_config_params['forest']['SNP_total_count'].to_i if user_config_params['forest']['SNP_total_count']
        @tree_SNP_sample_size = user_config_params['forest']['SNP_sample_size_mtry'].to_i  if user_config_params['forest']['SNP_sample_size_mtry']
        @tree_node_min_size   = user_config_params['forest']['node_min_size'].to_i if user_config_params['forest']['node_min_size']
        @do_importances       = user_config_params['forest']['var_importances'].to_s.strip.downcase
        @do_importances       = (@do_importances != 'no' && @do_importances != 'false')
      end

      check_configuration
      log_configuration
    end
This is the first method to be called on Configuration when a config.yml file
 exists with user input options for the forest.

 * The method will read the config file and change the default value of the selected options.
 * Then based on the options and the existence of training, testing and forest files, it will mark:
   - if training is needed,
   - if testing is needed,
   - which forest will be used for the testing.
 * Finally it will run basic checks on the input data trying to prevent future program errors.