bio-dbla-classifier 0.5.1 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.2
4
+ - 1.9.3
5
+ #- jruby-19mode # JRuby in 1.9 mode
6
+ - rbx-19mode
7
+ #uncomment this line if your project needs to run something other than `rake`:
8
+ script: bundle exec rspec spec
data/Gemfile CHANGED
@@ -1,12 +1,11 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'bio', '>= 1.4.2'
3
+ gem 'bio', '>= 1.4.3'
4
4
 
5
5
  # Needed to run rake, tests, features
6
6
  group :development do
7
- gem "rspec", "~> 2.3.0"
8
- gem "bundler", "~> 1.1.rc.7"
9
- gem "jeweler", "~> 1.6.4"
10
- gem "rcov", ">= 0"
11
- gem "rake", "~> 0.9.2.2"
7
+ gem "rspec", ">= 2.8.0"
8
+ gem "bundler", ">= 1.0.22" #"~> 1.1.rc.7"
9
+ gem "jeweler", ">= 1.6.4"
10
+ gem "rake", ">= 0.9.2.2"
12
11
  end
@@ -1,31 +1,33 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- bio (1.4.2)
4
+ bio (1.4.3)
5
5
  diff-lcs (1.1.3)
6
6
  git (1.2.5)
7
- jeweler (1.6.4)
7
+ jeweler (1.8.4)
8
8
  bundler (~> 1.0)
9
9
  git (>= 1.2.5)
10
10
  rake
11
- rake (0.9.2.2)
12
- rcov (0.9.10)
13
- rspec (2.3.0)
14
- rspec-core (~> 2.3.0)
15
- rspec-expectations (~> 2.3.0)
16
- rspec-mocks (~> 2.3.0)
17
- rspec-core (2.3.1)
18
- rspec-expectations (2.3.0)
19
- diff-lcs (~> 1.1.2)
20
- rspec-mocks (2.3.0)
11
+ rdoc
12
+ json (1.7.7)
13
+ rake (10.0.3)
14
+ rdoc (3.12.1)
15
+ json (~> 1.4)
16
+ rspec (2.12.0)
17
+ rspec-core (~> 2.12.0)
18
+ rspec-expectations (~> 2.12.0)
19
+ rspec-mocks (~> 2.12.0)
20
+ rspec-core (2.12.2)
21
+ rspec-expectations (2.12.1)
22
+ diff-lcs (~> 1.1.3)
23
+ rspec-mocks (2.12.2)
21
24
 
22
25
  PLATFORMS
23
26
  ruby
24
27
 
25
28
  DEPENDENCIES
