SilkSlider 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.rspec +1 -0
- data/.travis.yml +13 -0
- data/Gemfile +20 -0
- data/LICENSE.txt +20 -0
- data/README.md +48 -0
- data/Rakefile +50 -0
- data/VERSION +1 -0
- data/bin/silk_slider +81 -0
- data/lib/sequence_window_descriptor.rb +25 -0
- data/spec/sequence_window_descriptor_spec.rb +26 -0
- data/spec/silk_slider_spec.rb +107 -0
- data/spec/spec_helper.rb +13 -0
- metadata +219 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f46fdc69dee531983bef5fa6c99b460693f4d74f
|
4
|
+
data.tar.gz: 17e84f801770f8e6acede7f750f1514d12fc6ae5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 347c0cb9b39eb0ffa6bc04aaf1fa3198789e4b9cec1f6a90adc6da36da57fb1401d3123a0e734c543ae6705d785daf5d881e1ed33a0bbfd4a919f3858c7ebc91
|
7
|
+
data.tar.gz: ec2b31727a8ec2bc4fc30c13ba67544c94c26db42364bbb610c8dc7e19748036d69b2432af071e00b195f67268a53057e3ecd7da3340db777d20010a2a839451
|
data/.document
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.travis.yml
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 1.9.2
|
4
|
+
- 1.9.3
|
5
|
+
- jruby-19mode # JRuby in 1.9 mode
|
6
|
+
|
7
|
+
# - rbx-19mode
|
8
|
+
# - 1.8.7
|
9
|
+
# - jruby-18mode # JRuby in 1.8 mode
|
10
|
+
# - rbx-18mode
|
11
|
+
|
12
|
+
# uncomment this line if your project needs to run something other than `rake`:
|
13
|
+
# script: bundle exec rspec spec
|
data/Gemfile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
gem 'bio-signalp', '~>0.3'
|
6
|
+
gem 'bio-tm_hmm', '~>0.2.2', '>=0.2.2'
|
7
|
+
gem 'bio', '~>1.4', '>=1.4.2'
|
8
|
+
gem 'bio-logger', '~>1.0'
|
9
|
+
|
10
|
+
# Add dependencies to develop your gem here.
|
11
|
+
# Include everything needed to run rake, tests, features, etc.
|
12
|
+
group :development do
|
13
|
+
gem 'bio-commandeer', '~>0.1'
|
14
|
+
gem 'pry', '~>0.1'
|
15
|
+
|
16
|
+
gem "rspec", "~> 2.8"
|
17
|
+
gem "jeweler", "~> 2.0"
|
18
|
+
gem "bundler", '~>1.0', ">= 1.0.21"
|
19
|
+
gem "rdoc", "~> 3.12"
|
20
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2014 Carmel McDougall, Ben Woodcroft, and Bernard Degnan.
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# SilkSlider
|
2
|
+
|
3
|
+
[![Build Status](https://secure.travis-ci.org/wwood/bioruby-SilkSlider.png)](http://travis-ci.org/wwood/bioruby-SilkSlider)
|
4
|
+
|
5
|
+
A bioinformatic program for predicting whether proteins are 'silk-like' or not.
|
6
|
+
|
7
|
+
This program was developed by Carmel McDougall and Ben Woodcroft at the [Degnan Laboratory](http://www.biology.uq.edu.au/staff/bernie-degnan) at the University of Queensland.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
After installing Ruby (SilkSlider is tested on Ruby 2.1.2):
|
12
|
+
```sh
|
13
|
+
gem install SilkSlider
|
14
|
+
```
|
15
|
+
|
16
|
+
Also required is the [SignalP](http://www.cbs.dtu.dk/services/SignalP/) and [TMHMM](http://www.cbs.dtu.dk/services/TMHMM/) programs, which need to be installed separately and available to silk_slider on the `$PATH`. SilkSlider is only tested on linux systems.
|
17
|
+
|
18
|
+
## Usage
|
19
|
+
|
20
|
+
To run the program:
|
21
|
+
```sh
|
22
|
+
silk_slider my.fasta
|
23
|
+
```
|
24
|
+
The program outputs a
|
25
|
+
To see the help:
|
26
|
+
```sh
|
27
|
+
silk_slider -h
|
28
|
+
```
|
29
|
+
|
30
|
+
## Project home page
|
31
|
+
|
32
|
+
Information on the source tree, documentation, examples, issues and
|
33
|
+
how to contribute, see
|
34
|
+
|
35
|
+
http://github.com/wwood/SilkSlider
|
36
|
+
|
37
|
+
## Cite
|
38
|
+
|
39
|
+
Currently unpublished - a journal article is in preparation.
|
40
|
+
|
41
|
+
## Biogems.info
|
42
|
+
|
43
|
+
This Biogem is published at (http://biogems.info/index.html#SilkSlider)
|
44
|
+
|
45
|
+
## Copyright
|
46
|
+
|
47
|
+
Copyright (c) 2014 Carmel McDougall, Ben Woodcroft, and Bernard Degnan. See LICENSE.txt for further details.
|
48
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
17
|
+
gem.name = "SilkSlider"
|
18
|
+
gem.homepage = "http://github.com/wwood/SilkSlider"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Predict silk-like proteins from its amino acid sequence}
|
21
|
+
gem.description = %Q{Predict silk-like proteins from its amino acid sequence.}
|
22
|
+
gem.email = "donttrustben near gmail.com"
|
23
|
+
gem.authors = ["Carmel McDougall", "Ben J. Woodcroft", "Bernard Degnan"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rspec/core'
|
29
|
+
require 'rspec/core/rake_task'
|
30
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
31
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
32
|
+
end
|
33
|
+
|
34
|
+
desc "Code coverage detail"
|
35
|
+
task :simplecov do
|
36
|
+
ENV['COVERAGE'] = "true"
|
37
|
+
Rake::Task['spec'].execute
|
38
|
+
end
|
39
|
+
|
40
|
+
task :default => :spec
|
41
|
+
|
42
|
+
require 'rdoc/task'
|
43
|
+
Rake::RDocTask.new do |rdoc|
|
44
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
45
|
+
|
46
|
+
rdoc.rdoc_dir = 'rdoc'
|
47
|
+
rdoc.title = "SilkSlider #{version}"
|
48
|
+
rdoc.rdoc_files.include('README*')
|
49
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
50
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
data/bin/silk_slider
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bio'
|
4
|
+
require 'bio-logger'
|
5
|
+
require 'optparse'
|
6
|
+
|
7
|
+
require 'bio-signalp'
|
8
|
+
require 'bio-tm_hmm'
|
9
|
+
|
10
|
+
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
11
|
+
require 'sequence_window_descriptor'
|
12
|
+
|
13
|
+
|
14
|
+
# Parse command line options into the options hash
|
15
|
+
SCRIPT_NAME = File.basename(__FILE__); LOG_NAME = SCRIPT_NAME.gsub('.rb','')
|
16
|
+
options = {
|
17
|
+
:logger => 'stderr',
|
18
|
+
:log_level => 'info',
|
19
|
+
:window_size => 80,
|
20
|
+
:min_glycines => 20,
|
21
|
+
}
|
22
|
+
o = OptionParser.new do |opts|
|
23
|
+
opts.banner = "
|
24
|
+
Usage: #{SCRIPT_NAME} my.fasta
|
25
|
+
|
26
|
+
Predict proteins as being silk-like or not.
|
27
|
+
|
28
|
+
my.fasta is the name of the fasta file you want to analyse. Output is all sequences predicted to be silk-like.
|
29
|
+
\n\n"
|
30
|
+
|
31
|
+
opts.separator "\nOptional parameters:\n\n"
|
32
|
+
opts.on("--window-size NUM", Integer, "Size of the window to determine glycine percentage over [default: #{options[:window_size] }]") do |arg|
|
33
|
+
options[:window_size] = arg
|
34
|
+
end
|
35
|
+
opts.on("--min-glycines NUM", Integer, "Number of glycines in a window for the protein to be considered silk-like, as an absolute number (not percentage) [default: #{options[:min_glycines] }]") do |arg|
|
36
|
+
options[:min_glycines] = arg
|
37
|
+
end
|
38
|
+
opts.separator "\nVerbosity:\n\n"
|
39
|
+
opts.on("-q", "--quiet", "Run quietly, set logging to ERROR level [default INFO]") {options[:log_level] = 'error'}
|
40
|
+
opts.on("--logger filename",String,"Log to file [default #{options[:logger]}]") { |name| options[:logger] = name}
|
41
|
+
opts.on("--trace options",String,"Set log level [default INFO]. e.g. '--trace debug' to set logging level to DEBUG"){|s| options[:log_level] = s}
|
42
|
+
|
43
|
+
opts.separator "\n\n"
|
44
|
+
end
|
45
|
+
o.parse!
|
46
|
+
if ARGV.length != 1
|
47
|
+
$stderr.puts o
|
48
|
+
exit 1
|
49
|
+
end
|
50
|
+
Bio::Log::CLI.logger(options[:logger]); Bio::Log::CLI.trace(options[:log_level]); log = Bio::Log::LoggerPlus.new(LOG_NAME); Bio::Log::CLI.configure(LOG_NAME)
|
51
|
+
|
52
|
+
signalp_runner = Bio::SignalP::Wrapper.new
|
53
|
+
tmhmm_runner = Bio::TMHMM::TmHmmWrapper.new
|
54
|
+
|
55
|
+
Bio::FlatFile.open(Bio::FastaFormat, ARGF).each do |seq|
|
56
|
+
signalp_result = signalp_runner.calculate(seq.seq)
|
57
|
+
if signalp_result.nil?
|
58
|
+
$stderr.puts "Unexpected empty sequence detected, ignoring: #{seq.definition}"
|
59
|
+
next
|
60
|
+
end
|
61
|
+
|
62
|
+
log.debug "Sequence #{seq.definition} predicted by SignalP? #{signalp_result.prediction}" if log.debug?
|
63
|
+
if signalp_result.prediction
|
64
|
+
sequence_without_signal_peptide = signalp_result.cleave(seq.seq)
|
65
|
+
|
66
|
+
tmhmm_protein = tmhmm_runner.calculate sequence_without_signal_peptide
|
67
|
+
log.debug "Sequence #{seq.definition} predicted by TMHMM2? #{tmhmm_protein.has_domain?}" if log.debug?
|
68
|
+
|
69
|
+
if !tmhmm_protein.has_domain?
|
70
|
+
# Does it pass the sliding window test?
|
71
|
+
slider = Bio::SequenceWindowDescriptor.new
|
72
|
+
slider.calculate sequence_without_signal_peptide, options[:window_size]
|
73
|
+
log.debug "Found maximal glycine count of #{slider.maximum_counts[:gly] } in window size #{options[:window_size] }" if log.debug?
|
74
|
+
if slider.maximum_counts[:gly] >= options[:min_glycines]
|
75
|
+
# We have a winner. Output.
|
76
|
+
puts ">#{seq.definition}"
|
77
|
+
puts seq.seq
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'bio'
|
2
|
+
|
3
|
+
module Bio
|
4
|
+
class SequenceWindowDescriptor
|
5
|
+
attr_reader :maximum_counts, :maximum_sequences
|
6
|
+
def calculate(sequence_object, window_size)
|
7
|
+
# initialise maximums
|
8
|
+
@maximum_counts = {}
|
9
|
+
@maximum_sequences = {}
|
10
|
+
[:gly].each do |sym|
|
11
|
+
@maximum_counts[sym] = 0
|
12
|
+
@maximum_sequences[sym] = ''
|
13
|
+
end
|
14
|
+
|
15
|
+
sequence_object.window_search(window_size) do |str|
|
16
|
+
num = 0
|
17
|
+
str.scan(/g/i) {num += 1}
|
18
|
+
if num >= @maximum_counts[:gly]
|
19
|
+
@maximum_counts[:gly] = num
|
20
|
+
@maximum_sequences[:gly] = str
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
require 'sequence_window_descriptor'
|
4
|
+
|
5
|
+
describe "SequenceWindowDescriptor" do
|
6
|
+
it 'test_first' do
|
7
|
+
desc = Bio::SequenceWindowDescriptor.new
|
8
|
+
desc.calculate(Bio::Sequence::AA.new('GGY'), 2)
|
9
|
+
desc.maximum_counts[:gly].should == 2
|
10
|
+
desc.maximum_sequences[:gly].should == 'GG'
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'test_not_first' do
|
14
|
+
desc = Bio::SequenceWindowDescriptor.new
|
15
|
+
desc.calculate(Bio::Sequence::AA.new('GGYYYGGYGY'), 4)
|
16
|
+
desc.maximum_counts[:gly].should == 3
|
17
|
+
desc.maximum_sequences[:gly].should == 'GGYG'
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'test_not_big_enough' do
|
21
|
+
desc = Bio::SequenceWindowDescriptor.new
|
22
|
+
desc.calculate(Bio::Sequence::AA.new('GG'), 4)
|
23
|
+
desc.maximum_counts[:gly].should == 0
|
24
|
+
desc.maximum_sequences[:gly].should == ''
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
require 'bio-commandeer'
|
3
|
+
require 'pry'
|
4
|
+
|
5
|
+
describe "SilkSlider" do
|
6
|
+
PATH_TO_SCRIPT = File.join(File.dirname(__FILE__),'..','bin','silk_slider')
|
7
|
+
|
8
|
+
it "should work with a positive" do
|
9
|
+
# This is a malarial protein known to have a signal peptide
|
10
|
+
acp = 'MKILLLCIIFLYYVNAFKNTQKDGVSLQILKKKRSNQVNFLNRKNDYNLIKNKNPSSSLKSTFDDIKKIISKQLSVEEDK'+
|
11
|
+
'IQMNSNFTKDLGADSLDLVELIMALEEKFNVTISDQDALKINTVQDAIDYIEKNNKQ'
|
12
|
+
acp_gly = acp + 'G'*30
|
13
|
+
fasta = [
|
14
|
+
'>positive',
|
15
|
+
acp_gly
|
16
|
+
].join("\n")+"\n"
|
17
|
+
command = "#{PATH_TO_SCRIPT} --quiet /dev/stdin"
|
18
|
+
res = Bio::Commandeer.run command, :stdin => fasta
|
19
|
+
res.should == fasta
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should work with a negative" do
|
23
|
+
# This is a malarial protein known to have a signal peptide
|
24
|
+
acp = 'MKILLLCIIFLYYVNAFKNTQKDGVSLQILKKKRSNQVNFLNRKNDYNLIKNKNPSSSLKSTFDDIKKIISKQLSVEEDK'+
|
25
|
+
'IQMNSNFTKDLGADSLDLVELIMALEEKFNVTISDQDALKINTVQDAIDYIEKNNKQ'
|
26
|
+
fasta = [
|
27
|
+
'>positive',
|
28
|
+
acp
|
29
|
+
].join("\n")+"\n"
|
30
|
+
command = "#{PATH_TO_SCRIPT} --quiet /dev/stdin"
|
31
|
+
res = Bio::Commandeer.run command, :stdin => fasta
|
32
|
+
res.should == ''
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'should screen out non-signal peptide proteins' do
|
36
|
+
# This is a malarial protein known to have a signal peptide
|
37
|
+
acp_without_start_sp = 'SLQILKKKRSNQVNFLNRKNDYNLIKNKNPSSSLKSTFDDIKKIISKQLSVEEDK'+
|
38
|
+
'IQMNSNFTKDLGADSLDLVELIMALEEKFNVTISDQDALKINTVQDAIDYIEKNNKQ'
|
39
|
+
acp_gly = acp_without_start_sp + 'G'*30
|
40
|
+
fasta = [
|
41
|
+
'>positive',
|
42
|
+
acp_gly
|
43
|
+
].join("\n")+"\n"
|
44
|
+
command = "#{PATH_TO_SCRIPT} --quiet /dev/stdin"
|
45
|
+
res = Bio::Commandeer.run command, :stdin => fasta
|
46
|
+
res.should == ''
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'should screen out TMD proteins' do
|
50
|
+
# This is a malarial protein known to have several TMDs (but no SP)
|
51
|
+
pfcrt = 'MKFASKKNNQKNSSKNDERYRELDNLVQEGNGSRLGGGSCLGKCAHVFKLIFKEIKDNIFIYILSIIYLSVCVMNKIFAK
|
52
|
+
RTLNKIGNYSFVTSETHNFICMIMFFIVYSLFGNKKGNSKERHRSFNLQFFAISMLDACSVILAFIGLTRTTGNIQSFVL
|
53
|
+
QLSIPINMFFCFLILRYRYHLYNYLGAVIIVVTIALVEMKLSFETQEENSIIFNLVLISALIPVCFSNMTREIVFKKYKI
|
54
|
+
DILRLNAMVSFFQLFTSCLILPVYTLPFLKQLHLPYNEIWTNIKNGFACLFLGRNTVVENCGLGMAKLCDDCDGAWKTFA
|
55
|
+
LFSFFNICDNLITSYIIDKFSTMTYTIVSCIQGPAIAIAYYFKFLAGDVVREPRLLDFVTLFGYLFGSIIYRVGNIILER
|
56
|
+
KKMRNEENEDSEGELTNVDSIITQ'
|
57
|
+
acp = 'MKILLLCIIFLYYVNAFKNTQKDGVSLQILKKKRSNQVNFLNRKNDYNLIKNKNPSSSLKSTFDDIKKIISKQLSVEEDK'+
|
58
|
+
'IQMNSNFTKDLGADSLDLVELIMALEEKFNVTISDQDALKINTVQDAIDYIEKNNKQ'
|
59
|
+
acp_pfcrt_gly = acp + pfcrt + 'G'*30 #put a SP on the start of a TMD protein, then a passing window
|
60
|
+
fasta = [
|
61
|
+
'>positive',
|
62
|
+
acp_pfcrt_gly
|
63
|
+
].join("\n")+"\n"
|
64
|
+
command = "#{PATH_TO_SCRIPT} --quiet /dev/stdin"
|
65
|
+
res = Bio::Commandeer.run command, :stdin => fasta
|
66
|
+
res.should == ''
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'should work with multiple sequences' do
|
70
|
+
acp = 'MKILLLCIIFLYYVNAFKNTQKDGVSLQILKKKRSNQVNFLNRKNDYNLIKNKNPSSSLKSTFDDIKKIISKQLSVEEDK'+
|
71
|
+
'IQMNSNFTKDLGADSLDLVELIMALEEKFNVTISDQDALKINTVQDAIDYIEKNNKQ'
|
72
|
+
acp_without_start_sp = 'SLQILKKKRSNQVNFLNRKNDYNLIKNKNPSSSLKSTFDDIKKIISKQLSVEEDK'+
|
73
|
+
'IQMNSNFTKDLGADSLDLVELIMALEEKFNVTISDQDALKINTVQDAIDYIEKNNKQ'
|
74
|
+
|
75
|
+
fasta = [
|
76
|
+
'>positive1',
|
77
|
+
acp + 'G'*30,
|
78
|
+
'>neg',
|
79
|
+
acp_without_start_sp,
|
80
|
+
'>pos2 yeh',
|
81
|
+
acp + 'G'*25,
|
82
|
+
].join("\n")+"\n"
|
83
|
+
command = "#{PATH_TO_SCRIPT} --quiet /dev/stdin"
|
84
|
+
res = Bio::Commandeer.run command, :stdin => fasta
|
85
|
+
res.should == [
|
86
|
+
'>positive1',
|
87
|
+
acp + 'G'*30,
|
88
|
+
'>pos2 yeh',
|
89
|
+
acp + 'G'*25,
|
90
|
+
].join("\n")+"\n"
|
91
|
+
end
|
92
|
+
|
93
|
+
it 'shoudl work with changed min gly' do
|
94
|
+
acp = 'MKILLLCIIFLYYVNAFKNTQKDGVSLQILKKKRSNQVNFLNRKNDYNLIKNKNPSSSLKSTFDDIKKIISKQLSVEEDK'+
|
95
|
+
'IQMNSNFTKDLGADSLDLVELIMALEEKFNVTISDQDALKINTVQDAIDYIEKNNKQ'
|
96
|
+
fasta = [
|
97
|
+
'>positive1',
|
98
|
+
acp + 'G'*15,
|
99
|
+
].join("\n")+"\n"
|
100
|
+
command = "#{PATH_TO_SCRIPT} --quiet /dev/stdin"
|
101
|
+
res = Bio::Commandeer.run command, :stdin => fasta
|
102
|
+
res.should == ''
|
103
|
+
command = "#{PATH_TO_SCRIPT} --quiet /dev/stdin --min-glycines 5"
|
104
|
+
res = Bio::Commandeer.run command, :stdin => fasta
|
105
|
+
res.should == fasta
|
106
|
+
end
|
107
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
|
2
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
4
|
+
|
5
|
+
require 'rspec'
|
6
|
+
|
7
|
+
# Requires supporting files with custom matchers and macros, etc,
|
8
|
+
# in ./support/ and its subdirectories.
|
9
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
10
|
+
|
11
|
+
RSpec.configure do |config|
|
12
|
+
|
13
|
+
end
|
metadata
ADDED
@@ -0,0 +1,219 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: SilkSlider
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Carmel McDougall
|
8
|
+
- Ben J. Woodcroft
|
9
|
+
- Bernard Degnan
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2014-07-02 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: bio-signalp
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - "~>"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0.3'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - "~>"
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0.3'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: bio-tm_hmm
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 0.2.2
|
36
|
+
- - "~>"
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: 0.2.2
|
39
|
+
type: :runtime
|
40
|
+
prerelease: false
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.2.2
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 0.2.2
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: bio
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 1.4.2
|
56
|
+
- - "~>"
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '1.4'
|
59
|
+
type: :runtime
|
60
|
+
prerelease: false
|
61
|
+
version_requirements: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: 1.4.2
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.4'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bio-logger
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bio-commandeer
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.1'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.1'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.1'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.1'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '2.8'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '2.8'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: jeweler
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '2.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '2.0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: bundler
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 1.0.21
|
146
|
+
- - "~>"
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '1.0'
|
149
|
+
type: :development
|
150
|
+
prerelease: false
|
151
|
+
version_requirements: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: 1.0.21
|
156
|
+
- - "~>"
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '1.0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: rdoc
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - "~>"
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '3.12'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - "~>"
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '3.12'
|
173
|
+
description: Predict silk-like proteins from its amino acid sequence.
|
174
|
+
email: donttrustben near gmail.com
|
175
|
+
executables:
|
176
|
+
- silk_slider
|
177
|
+
extensions: []
|
178
|
+
extra_rdoc_files:
|
179
|
+
- LICENSE.txt
|
180
|
+
- README.md
|
181
|
+
files:
|
182
|
+
- ".document"
|
183
|
+
- ".rspec"
|
184
|
+
- ".travis.yml"
|
185
|
+
- Gemfile
|
186
|
+
- LICENSE.txt
|
187
|
+
- README.md
|
188
|
+
- Rakefile
|
189
|
+
- VERSION
|
190
|
+
- bin/silk_slider
|
191
|
+
- lib/sequence_window_descriptor.rb
|
192
|
+
- spec/sequence_window_descriptor_spec.rb
|
193
|
+
- spec/silk_slider_spec.rb
|
194
|
+
- spec/spec_helper.rb
|
195
|
+
homepage: http://github.com/wwood/SilkSlider
|
196
|
+
licenses:
|
197
|
+
- MIT
|
198
|
+
metadata: {}
|
199
|
+
post_install_message:
|
200
|
+
rdoc_options: []
|
201
|
+
require_paths:
|
202
|
+
- lib
|
203
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
204
|
+
requirements:
|
205
|
+
- - ">="
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0'
|
208
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
|
+
requirements:
|
210
|
+
- - ">="
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: '0'
|
213
|
+
requirements: []
|
214
|
+
rubyforge_project:
|
215
|
+
rubygems_version: 2.2.2
|
216
|
+
signing_key:
|
217
|
+
specification_version: 4
|
218
|
+
summary: Predict silk-like proteins from its amino acid sequence
|
219
|
+
test_files: []
|