Skip to content

Instantly share code, notes, and snippets.

@jtprince
Created May 16, 2011 21:46
Show Gist options
  • Save jtprince/975439 to your computer and use it in GitHub Desktop.
Save jtprince/975439 to your computer and use it in GitHub Desktop.
Digestor Specification
require 'spec/more'
require 'digestor'
describe "Digestor" do
before do
@seq = "MTMDKSELVQKAKLAEQAERYDDMAAAMKAVTEQGHELSNEERNLLSVAYKNVVGARRSSWRVISSIEQKTERNEKKQQMGKEYREKIEAELQDICNDVLELLDKYLIPNATQPESKVFYLKMKGDYFRYLSEVASGDNKQTTVSNSQQAYQEAFEISKKEMQPTHPIRLGLALNFSVFYYEILNSPEKACSLAKTAFDEAIAELDTLNEESYKDSTLIMQLLRDNLTLWTSENQGDEGDAGEGEN"
end
it 'digests a protein' do
names = %w(Trypsin Trypsin/P Arg-C Asp-N Chymotrypsin CNBr+Trypsin)
names.each do |name|
digestor = Digestor.new(name)
(0..9).each do |missed_cleavages|
peptides = digestor.digest(@seq, :missed_cleavages => missed_cleavages)
peptides.size.isnt 0
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment