<commit_before>#!/usr/bin/env	ruby

require 'helper'

class TestReadMetrics < Test::Unit::TestCase

  context "transrate" do

    setup do
      query = "test/sorghum_transcript.fa"
      assembly = Transrate::Assembly.new(query)
      @read_metrics = Transrate::ReadMetrics.new(assembly)
    end

    teardown do
      Dir.chdir("test") do
        Dir["*bt2"].each do |file|
          File.delete(file)
        end
        Dir["*sam"].each do |file|
          #File.delete(file)
        end
      end
    end

    should "check setup ran correctly" do
      assert @read_metrics
    end

    should "run read metrics" do
      left = "test/left.fastq"
      right = "test/right.fastq"
      @read_metrics.run(left, right)
      assert @read_metrics.has_run
      stats = @read_metrics.read_stats
      assert_equal 7763, stats[:num_pairs]
      p stats
    end

  end

end<commit_msg>remove debugging prints<commit_after>#!/usr/bin/env	ruby

require 'helper'

class TestReadMetrics < Test::Unit::TestCase

  context "transrate" do

    setup do
      query = "test/sorghum_transcript.fa"
      assembly = Transrate::Assembly.new(query)
      @read_metrics = Transrate::ReadMetrics.new(assembly)
    end

    teardown do
      Dir.chdir("test") do
        Dir["*bt2"].each do |file|
          File.delete(file)
        end
        Dir["*sam"].each do |file|
          #File.delete(file)
        end
      end
    end

    should "check setup ran correctly" do
      assert @read_metrics
    end

    should "run read metrics" do
      left = "test/left.fastq"
      right = "test/right.fastq"
      @read_metrics.run(left, right)
      assert @read_metrics.has_run
      stats = @read_metrics.read_stats
      assert_equal 7763, stats[:num_pairs]
    end

  end

end
{'fraction_non_alphanumeric': 0.10419026047565119, 'fraction_numerical': 0.0056625141562853904, 'mean_word_length': 2.340264650283554, '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': '2612637', 'n_tokens_mistral': 588, 'n_tokens_neox': 562, 'n_words': 133}