crb-blast 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c6e549532d5ab7c3e2320affbd7b9db0e01dc741
4
- data.tar.gz: 7c2a58f1f51381c673bf8906f6e12739b58a7cab
3
+ metadata.gz: 275e3d2996f91648e9f046cd7a08c4c663243765
4
+ data.tar.gz: 4de455ec18f7c657585326d94e43dc761403cf77
5
5
  SHA512:
6
- metadata.gz: 236fb67036142084a61df53041428fe7e6b96abb3ffcced4ed27f86de32d26f6a68a0165ea2052b26bdc96ed7f882b2e791ee45b228dce01b9f8a33f1b80f322
7
- data.tar.gz: 02b62ece6ae514db40cd53a94e369c6653213420ae14a7249bc34dd4e1e92e02767d46cabbc588020969d82927203dd3cb5a2e40af37a2f6029f4eec6940dd21
6
+ metadata.gz: b2725a63477308471676fbdabfd035fc83a469adede3ce56d49bd9020bf779ad53f6f3edec65e6ea744666dbe1df879116248f6ecfa8bdfa86dfdd4b393c2ca4
7
+ data.tar.gz: 6a731db6a14a8b8c24394891fe3335082e5b664e44314d18324f1072e76a78f37ec3152e459dc0500b293e836958bb84a6e9733961a77fb87a4cda16ee043d56
data/Rakefile CHANGED
@@ -4,5 +4,23 @@ Rake::TestTask.new do |t|
4
4
  t.libs << 'test'
5
5
  end
6
6
 
7
+ Rake::TestTask.new do |t|
8
+ t.name = :one
9
+ t.libs << 'test'
10
+ t.test_files = ['test/test_test.rb']
11
+ end
12
+
13
+ Rake::TestTask.new do |t|
14
+ t.name = :two
15
+ t.libs << 'test'
16
+ t.test_files = ['test/test_test2.rb']
17
+ end
18
+
19
+ Rake::TestTask.new do |t|
20
+ t.name = :three
21
+ t.libs << 'test'
22
+ t.test_files = ['test/test_test3.rb']
23
+ end
24
+
7
25
  desc "Run tests"
8
26
  task :default => :test
@@ -8,8 +8,8 @@ module CRB_Blast
8
8
 
9
9
  def initialize(list, qprot, tprot)
10
10
  raise(RuntimeError, "unexpected number of columns") if list.length < 14
11
- @query = list[0].split(/[\|\ ]/).first
12
- @target = list[1].split(/[\|\ ]/).first
11
+ @query = Bio::FastaDefline.new(list[0]).entry_id
12
+ @target = Bio::FastaDefline.new(list[1]).entry_id
13
13
  @id = list[2]
14
14
  @alnlen = list[3].to_i
15
15
  @mismatches = list[4].to_i
@@ -33,4 +33,4 @@ module CRB_Blast
33
33
  end
34
34
  end
35
35
 
36
- end
36
+ end
@@ -3,7 +3,7 @@ module CRB_Blast
3
3
  module VERSION
4
4
  MAJOR = 0
5
5
  MINOR = 6
