class Bio::Sequence::NA
Attributes
mut_pos[RW]
Public Instance Methods
dist_from_polvs()
click to toggle source
return an array of distances from each polv
# File lib/bio/sequence/na/na.rb, line 53 def dist_from_polvs [polv1_dna_pos, polv2_dna_pos, polv3_dna_pos, polv4_dna_pos] end
polv1_dna_pos()
click to toggle source
# File lib/bio/sequence/na/na.rb, line 36 def polv1_dna_pos mut_pos.map{|mut| mut - (aa_seq.polv1_pos * 3)} end
polv2_dna_pos()
click to toggle source
# File lib/bio/sequence/na/na.rb, line 40 def polv2_dna_pos mut_pos.map{|mut| mut - (aa_seq.polv2_pos * 3)} end
polv3_dna_pos()
click to toggle source
# File lib/bio/sequence/na/na.rb, line 44 def polv3_dna_pos mut_pos.map{|mut| mut - (aa_seq.polv3_pos * 3)} end
polv4_dna_pos()
click to toggle source
# File lib/bio/sequence/na/na.rb, line 48 def polv4_dna_pos mut_pos.map{|mut| mut - (aa_seq.polv4_pos * 3)} end
pspb1_dna(anchor_pos=0,win_len=42)
click to toggle source
position specific polymorphic block 1
# File lib/bio/sequence/na/na.rb, line 5 def pspb1_dna(anchor_pos=0,win_len=42) self[42 + anchor_pos,win_len] end
pspb2_dna(anchor_pos=0,win_len=42)
click to toggle source
position specific polymorphic block 2
# File lib/bio/sequence/na/na.rb, line 10 def pspb2_dna(anchor_pos=0,win_len=42) if !ww_missing? return self[(ww_pos * 3) - 12 - anchor_pos - win_len, win_len] elsif !vw_missing? return self[(vw_pos * 3) - 36 - win_len - anchor_pos, win_len] else return '....' end end
pspb3_dna(anchor_pos=0,win_len=42)
click to toggle source
position specific polymorphic block 3
# File lib/bio/sequence/na/na.rb, line 21 def pspb3_dna(anchor_pos=0,win_len=42) if !ww_missing? return self[(ww_pos * 3) + 42 + anchor_pos, win_len] elsif !vw_missing? return self[(vw_pos * 3) + 8 + anchor_pos, win_len] else return '....' end end
pspb4_dna(anchor_pos=0,win_len=42)
click to toggle source
position specific polymorphic block 4
# File lib/bio/sequence/na/na.rb, line 32 def pspb4_dna(anchor_pos=0,win_len=42) self[self.length - 36 - win_len - anchor_pos, win_len] end
Private Instance Methods
aa_seq()
click to toggle source
# File lib/bio/sequence/na/na.rb, line 62 def aa_seq self.translate end
accepted_length()
click to toggle source
# File lib/bio/sequence/na/na.rb, line 58 def accepted_length aa_seq.accepted_length #300..500 end
vw_missing?()
click to toggle source
# File lib/bio/sequence/na/na.rb, line 78 def vw_missing? aa_seq.vw_missing? #true unless aa_seq =~ /VW/i end
vw_pos()
click to toggle source
# File lib/bio/sequence/na/na.rb, line 70 def vw_pos aa_seq.vw_pos #rindex("VW") end
vw_ww_missing?()
click to toggle source
# File lib/bio/sequence/na/na.rb, line 82 def vw_ww_missing? aa_seq.vw_ww_missing? #true if ww_missing? && vw_missing? end
ww_missing?()
click to toggle source
# File lib/bio/sequence/na/na.rb, line 74 def ww_missing? aa_seq.ww_missing? #true unless aa_seq =~ /WW/i end
ww_pos()
click to toggle source
# File lib/bio/sequence/na/na.rb, line 66 def ww_pos aa_seq.ww_pos #rindex("WW") end