Sha256: 52db5a86684815c21127430a748431b50162c7b857a7bab61ece47791744beea

Contents?: true

Size: 879 Bytes

Versions: 16

Compression:

Stored size: 879 Bytes

Contents

require 'spec_helper'

describe Lederhosen::Helpers do

  let (:groups) { Lederhosen::Helpers.get_grouped_qseq_files('spec/data/IL*.txt.gz') }

  it 'should have a method for grouping QSEQ files' do
    groups.length.should == 2
  end

  it 'should have a method for trimming sequences' do
    reads = groups.values.first.first
    record = Zlib::GzipReader.open(reads) do |handle|
      Dna.new(handle).first
    end
    # I should probably test with a bad read
    Lederhosen::Helpers.trim(record).length.should == 58
  end

  it 'should be able to trim pairs of qseq files, outputting fasta file' do
    reads = groups.values.first
    Lederhosen::Helpers.trim_pairs reads[0], reads[1], "#{$test_dir}/munchen_trim_test.fasta"
    # this test will break if trim parameters change
    File.read("#{$test_dir}/munchen_trim_test.fasta").grep(/^>/).length.should be_even
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
lederhosen-0.2.12 spec/helpers_spec.rb
lederhosen-0.2.11 spec/helpers_spec.rb
lederhosen-0.2.10 spec/helpers_spec.rb
lederhosen-0.2.9 spec/helpers_spec.rb
lederhosen-0.2.8 spec/helpers_spec.rb
lederhosen-0.2.7 spec/helpers_spec.rb
lederhosen-0.2.6 spec/helpers_spec.rb
lederhosen-0.2.5 spec/helpers_spec.rb
lederhosen-0.2.4 spec/helpers_spec.rb
lederhosen-0.2.3 spec/helpers_spec.rb
lederhosen-0.2.2 spec/helpers_spec.rb
lederhosen-0.2.1 spec/helpers_spec.rb
lederhosen-0.2.0 spec/helpers_spec.rb
lederhosen-0.1.9 spec/helpers_spec.rb
lederhosen-0.1.8 spec/helpers_spec.rb
lederhosen-0.1.7 spec/helpers_spec.rb