26
- bio (>= 1.4.2)
27
- bundler (~> 1.1.rc.7)
28
- jeweler (~> 1.6.4)
29
- rake (~> 0.9.2.2)
30
- rcov
31
- rspec (~> 2.3.0)
29
+ bio (>= 1.4.3)
30
+ bundler (>= 1.0.22)
31
+ jeweler (>= 1.6.4)
32
+ rake (>= 0.9.2.2)
33
+ rspec (>= 2.8.0)
@@ -1,3 +1,4 @@
1
+ {<img src="https://secure.travis-ci.org/georgeG/bioruby-dbla-classifier.png?branch=master" alt="Build Status" />}[http://travis-ci.org/georgeG/bioruby-dbla-classifier]
1
2
  = bio-dbla-classifier
2
3
 
3
4
  DBL-alpha tags are small regions of the PfEMP1 protein that can be PCR amplified and are classified into six expression groups depending on the number of cysteines and presence of
@@ -38,7 +39,6 @@ install the gem. This will install the bioruby gem if it is not already installe
38
39
  #get the cyspolv group for this tag
39
40
  puts dbl_seq.cyspolv_group #=> 1
40
41
 
41
-
42
42
  #get the block sharing group for this tag
43
43
  puts dbl_seq.bs_group #=> 1
44
44
 
@@ -69,6 +69,19 @@ window length is 14
69
69
  #get pspb4
70
70
  puts seq.pspb4 #=> FTSHGKCGRNETNV
71
71
 
72
+ #get a pspb as an amino acid
73
+ puts seq.pspb4_as_dna
74
+
75
+ = Finding polv2 to polv3 regions
76
+ Only the Amino acid regions are supported for now
77
+
78
+ #get polv1 to polv2 region
79
+ puts seq.polv1_to_polv2
80
+
81
+ #get polv3 to polv4 region
82
+ puts seq.polv3_to_polv4
83
+
84
+
72
85
  = Processing a flatfile for example fasta, genbank or embl
73
86
 
74
87
  seq_file = "sequences.fasta"
data/Rakefile CHANGED
@@ -31,10 +31,10 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
31
31
  spec.pattern = FileList['spec/**/*_spec.rb']
32
32
  end
33
33
 
34
- RSpec::Core::RakeTask.new(:rcov) do |spec|
35
- spec.pattern = 'spec/**/*_spec.rb'
36
- spec.rcov = true
37
- end
34
+ #RSpec::Core::RakeTask.new(:rcov) do |spec|
35
+ #spec.pattern = 'spec/**/*_spec.rb'
36
+ #spec.rcov = true
37
+ #end
38
38
 
39
39
  task :default => :spec
40
40
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.7.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "bio-dbla-classifier"
8
- s.version = "0.5.1"
8
+ s.version = "0.7.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["George Githinji"]
12
- s.date = "2012-02-20"
12
+ s.date = "2013-02-22"
13
13
  s.description = "Methods to classify and manipulate PfEMP1 DBL-alpha sequence tags"
14
14
  s.email = "georgkam@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.files = [
20
20
  ".document",
21
21
  ".rspec",
22
+ ".travis.yml",
22
23
  "Gemfile",
23
24
  "Gemfile.lock",
24
25
  "LICENSE.txt",
@@ -28,41 +29,40 @@ Gem::Specification.new do |s|
28
29
  "bio-dbla-classifier.gemspec",
29
30
  "lib/bio-dbla-classifier.rb",
30
31
  "lib/bio/sequence/aa/aa.rb",
32
+ "lib/bio/sequence/na/na.rb",
31
33
  "spec/aa_spec.rb",
32
34
  "spec/bio-dbla-classifier_spec.rb",
35
+ "spec/na_spec.rb",
33
36
  "spec/spec_helper.rb"
34
37
  ]
35
38
  s.homepage = "http://github.com/georgeG/bioruby-dbla-classifier"
36
39
  s.licenses = ["Ruby"]
37
40
  s.require_paths = ["lib"]
38
- s.rubygems_version = "1.8.12"
41
+ s.rubygems_version = "1.8.25"
39
42
  s.summary = "A tool to classify and manipulate PfEMP1 DBL-alpha sequence tags"
40
43
 
41
44
  if s.respond_to? :specification_version then
42
45
  s.specification_version = 3
43
46
 
44
47
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
45
- s.add_runtime_dependency(%q<bio>, [">= 1.4.2"])
46
- s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
47
- s.add_development_dependency(%q<bundler>, ["~> 1.1.rc.7"])
48
- s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
49
- s.add_development_dependency(%q<rcov>, [">= 0"])
50
- s.add_development_dependency(%q<rake>, ["~> 0.9.2.2"])
48
+ s.add_runtime_dependency(%q<bio>, [">= 1.4.3"])
49
+ s.add_development_dependency(%q<rspec>, [">= 2.8.0"])
50
+ s.add_development_dependency(%q<bundler>, [">= 1.0.22"])
51
+ s.add_development_dependency(%q<jeweler>, [">= 1.6.4"])
52
+ s.add_development_dependency(%q<rake>, [">= 0.9.2.2"])
51
53
  else
52
- s.add_dependency(%q<bio>, [">= 1.4.2"])
53
- s.add_dependency(%q<rspec>, ["~> 2.3.0"])
54
- s.add_dependency(%q<bundler>, ["~> 1.1.rc.7"])
55
- s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
56
- s.add_dependency(%q<rcov>, [">= 0"])
57
- s.add_dependency(%q<rake>, ["~> 0.9.2.2"])
54
+ s.add_dependency(%q<bio>, [">= 1.4.3"])
55
+ s.add_dependency(%q<rspec>, [">= 2.8.0"])
56
+ s.add_dependency(%q<bundler>, [">= 1.0.22"])
57
+ s.add_dependency(%q<jeweler>, [">= 1.6.4"])
58
+ s.add_dependency(%q<rake>, [">= 0.9.2.2"])
58
59
  end
