Sha256: 45b6f4f2b59cca49c3d72324ce695fc287bf7d777d8ee238dad071e9b68f88a6
Contents?: true
Size: 1.23 KB
Versions: 2
Compression:
Stored size: 1.23 KB
Contents
require File.expand_path( File.dirname(__FILE__) + '/spec_helper' ) require 'sample_enzyme' require 'set' describe SampleEnzyme, "digesting sequences" do it 'can digest with no missed cleavages' do st = "CRGATKKTAGRPMEK" SampleEnzyme.tryptic(st).should == %w(CR GATK K TAGRPMEK) st = "CATRP" SampleEnzyme.tryptic(st).should == %w(CATRP) st = "RCATRP" SampleEnzyme.tryptic(st).should == %w(R CATRP) st = "" SampleEnzyme.tryptic(st).should == [] st = "R" SampleEnzyme.tryptic(st).should == %w(R) end it 'can digest with missed cleavages' do st = "CRGATKKTAGRPMEKLLLERTKY" zero = %w(CR GATK K TAGRPMEK LLLER TK Y) SampleEnzyme.tryptic(st,0).to_set.should == zero.to_set one = %w(CRGATK GATKK KTAGRPMEK TAGRPMEKLLLER LLLERTK TKY) SampleEnzyme.tryptic(st,1).to_set.should == (zero+one).to_set two = %w(CRGATKK GATKKTAGRPMEK KTAGRPMEKLLLER TAGRPMEKLLLERTK LLLERTKY) all = zero + one + two SampleEnzyme.tryptic(st,2).to_set.should == all.to_set end it 'contains duplicates IF there are duplicate tryptic sequences' do st = "AAAAKCCCCKDDDDKCCCCK" peps = SampleEnzyme.new('trypsin').digest(st, 2) peps.select {|aaseq| aaseq == 'CCCCK'}.size.should == 2 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mspire-0.3.0 | specs/sample_enzyme_spec.rb |
mspire-0.3.1 | specs/sample_enzyme_spec.rb |