6
- PATCH = 5
6
+ PATCH = 6
7
7
  BUILD = nil
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
@@ -0,0 +1,65 @@
1
+ >tr|C3Y8C9|C3Y8C9_BRAFL
2
+ ATGGCTGCTGCTGTTTCTACTGTTGGAGCTATTAATAGAGCTCCTCTTTCTCTTAATGGA
3
+ TCTGGATCTGGAGCTGTTTCTGCTCCTGCTTCTACTTTTCTTGGAAAGAAGGTTGTTACT
4
+ GTTTCTAGATTTGCTCAATCTAATAAGAAGTCTAATGGATCTTTTAAGGTTCTTGCTGTT
5
+ AAGGAAGATAAGCAAACTGATGGAGATAGATGGAGAGGACTTGCTTATGATACTTCTGAT
6
+ GATCAACAAGATATTACTAGAGGAAAGGGAATGGTTGATTCTGTTTTTCAAGCTCCTATG
7
+ GGAACTGGAACTCATCATGCTGTTCTTTCTTCTTATGAATATGTTTCTCAAGGACTTAGA
8
+ CAATATAATCTTGATAATATGATGGATGGATTTTATATTGCTCCTGCTTTTATGGATAAG
9
+ CTTGTTGTTCATATTACTAAGAATTTTCTTACTCTTCCTAATATTAAGGTTCCTCTTATT
10
+ CTTGGAATTTGGGGAGGAAAGGGACAAGGAAAGTCTTTTCAATGTGAACTTGTTATGGCT
11
+ AAGATGGGAATTAATCCTATTATGATGTCTGCTGGAGAACTTGAATCTGGAAATGCTGGA
12
+ GAACCTGCTAAGCTTATTAGACAAAGATATAGAGAAGCTGCTGATCTTATTAAGAAGGGA
13
+ AAGATGTGTTGTCTTTTTATTAATGATCTTGATGCTGGAGCTGGAAGAATGGGAGGAACT
14
+ ACTCAATATACTGTTAATAATCAAATGGTTAATGCTACTCTTATGAATATTGCTGATAAT
15
+ CCTACTAATGTTCAACTTCCTGGAATGTATAATAAGGAAGAAAATGCTAGAGTTCCTATT
16
+ ATTTGTACTGGAAATGATTTTTCTACTCTTTATGCTCCTCTTATTAGAGATGGAAGAATG
17
+ GAAAAGTTTTATTGGGCTCCTACTAGAGAAGATAGAATTGGAGTTTGTAAGGGAATTTTT
18
+ AGAACTGATAAGATTAAGGATGAAGATATTGTTACTCTTGTTGATCAATTTCCTGGACAA
19
+ TCTATTGATTTTTTTGGAGCTCTTAGAGCTAGAGTTTATGATGATGAAGTTAGAAAGTTT
20
+ GTTGAATCTCTTGGAGTTGAAAAGATTGGAAAGAGACTTGTTAATTCTAGAGAAGGACCT
21
+ CCTGTTTTTGAACAACCTGAAATGACTTATGAAAAGCTTATGGAATATGGAAATATGCTT
22
+ GTTATGGAACAAGAAAATGTTAAGAGAGTTCAACTTGCTGAAACTTATCTTTCTCAAGCT
23
+ GCTCTTGGAGATGCTAATGCTGATGCTATTGGAAGAGGAACTTTTTATGGAAAGGGAGCT
24
+ CAACAAGTTAATCTTCCTGTTCCTGAAGGATGTACTGATCCTGTTGCTGAAAATTTTGAT
25
+ CCTACTGCTAGATCTGATGATGGAACTTGTGTTTATAATTTT
26
+ >sp|O47426|ATP6_BRAFL
27
+ ATGGCTGGAACTGGACTTTTTGCTGAAATTCTTGATGGAGAAGTTTATAAGTATTATGCT
28
+ GATGGAGAATGGAAGACTTCTTCTTCTGGAAAGTCTGTTGCTATTATGAATCCTGCTACT
29
+ AGAAAGACTCAATATAAGGTTCAAGCTTGTACTCAAGAAGAAGTTAATGCTGTTATGGAA
30
+ CTTGCTAAGTCTGCTCAAAAGTCTTGGGCTAAGACTCCTCTTTGGAAGAGAGCTGAACTT
31
+ CTTCATAAGGCTGCTGCTATTCTTAAGGATAATAAGGCTCCTATGGCTGAATCTCTTGTT
32
+ AAGGAAATTGCTAAGCCTGCTAAGGATTCTGTTACTGAAGTTGTTAGATCTGGAGATCTT
33
+ ATTTCTTATTGTGCTGAAGAAGGAGTTAGAATTCTTGGAGAAGGAAAGTTTCTTCTTTCT
34
+ GATTCTTTTCCTGGAAATGATAGAACTAAGTATTGTCTTACTTCTAAGATTCCTCTTGGA
35
+ GTTGTTCTTGCTATTCCTCCTTTTAATTATCCTGTTAATCTTGCTGTTTCTAAGATTGCT
36
+ CCTGCTCTTATTGCTGGAAATTCTCTTGTTCTTAAGCCTCCTACTCAAGGAGCTGTTTCT
37
+ TGTCTTCATATGGTTCATTGTTTTCATCTTGCTGGATTTCCTAAGGGACTTATTTCTTGT
38
+ ATTACTGGAAAGGGATCTGAAATTGGAGATTTTCTTACTATGCATCCTGCTGTTAATTGT
39
+ ATTTCTTTTACTGGAGGAGATACTGGAATTTCTATTTCTAAGAAGGCTGGAATGATTCCT
40
+ CTTCAAATGGAACTTGGAGGAAAGGATGCTTGTATTGTTCTTGATGATGCTGATCTTGAT
41
+ CTTGTTGCTTCTAATATTATTAAGGGAGGATTTTCTTATTCTGGACAAAGATGTACTGCT
42
+ GTTAAGGTTGTTCTTGTTATGGAATCTGTTGCTGATGAACTTGTTGAAAAGGTTAAGGCT
43
+ AAGGTTGCTAAGCTTACTGTTGGACCTCCTGAAGAAAATTCTGATATTACTGCTGTTGTT
44
+ TCTGAATCTTCTGCTAATTTTATTGAAGGACTTGTTATGGATGCTAAGGAAAAGGGAGCT
45
+ ACTTTTTGTCAAGAATATAAGAGAGAAGGAAATCTTATTTGGCCTCTTCTTCTTGATAAT
46
+ GTTAGACCTGATATGAGAATTGCTTGGGAAGAACCTTTTGGACCTGTTGTTCCTGTTCTT
47
+ AGAATTAATTCTGTTGAAGAAGGAATTAATCATTGTAATGCTTCTAATTTTGGACTTCAA
48
+ GGATGTGTTTTTACTAAGGATATTAATAAGGCTATTCTTATTTCTGATGCTATGGAAACT
49
+ GGAACTGTTCAAATTAATTCTGCTCCTGCTAGAGGACCTGATCATTTTCCTTTTCAAGGA
50
+ CTTAAGGATTCTGGAATTGGATCTCAAGGAGTTACTAATTCTATTAATCTTATGACTAAG
51
+ GTTAAGACTACTGTTATTAATCTTCCTACTCCTTCTTATTCTATGGGAGATGGATTTATT
52
+ TCTAGACTT
53
+ >sp|C4A0D9|BAP1_BRAFL
54
+ ATGGTTATTCTTTCTAATGTTTCTCTTTTTTCTTGTTGTAATATTTCTCAAAAGCCTTCT
55
+ CTTTTTTCTCCTTCTTCTAGATCTTCTCATTGTCCTATTAGATGTTCTCAATCTCAAGAA
56
+ GGAAAGGAAGTTGTTACTTCTCCTCTTAGATCTGTTGTTTGGTCTCTTGGAGAAGAAGTT
57
+ TCTAAGAGATCTCTTTTTGCTCTTGTTTCTGCTTCTCTTTTTTTTGTTGATCCTGCTCTT
58
+ GCTTTTAAGGGAGGAGGACCTTATGGACAAGGAGTTACTAGAGGACAAGATCTTTCTGGA
59
+ AAGGATTTTTCTGGACAAACTCTTATTAGACAAGATTTTAAGACTTCTATTCTTAGACAA
60
+ GCTAATTTTAAGGGAGCTAAGCTTCTTGGAGCTTCTTTTTTTGATGCTGATCTTACTGGA
61
+ GCTGATCTTTCTGAAGCTGATCTTAGAGGAGCTGATTTTTCTCTTGCTAATGTTACTAAG
62
+ GTTAATCTTACTAATGCTAATCTTGAAGGAGCTACTGTTACTGGAAATACTTCTTTTAAG
63
+ GGATCTAATATTACTGGAGCTGATTTTACTGATGTTCCTCTTAGAGATGATCAAAGAGTT
64
+ TATCTTTGTAAGGTTGCTGATGGAGTTAATGCTACTACTGGAAATGCTACTAGAGATACT
65
+ CTTCTTTGTAAT
@@ -28,14 +28,6 @@ class TestCRBBlast < Test::Unit::TestCase
28
28
  end
29
29
  end
30
30
 
31
- should 'raise error when files don\'t exist' do
32
- query = File.join(File.dirname(__FILE__), 'not_query.fasta')
33
- target = File.join(File.dirname(__FILE__), 'not_target.fasta')
34
- assert_raise IOError do
35
- blaster = CRB_Blast::CRB_Blast.new(query, target)
36
- end
37
- end
38
-
39
31
  should 'setup should run ok' do
40
32
  ans = @blaster != nil
41
33
  assert_equal ans, true
@@ -85,15 +77,10 @@ class TestCRBBlast < Test::Unit::TestCase
85
77
  assert_equal a["scaffold5"][0].target, "AT5G13650.2"
86
78
  end
87
79
 
88
- should 'run' do
89
- blaster = CRB_Blast::CRB_Blast.new('test/query.fasta',
90
- 'test/target.fasta')
91
- blaster.run 1, 1, false
92
- assert blaster.reciprocals
93
- end
94
80
 
95
81
  should 'get number of reciprocals' do
96
82
  assert_equal 11, @blaster.size
97
83
  end
84
+
98
85
  end
99
86
  end
@@ -86,5 +86,6 @@ class Test2CRBBlast < Test::Unit::TestCase
86
86
  end
87
87
  assert_equal count,70
88
88
  end