59
60
  else
60
- s.add_dependency(%q<bio>, [">= 1.4.2"])
61
- s.add_dependency(%q<rspec>, ["~> 2.3.0"])
62
- s.add_dependency(%q<bundler>, ["~> 1.1.rc.7"])
63
- s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
64
- s.add_dependency(%q<rcov>, [">= 0"])
65
- s.add_dependency(%q<rake>, ["~> 0.9.2.2"])
61
+ s.add_dependency(%q<bio>, [">= 1.4.3"])
62
+ s.add_dependency(%q<rspec>, [">= 2.8.0"])
63
+ s.add_dependency(%q<bundler>, [">= 1.0.22"])
64
+ s.add_dependency(%q<jeweler>, [">= 1.6.4"])
65
+ s.add_dependency(%q<rake>, [">= 0.9.2.2"])
66
66
  end
67
67
  end
68
68
 
@@ -1,2 +1,5 @@
1
1
  require 'bio'
2
2
  require File.join(File.expand_path(File.dirname(__FILE__)), 'bio','sequence/aa/aa')
3
+ require File.join(File.expand_path(File.dirname(__FILE__)), 'bio','sequence/na/na')
4
+
5
+
@@ -5,12 +5,12 @@ class Bio::Sequence::AA
5
5
  end
6
6
 
7
7
  def start_motif
8
- warn "[DEPRECATION] 'start_motif' is deprecated. Please use `n_terminal_motif` instead."
8
+ #warn "[DEPRECATION] 'start_motif' is deprecated. Please use `n_terminal_motif` instead."
9
9
  n_terminal_motif
10
10
  end
11
11
 
12
12
  def end_motif
13
- warn "[DEPRECATION] 'end_motif' is deprecated. Please use `c_terminal_motif` instead."
13
+ #warn "[DEPRECATION] 'end_motif' is deprecated. Please use `c_terminal_motif` instead."
14
14
  c_terminal_motif
15
15
  end
16
16
 
@@ -35,6 +35,16 @@ class Bio::Sequence::AA
35
35
  scan(/C/).size
36
36
  end
37
37
 
38
+ #get the 5' end of the sequence from the 'middle'
39
+ def polv1_to_polv2
40
+ slice(rindex(polv1),rindex(polv2) - 6)
41
+ end
42
+
43
+ #get the 3'end of the sequence from the "middle"
44
+ def polv3_to_polv4
45
+ slice(rindex(polv3),(rindex(polv4) - rindex(polv3) + 4))
46
+ end
47
+
38
48
  #The first position of limited variability(polv1)
39
49
  def polv1
40
50
  self[10,4]
@@ -86,19 +96,36 @@ class Bio::Sequence::AA
86
96
  group
87
97
  end
88
98
 
99
+ def polv1_pos
100
+ index(polv1)
101
+ end
102
+
103
+ def polv2_pos
104
+ index(polv2)
105
+ end
106
+
107
+ def polv3_pos
108
+ index(polv3)
109
+ end
110
+
111
+ def polv4_pos
112
+ index(polv4)
113
+ end
114
+
115
+
89
116
  #return the block sharing group
90
117
  def bs_group
91
118
  case
