Sha256: a4aa9503c3f4f423cef0b7ee0a213ef642aacd4da5f8f007993801f4acccc266

Contents?: true

Size: 699 Bytes

Versions: 20

Compression:

Stored size: 699 Bytes

Contents

require 'spec_helper'

require 'mspire/ident/peptide/db/io'

describe 'reading a peptide centric DB' do
  before do
    @pepcentric = TESTFILES + "/mspire/ident/peptide/db/uni_11_sp_tr.PEPTIDE_CENTRIC.yml"
  end

  it 'reads the file on disk with random access or is enumerable' do
    Mspire::Ident::Peptide::Db::IO.open(@pepcentric) do |io|
      io["AVTEQGHELSNEER"].should == %w(sp|P31946|1433B_HUMAN	sp|P31946-2|1433B_HUMAN)
      io["VRAAR"].should == ["tr|D3DX18|D3DX18_HUMAN"]
      io["SILLY WILLY"].should be_nil
      io.each_with_index do |key_prots, i|
        key_prots.first.should be_an_instance_of String
        key_prots.last.should be_a_kind_of Array
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
mspire-0.10.8.0 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.10.7.3 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.10.7.2 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.10.7.1 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.10.7 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.10.6 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.10.5 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.10.4 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.10.3 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.10.2 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.10.1 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.10.0 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.9.2 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.9.1 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.9.0 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.8.7 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.8.6.2 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.8.6.1 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.8.6 spec/mspire/ident/peptide/db/io_spec.rb
mspire-0.8.5 spec/mspire/ident/peptide/db/io_spec.rb