-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable: use ARGF instead of ARGV[0]
- Loading branch information
Ben J. Woodcroft
committed
Mar 29, 2012
1 parent
48d025d
commit 1026d1e
Showing
5 changed files
with
30 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,39 @@ | ||
require 'helper' | ||
require 'open3' | ||
|
||
class TestBioSignalp < Test::Unit::TestCase | ||
should "positive control" do | ||
# Known to have a signal peptide | ||
# Known to have a signal peptide | ||
acp_sequence = 'MKILLLCIIFLYYVNAFKNTQKDGVSLQILKKKRSNQVNFLNRKNDYNLIKNKNPSSSLKSTFDDIKKIISKQLSVEEDKIQMNSNFTKDLGADSLDLVELIMALEEKFNVTISDQDALKINTVQDAIDYIEKNNKQ' | ||
|
||
assert_equal true, Bio::SignalP::Wrapper.new.calculate(acp_sequence).signal? | ||
end | ||
|
||
should "negative control" do | ||
# Known to have a signal peptide | ||
# Known to have a signal peptide | ||
non_signal_sequence = 'KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK' | ||
|
||
assert_equal false, Bio::SignalP::Wrapper.new.calculate(non_signal_sequence).signal? | ||
end | ||
end | ||
|
||
class TestSignalPScript < Test::Unit::TestCase | ||
should "positive control" do | ||
# Known to have a signal peptide | ||
acp_sequence = 'MKILLLCIIFLYYVNAFKNTQKDGVSLQILKKKRSNQVNFLNRKNDYNLIKNKNPSSSLKSTFDDIKKIISKQLSVEEDKIQMNSNFTKDLGADSLDLVELIMALEEKFNVTISDQDALKINTVQDAIDYIEKNNKQ' | ||
|
||
command = "RUBYLIB="+ | ||
File.join(File.dirname(__FILE__),'..','lib')+' '+ | ||
File.join(File.dirname(__FILE__),'..','bin','signalp.rb') | ||
Open3.popen3(command) do |stdin, stdout, stderr| | ||
stdin.puts '>positive' | ||
stdin.puts acp_sequence | ||
stdin.close | ||
|
||
@result = stdout.readlines # convert to string? | ||
@error = stderr.readlines | ||
end | ||
p @result | ||
p @error | ||
end | ||
end |