92
119
  when self =~ /(?:R(?:HYADHDKSGNYYK|NENNNLGKLSNEQ|I(?:RHYDDGSGNY(?:SK|YK)|THYN(?:GVSGNCVK|DGSGNYVK))|E(?:RYKDLKDVEIDD|HYKEVKNGNY(?:YK|IK)|KYKDLKD(?:VEIDD|LPIDD))|VKETYKDDPNYYK|KNNSSLRKLTNEQ)|G(?:G(?:RGRK(?:KLEDNL(?:IE|KE)|QLEENLQK)|GGRKKLEDNLKE)|I(?:N(?:D(?:Y(?:ND(?:GSGNYFK|ISGNYYK)|D(?:RDGPE(?:HYK|YYK)|GDGPEYYK))|CDRDGPEYYK)|AYNDGSENYYK)|IDYDHDGPHYYK)|P(?:SQEK(?:IKLEENLK|KKLEENLK)|KQEKKELEENLK)|K(?:NYPDDGSGN(?:YYK|FYK)|K(?:YYND(?:G(?:SGNYYK|TGNYVK)|ETGNYYK)|KEKEKIYGNIE)|QYYNDENGNYYK)|QTYPDDGSGNYYK)|MESNANLKKHTLER|S(?:STNTQCRCATNDV|HY(?:TDTHGSIDYDK|ED(?:GDKSGNYYK|KDKSGNYIK)|ADHDKSGNY(?:YK|LK))|NKEKEKIENSLQN|DYKDDD(?:GSGNYYK|IDGNYY(?:K|Q))|E(?:GKCGHKETERDL|KVEYGLRKLFKK)|VQERYGNDPNFFQ|KI(?:NDYDGDPNYYK|TDYDNDPNYYK)|QGQCGRNENNGYP|F(?:S(?:SEYCGH(?:RQGS(?:V|A)|GDNEV|EQGNV)|N(?:GQCGHRDENV|SKCGHGEHEV|DYCGH(?:RQGSV|NENKV)|PKCGH(?:G(?:DNEV|EHEV)|NENKV|EQGNV)|EYCGHRQGSV)|D(?:RKCGHYEGAP|HKCGH(?:GDKDV|YEGAP|DENAP)))|TN(?:GQCGHNEENV|PKCG(?:RGDNEV|H(?:G(?:DNEV|EHEV)|DENKV)))|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YVYKDV|WN(?:Y(?:NCGHHVN(?:RDV|QDV)|KCGHHVNQDV)|DKCGHHVKQDV))|ARDHYNDTSGNYYQ)/
122
+ block_sharing = 2
96
123
  else
97
124
  block_sharing = 0
98
125
  end
99
126
  block_sharing
100
127
  end
101
-
128
+
102
129
  def is_var1_cp1?
103
130
  return true if cyspolv_group == 1 && self =~ /NVHDKVEKGLREVF|NVHDKVETGLREVF/i
104
131
  end
@@ -111,11 +138,30 @@ class Bio::Sequence::AA
111
138
  return true if is_var1_cp1? || is_var1_cp2?
112
139
  end
113
140
 
141
+ def var1_status
142
+ if is_var1?
143
+ status = 'var1'
144
+ else
145
+ status = 'other'
146
+ end
147
+ status
148
+ end
149
+
114
150
  # return var group A like tags. Group A like sequences are associated with disease severity.
115
151
  def is_groupA_like?
116
152
  return true if cys_count == 2 && bs_group == 1
117
153
  end
118
154
 
155
+ def groupA_status
156
+ if is_groupA_like?
157
+ status = 'groupA_like'
158
+ else
159
+ status = 'other'
160
+ end
161
+ status
162
+ end
163
+
164
+
119
165
  #distict sequence identifier(DSID)
120
166
  def dsid
121
167
  "#{polv1}-#{polv2}-#{polv3}-#{cys_count.to_s}-#{polv4}-#{self.length}"
@@ -153,7 +199,6 @@ class Bio::Sequence::AA
153
199
  self[self.length - 12 - win_len - anchor_pos, win_len]
154
200
  end
155
201
 
156
- private
157
202
  def accepted_length
158
203
  100..168
159
204
  end
@@ -169,4 +214,17 @@ class Bio::Sequence::AA
169
214
  def vw_ww_missing?
170
215
  true if ww_missing? && vw_missing?
171
216
  end
217
+
218
+ def sig2_like?
219
+ return true if self =~ /AKLSELSTAQ|CRAEEKDTYF|KCGHHVNQDV|HEPGKQHLEE|EPGKQHLEER|PGKQHLEERL|GKQHLEERLE|KQHLEERLEQ|QHLEERLEQM|HLEERLEQMF|LEERLEQMFE|EERLEQMFEN|ERLEQMFENI|RLEQMFENIK|LEQMFENIKN|EQMFENIKNN|QMFENIKNNN|MFENIKNNNA|FENIKNNNAA|ENIKNN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ENGDINT|QKENGDINTL|KENGDINTLK|ENGDINTLKP|NGDINTLKPE|RAEEKDIYSK|AEEKDIYSKT|EEKDIYSKTT|EKDIYSKTTD|KDIYSKTTDN|DIYSKTTDNG|IYSKTTDNGK|YSKTTDNGKL|SKTTDNGKLI|KTTDNGKLIL|TTDNGKLILW|TDNGKLILWN|DNGKLILWNY|NGKLILWNYN|GKLILWNYNC|KLILWNYNCG|LILWNYNCGH|ILWNYNCGHH|LWNYNCGHHV|WNYNCGHHVN|NYNCGHHVNQ|YNCGHHVNQD/
220
+ end
221
+
222
+ def sig2_status
223
+ if sig2_like?
224
+ sig2 = 'sig2_like'
225
+ else
226
+ sig2 = 'other'
227
+ end
228
+ sig2
229
+ end
172
230
  end
@@ -0,0 +1,85 @@
1
+ class Bio::Sequence::NA
2
+ attr_accessor :mut_pos
3
+
4
+ #position specific polymorphic block 1
5
+ def pspb1_dna(anchor_pos=0,win_len=42)
6
+ self[42 + anchor_pos,win_len]
7
+ end
8
+
9
+ #position specific polymorphic block 2
10
+ def pspb2_dna(anchor_pos=0,win_len=42)
11
+ if !ww_missing?
12
+ return self[(ww_pos * 3) - 12 - anchor_pos - win_len, win_len]
13
+ elsif !vw_missing?
14
+ return self[(vw_pos * 3) - 36 - win_len - anchor_pos, win_len]
15
+ else
16
+ return '....'
17
+ end
18
+ end
19
+
20
+ #position specific polymorphic block 3
21
+ def pspb3_dna(anchor_pos=0,win_len=42)
22
+ if !ww_missing?
23
+ return self[(ww_pos * 3) + 42 + anchor_pos, win_len]
24
+ elsif !vw_missing?
25
+ return self[(vw_pos * 3) + 8 + anchor_pos, win_len]
26
+ else
27
+ return '....'
28
+ end
29
+ end
30
+
31
+ #position specific polymorphic block 4
32
+ def pspb4_dna(anchor_pos=0,win_len=42)
33
+ self[self.length - 36 - win_len - anchor_pos, win_len]
34
+ end
35
+
36
+ def polv1_dna_pos
37
+ mut_pos.map{|mut| mut - (aa_seq.polv1_pos * 3)}
38
+ end
39
+
40
+ def polv2_dna_pos
41
+ mut_pos.map{|mut| mut - (aa_seq.polv2_pos * 3)}
42
+ end
43
+
44
+ def polv3_dna_pos
45
+ mut_pos.map{|mut| mut - (aa_seq.polv3_pos * 3)}
46
+ end
47
+
48
+ def polv4_dna_pos
49
+ mut_pos.map{|mut| mut - (aa_seq.polv4_pos * 3)}
50
+ end
51
+
52
+ #return an array of distances from each polv
53
+ def dist_from_polvs
54
+ [polv1_dna_pos, polv2_dna_pos, polv3_dna_pos, polv4_dna_pos]
55
+ end
56
+
57
+ private
58
+ def accepted_length
59
+ aa_seq.accepted_length #300..500
60
+ end
61
+
62
+ def aa_seq
63
+ self.translate
64
+ end
65
+
66
+ def ww_pos
67
+ aa_seq.ww_pos #rindex("WW")
68
+ end
69
+
70
+ def vw_pos
71
+ aa_seq.vw_pos #rindex("VW")
72
+ end
73
+
74
+ def ww_missing?
75
+ aa_seq.ww_missing? #true unless aa_seq =~ /WW/i
76
+ end
77
+
78
+ def vw_missing?
79
+ aa_seq.vw_missing? #true unless aa_seq =~ /VW/i
80
+ end
81
+
82
+ def vw_ww_missing?
83
+ aa_seq.vw_ww_missing? #true if ww_missing? && vw_missing?
84
+ end
85
+ end
@@ -3,8 +3,10 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
3
3
  describe "Dbla" do
4
4
  context 'Group4 Dbla tag' do
5
5
  before(:each) do
6
- seq = 'YIGDIIRGRDLYLVNPQEKEQRDKLEENLKKIFKKIHDDVMKTSGRTNGAKARYGGDENFFKLREDWWTANRSTVWKAITCGTHDGASYFRATCSDGQSGAQAKNKCTCNNGDVPTYFDYVPQFLR'
7
- @tag = Bio::Sequence::AA.new(seq)
6
+ seq1 = 'YIGDIIRGRDLYLVNPQEKEQRDKLEENLKKIFKKIHDDVMKTSGRTNGAKARYGGDENFFKLREDWWTANRSTVWKAITCGTHDGASYFRATCSDGQSGAQAKNKCTCNNGDVPTYFDYVPQFLR'
7
+ seq2 = 'DIGDIVRGRDLYLGYDQKEKEQREKLEKNLKDIFGDIYEELTKNGKTLQERHGSDTTNYYKLREDWRTANRHTVWEALTCEAPESAHYFKPSENNTQYFSNKYCGRDEKKVPTNLDYVPQFLR'
8
+ @tag = Bio::Sequence::AA.new(seq1)
9
+ @tag2 = Bio::Sequence::AA.new(seq2)
8
10
  end
9
11
 
10
12
  it "should return the number of cysteines" do
@@ -31,6 +33,13 @@ describe "Dbla" do
31
33
  @tag.is_var1?.should be_false
32
34
  end
33
35
 
36
+ it 'should return the polv1 to polv2 part of the sequence' do
37
+ @tag.polv1_to_polv2.should == 'LYLVNPQEKEQRDKLEENLKKIFKKIHDDVMKTSGRTNGAKARYGGDENFFKLRED'
38
+ end
39
+
40
+ it 'should return the polv3 to polv4 part of the sequence' do
41
+ @tag.polv3_to_polv4.should == 'KAITCGTHDGASYFRATCSDGQSGAQAKNKCTCNNGDVPTYF'
42
+ end
34
43
  end
35
44
 
36
45
  context 'Group2 Dbla tag' do
@@ -50,5 +59,19 @@ describe "Dbla" do
50
59
  it 'should return false for cp2 var1' do
51
60
  @tag2.is_var1_cp2?.should be_false
52
61
  end
62
+
63
+ it 'should return other unless var1' do
64
+ @tag2.var1_status.should == 'other'
65
+ end
66
+ end
67
+
68
+ context 'mutations in tag' do
69
+ before(:each) do
70
+ seq = 'DIGDIVRGTDLFLGGPSQEKKKLEENLKKILENIKNKNTKLSTLTLEKVREYWWALNRNDVWKALTCSAPYEAQYFIKSSDKEHSFSSEYCGHHNNDDPLTNLDYVPQFLR'
71
+ @tag3 = Bio::Sequence::AA.new(seq)
72
+ end
73
+ it 'should return the position of polv1' do
74
+ @tag3.polv1_pos.should == 10
75
+ end
53
76
  end
54
77
  end
@@ -0,0 +1,41 @@
1
+ require 'csv'
2
+
3
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
4
+
5
+ describe 'dbla' do
6
+ context 'nucleic' do
7
+ before(:each) do
8
+ dna = 'gatataggtgatattgtaagaggaagagatctatttcatggtaatccacaagaaaaagaaaaaagagaagacttagaaaagaaattgaaagaaattttccaacaaatacatagtggattgtcgaagaacggcgcacaaacttactacaatgataatgatactgacaaaaactattacaaattacgagaagattggtggacggcgaatcgcgccacaatctgggaagctatcacatgtgaagcaaaaactgatgataaatattttagaaatacatgtaatggaggaagtccaactaaaggtgactgccgatgtgctgccggagatgttcctacatattttgactacgttccgcagtatcttcgc'
9
+ aa = 'DIGDIVRGRDLFHGNPQEKEKREDLEKKLKEIFQQIHSGLSKNGAQTYYNDNDTDKNYYKLREDWWTANRATIWEAITCEAKTDDKYFRNTCNGGSPTKGDCRCAAGDVPTYFDYVPQYLR'
10
+ @tag_as_dna = Bio::Sequence::NA.new(dna)
11
+ @tag_as_aa = Bio::Sequence::AA.new(aa)
12
+ end
13
+
14
+ it 'should return the pspb1 in dna format' do
15
+ Bio::Sequence::NA.new(@tag_as_dna.pspb1_dna).translate.should == @tag_as_aa.pspb1
16
+ end
17
+
18
+ it 'should return the pspb2 in dna format' do
19
+ Bio::Sequence::NA.new(@tag_as_dna.pspb2_dna).translate.should == @tag_as_aa.pspb2
20
+ end
21
+
22
+ it 'should return the pspb3 in dna format' do
23
+ Bio::Sequence::NA.new(@tag_as_dna.pspb3_dna).translate.should == @tag_as_aa.pspb3
24
+ end
25
+
26
+ it 'should return the pspb4 in dna format' do
27
+ Bio::Sequence::NA.new(@tag_as_dna.pspb4_dna).translate.should == @tag_as_aa.pspb4
28
+ end
29
+
30
+ it 'should return distance from anchor point given a position' do
31
+ #@tag_as_dna.mut_pos = [380,369,67,62,56]
32
+ #@tag_as_dna.polv1_dna_pos.should == -27
33
+ #@tag_as_dna.coordinates.each do |row|
34
+ #puts row.to_csv
35
+ #end
36
+ end
37
+
38
+ it 'should return an array of coordinates ' do
39
+ end
40
+ end
41
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bio-dbla-classifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.7.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,74 +9,88 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-20 00:00:00.000000000 Z
12
+ date: 2013-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bio
16
- requirement: &2152826100 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.4.2
21
+ version: 1.4.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2152826100
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.4.3
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rspec
27
- requirement: &2152823580 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
- - - ~>
35
+ - - ! '>='
31
36
  - !ruby/object:Gem::Version
32
- version: 2.3.0
37
+ version: 2.8.0
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *2152823580
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 2.8.0
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: bundler
38
- requirement: &2152837840 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
- - - ~>
51
+ - - ! '>='
42
52
  - !ruby/object:Gem::Version
43
- version: 1.1.rc.7
53
+ version: 1.0.22
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *2152837840
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.0.22
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: jeweler
49
- requirement: &2152835560 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
- - - ~>
67
+ - - ! '>='
53
68
  - !ruby/object:Gem::Version
54
69
  version: 1.6.4
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *2152835560
58
- - !ruby/object:Gem::Dependency
59
- name: rcov
60
- requirement: &2152831480 !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
61
73
  none: false
62
74
  requirements:
63
75
  - - ! '>='
64
76
  - !ruby/object:Gem::Version
65
- version: '0'
66
- type: :development
67
- prerelease: false
68
- version_requirements: *2152831480
77
+ version: 1.6.4
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: rake
71
- requirement: &2153076260 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
72
81
  none: false
73
82
  requirements:
74
- - - ~>
83
+ - - ! '>='
75
84
  - !ruby/object:Gem::Version
76
85
  version: 0.9.2.2
77
86
  type: :development
78
87
  prerelease: false
79
- version_requirements: *2153076260
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: 0.9.2.2
80
94
  description: Methods to classify and manipulate PfEMP1 DBL-alpha sequence tags
81
95
  email: georgkam@gmail.com
82
96
  executables: []
@@ -87,6 +101,7 @@ extra_rdoc_files:
87
101
  files:
88
102
  - .document
89
103
  - .rspec
104
+ - .travis.yml
90
105
  - Gemfile
91
106
  - Gemfile.lock
92
107
  - LICENSE.txt
@@ -96,8 +111,10 @@ files:
96
111
  - bio-dbla-classifier.gemspec
97
112
  - lib/bio-dbla-classifier.rb
98
113
  - lib/bio/sequence/aa/aa.rb
114
+ - lib/bio/sequence/na/na.rb
99
115
  - spec/aa_spec.rb
100
116
  - spec/bio-dbla-classifier_spec.rb
117
+ - spec/na_spec.rb
101
118
  - spec/spec_helper.rb
102
119
  homepage: http://github.com/georgeG/bioruby-dbla-classifier
103
120
  licenses:
@@ -114,7 +131,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
114
131
  version: '0'
115
132
  segments:
116
133
  - 0
117
- hash: 762142858629813033
134
+ hash: 1678830180674382549
118
135
  required_rubygems_version: !ruby/object:Gem::Requirement
119
136
  none: false
120
137
  requirements:
@@ -123,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
140
  version: '0'
124
141
  requirements: []
125
142
  rubyforge_project:
126
- rubygems_version: 1.8.12
143
+ rubygems_version: 1.8.25
127
144
  signing_key:
128
145
  specification_version: 3
129
146
  summary: A tool to classify and manipulate PfEMP1 DBL-alpha sequence tags