89
+
89
90
  end
90
91
  end
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'helper'
4
+
5
+ class Test3CRBBlast < Test::Unit::TestCase
6
+
7
+ context 'crb-blast' do
8
+
9
+ setup do
10
+
11
+ end
12
+
13
+ teardown do
14
+ extensions = ["blast", "nsq", "nin", "nhr", "psq", "pin", "phr"]
15
+ Dir["*"].each do |file|
16
+ extensions.each do |extension|
17
+ if file =~ /.*\.#{extension}$/
18
+ File.delete(file)
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ should 'raise error when files don\'t exist' do
25
+ query = File.join(File.dirname(__FILE__), 'not_query.fasta')
26
+ target = File.join(File.dirname(__FILE__), 'not_target.fasta')
27
+ assert_raise IOError do
28
+ blaster = CRB_Blast::CRB_Blast.new(query, target)
29
+ end
30
+ end
31
+
32
+ should 'run' do
33
+ blaster = CRB_Blast::CRB_Blast.new('test/query.fasta',
34
+ 'test/target.fasta')
35
+ blaster.run 1, 1, false
36
+ assert blaster.reciprocals
37
+ end
38
+
39
+ should 'work for query sequences with pipes' do
40
+ query = File.join(File.dirname(__FILE__), 'query3.fasta')
41
+ target = File.join(File.dirname(__FILE__), 'target.fasta')
42
+
43
+ blaster = CRB_Blast::CRB_Blast.new(query, target)
44
+ dbs = blaster.makedb
45
+ run = blaster.run_blast(1e-5, 6, false)
46
+ load = blaster.load_outputs
47
+ recip_count = blaster.find_reciprocals
48
+ recips = blaster.reciprocals
49
+ assert_equal 3, recip_count, "reciprocal hits"
50
+ assert recips.has_key?("tr|C3Y8C9|C3Y8C9_BRAFL")
51
+ assert recips.has_key?("sp|O47426|ATP6_BRAFL")
52
+ assert recips.has_key?("sp|C4A0D9|BAP1_BRAFL")
53
+ end
54
+ end
55
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crb-blast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Boursnell
@@ -222,11 +222,13 @@ files:
222
222
  - test/helper.rb
223
223
  - test/query.fasta
224
224
  - test/query2.fasta
225
+ - test/query3.fasta
225
226
  - test/target.fasta
226
227
  - test/target2.fasta
227
228
  - test/test_bin.rb
228
229
  - test/test_test.rb
229
230
  - test/test_test2.rb
231
+ - test/test_test3.rb
230
232
  homepage: https://github.com/cboursnell/crb-blast
231
233
  licenses:
232
234
  - MIT