<commit_before>module Mascot
  # A parser for Mascot flat file results.
  #
  # <b> NOTE:</b> This parser creates another file
  # that indexes the byte position offsets of the various mime sections of
  # a DAT file. For some reason, DAT files indexes are the line numbers
  # within the file, making random access more difficult than it
  # needs to be.
  #
  # <b>If you do not want this index file created, you need to pass in
  #   <code> false</code> to the <code>cache_index</code> argument
  class DAT
    require "uri"
    attr_reader :idx
    attr_reader :boundary
    attr_reader :dat_file
    SECTIONS = ["summary", "decoy_summary", "et_summary", "parameters",
                "peptides", "decoy_peptides", "et_peptides",
                "proteins", "header", "enzyme", "taxonomy", "unimod",
                "quantitation", "masses", "mixture", "decoy_mixture", "index"]

    def initialize(dat_file_path, cache_index=true)
      @dat_file = File.open(dat_file_path)<commit_msg>fixed requires<commit_after>require 'mascot/dat/enzyme'
require 'mascot/dat/header_info'
require 'mascot/dat/masses'
require 'mascot/dat/parameters'
require 'mascot/dat/peptides'
require 'mascot/dat/proteins'
require 'mascot/dat/psm'
require 'mascot/dat/search_databases'
require 'mascot/dat/summary'
require 'mascot/dat/version'
require "uri"

module Mascot
  # A parser for Mascot flat file results.
  #
  # <b> NOTE:</b> This parser creates another file
  # that indexes the byte position offsets of the various mime sections of
  # a DAT file. For some reason, DAT files indexes are the line numbers
  # within the file, making random access more difficult than it
  # needs to be.
  #
  # <b>If you do not want this index file created, you need to pass in
  #   <code> false</code> to the <code>cache_index</code> argument
  class DAT
    attr_reader :idx
    attr_reader :boundary
    attr_reader :dat_file
    SECTIONS = ["summary", "decoy_summary", "et_summary", "parameters",
                "peptides", "decoy_peptides", "et_peptides",
                "proteins", "header", "enzyme", "taxonomy", "unimod",
                "quantitation", "masses", "mixture", "decoy_mixture", "index"]

    def initialize(dat_file_path, cache_index=true)
      @dat_file = File.open(dat_file_path)
{'fraction_non_alphanumeric': 0.10877192982456141, 'fraction_numerical': 0.0, 'mean_word_length': 3.608080808080808, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '719188', 'n_tokens_mistral': 751, 'n_tokens_neox': 713, 'n_words': 234}