Class: Bio::Sequence::AA

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/sequence/aa/aa.rb

Instance Method Summary collapse

Instance Method Details

#accepted_lengthObject



202
203
204
# File 'lib/bio/sequence/aa/aa.rb', line 202

def accepted_length
  100..168
end

#bs_groupObject

return the block sharing group



117
118
119
120
121
122
123
124
125
126
127
# File 'lib/bio/sequence/aa/aa.rb', line 117

def bs_group
  case
  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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KKLEENLKN|Q(?:ERK(?:HLLEKRLET|QHLEKRLET)|QEK(?:LYLENNLKK|AKLENNLKR))|AKKHYGDDENYYK)|P(?:NKCRCEDANADQV|CSVQKCTCINGDP)|E(?:SN(?:M(?:GQCRCFSGDP|VQCRCFSGDP)|KGQCRCFSGDP)|THGYCRCVNRVDV|F(?:SGGKCGHKDNNV|T(?:GGQCGRDGENV|DGHCGH(?:RQGNV|NEENV))))|VKDRYQNDGPDFFK|K(?:S(?:SYNDDGTGNYFK|YYKNDNDRNYFK)|N(?:HYNDTSKNYYK|NNN(?:ELNNLSLDK|KLSNLSTKE))|D(?:HYKGDEANNYFQ|NNTKLNDLSIQE)|K(?:TNPALKSFTNEE|KLEENLRNIFKN)|FSNPKCGHNEGSP)|F(?:SNDQCGHNN(?:RGDP|GGAP)|WYPKC(?:GHHV(?:RQDV|KQ(?:DV|EV))|SHHVKQDV))|Q(?:RNNIKLQ(?:NIPLHE|TLTLHQ)|N(?:NNTKLQNIPLHE|KNENLKSLSLDK)|KENGDINTLKPEE)|L(?:FYYKCGHYVYKDV|WN(?:Y(?:NCGHHVN(?:RDV|QDV)|KCGHHVNQDV)|DKCGHHVKQDV))|ARDHYNDTSGNYYQ)/
    block_sharing = 2 
  else
    block_sharing = 0
  end
  block_sharing
end

#c_terminal_motifObject



21
22
23
# File 'lib/bio/sequence/aa/aa.rb', line 21

def c_terminal_motif
  self[-5,self.length]
end

#cys_countObject

number of cysteines



34
35
36
# File 'lib/bio/sequence/aa/aa.rb', line 34

def cys_count
  scan(/C/).size
end

#cyspolv_groupObject

Assigning dsid group based on number of cysteines, presence of REY motif in polv2 and MFK in polv1,



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/bio/sequence/aa/aa.rb', line 81

def cyspolv_group
  case
  when cys_count > 4 || cys_count == 3 || cys_count < 2
    group = 6
  when cys_count == 4 && polv2 =~ /REY/i
    group = 5
  when cys_count == 4
    group = 4
  when cys_count == 2 && polv1 =~ /MFK/i
    group = 1
  when cys_count == 2 && polv2 =~ /REY/i
    group =2
  else
    group = 3
  end
  group
end

#dsidObject

distict sequence identifier(DSID)



166
167
168
# File 'lib/bio/sequence/aa/aa.rb', line 166

def dsid
  "#{polv1}-#{polv2}-#{polv3}-#{cys_count.to_s}-#{polv4}-#{self.length}"
end

#end_motifObject



12
13
14
15
# File 'lib/bio/sequence/aa/aa.rb', line 12

def end_motif
  #warn "[DEPRECATION] 'end_motif' is deprecated.  Please use `c_terminal_motif` instead."    
  c_terminal_motif
end

#groupA_statusObject



155
156
157
158
159
160
161
162
# File 'lib/bio/sequence/aa/aa.rb', line 155

def groupA_status
  if is_groupA_like?
    status = 'groupA_like'
  else
    status = 'other'
  end
  status
end

#has_accepted_length?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/bio/sequence/aa/aa.rb', line 3

def has_accepted_length?
  true if accepted_length.include? self.length
end

#is_groupA_like?Boolean

return var group A like tags. Group A like sequences are associated with disease severity.

Returns:

  • (Boolean)


151
152
153
# File 'lib/bio/sequence/aa/aa.rb', line 151

def is_groupA_like?
  return true if cys_count == 2 && bs_group == 1
end

#is_var1?Boolean

Returns:

  • (Boolean)


137
138
139
# File 'lib/bio/sequence/aa/aa.rb', line 137

def is_var1?
  return true if is_var1_cp1? || is_var1_cp2? 
end

#is_var1_cp1?Boolean

Returns:

  • (Boolean)


129
130
131
# File 'lib/bio/sequence/aa/aa.rb', line 129

def is_var1_cp1?
  return true if cyspolv_group == 1 && self =~ /NVHDKVEKGLREVF|NVHDKVETGLREVF/i
end

#is_var1_cp2?Boolean

Returns:

  • (Boolean)


133
134
135
# File 'lib/bio/sequence/aa/aa.rb', line 133

def is_var1_cp2?
  return true if cyspolv_group == 2 && self =~ /APNKEKIKLEENLKK/i
end

#n_terminal_motifObject



17
18
19
# File 'lib/bio/sequence/aa/aa.rb', line 17

def n_terminal_motif
  self[0,5]
end

#polv1Object

The first position of limited variability(polv1)



49
50
51
# File 'lib/bio/sequence/aa/aa.rb', line 49

def polv1
  self[10,4]
end

#polv1_posObject



99
100
101
# File 'lib/bio/sequence/aa/aa.rb', line 99

def polv1_pos
  index(polv1)
end

#polv1_to_polv2Object

get the 5’ end of the sequence from the ‘middle’



39
40
41
# File 'lib/bio/sequence/aa/aa.rb', line 39

def polv1_to_polv2
  slice(rindex(polv1),rindex(polv2) - 6)
end

#polv2Object

The second position of limited variability(polv2)



54
55
56
57
58
59
60
61
62
# File 'lib/bio/sequence/aa/aa.rb', line 54

def polv2
  if !ww_missing?
    return self[ww_pos - 4,4]
  elsif !vw_missing?
    return self[vw_pos - 12,4]
  else
    return '....'
  end
end

#polv2_posObject



103
104
105
# File 'lib/bio/sequence/aa/aa.rb', line 103

def polv2_pos
  index(polv2)
end

#polv3Object

The third position of limited variability(polv3)



65
66
67
68
69
70
71
72
73
# File 'lib/bio/sequence/aa/aa.rb', line 65

def polv3
  if !ww_missing?
    return self[ww_pos + 10,4]
  elsif !vw_missing?
    return self[vw_pos + 2,4]
  else
    return '....'
  end
end

#polv3_posObject



107
108
109
# File 'lib/bio/sequence/aa/aa.rb', line 107

def polv3_pos
  index(polv3)
end

#polv3_to_polv4Object

get the 3’end of the sequence from the “middle”



44
45
46
# File 'lib/bio/sequence/aa/aa.rb', line 44

def polv3_to_polv4
  slice(rindex(polv3),(rindex(polv4) - rindex(polv3) + 4))
end

#polv4Object

The fourth position of limited variability(polv4)



76
77
78
# File 'lib/bio/sequence/aa/aa.rb', line 76

def polv4
  self[self.length - 12,4]
end

#polv4_posObject



111
112
113
# File 'lib/bio/sequence/aa/aa.rb', line 111

def polv4_pos
  index(polv4)
end

#pspb1(anchor_pos = 0, win_len = 14) ⇒ Object

position specific polymorphic block 1



171
172
173
# File 'lib/bio/sequence/aa/aa.rb', line 171

def pspb1(anchor_pos=0,win_len=14)
  self[14 + anchor_pos,win_len]
end

#pspb2(anchor_pos = 0, win_len = 14) ⇒ Object

position specific polymorphic block 2



176
177
178
179
180
181
182
183
184
# File 'lib/bio/sequence/aa/aa.rb', line 176

def pspb2(anchor_pos=0,win_len=14)
  if !ww_missing?
    return self[ww_pos - 4 - anchor_pos - win_len, win_len]
  elsif !vw_missing?
    return self[vw_pos - 12 - win_len - anchor_pos, win_len]
  else
    return '....'
  end
end

#pspb3(anchor_pos = 0, win_len = 14) ⇒ Object

position specific polymorphic block 3



187
188
189
190
191
192
193
194
195
# File 'lib/bio/sequence/aa/aa.rb', line 187

def pspb3(anchor_pos=0,win_len=14)
  if !ww_missing?
    return self[ww_pos + 14 + anchor_pos, win_len]
  elsif !vw_missing?
    return self[vw_pos + 6 + anchor_pos, win_len]
  else
    return '....'
  end
end

#pspb4(anchor_pos = 0, win_len = 14) ⇒ Object

position specific polymorphic block 4



198
199
200
# File 'lib/bio/sequence/aa/aa.rb', line 198

def pspb4(anchor_pos=0,win_len=14)
  self[self.length - 12 - win_len - anchor_pos, win_len]
end

#sig2_like?Boolean

Returns:

  • (Boolean)


218
219
220
# File 'lib/bio/sequence/aa/aa.rb', line 218

def sig2_like?
  return true if self =~ /AKLSELSTAQ|CRAEEKDTYF|KCGHHVNQDV|HEPGKQHLEE|EPGKQHLEER|PGKQHLEERL|GKQHLEERLE|KQHLEERLEQ|QHLEERLEQM|HLEERLEQMF|LEERLEQMFE|EERLEQMFEN|ERLEQMFENI|RLEQMFENIK|LEQMFENIKN|EQMFENIKNN|QMFENIKNNN|MFENIKNNNA|FENIKNNNAA|ENIKNNNAAK|NIKNNNAAKL|IKNNNAAKLS|KNNNAAKLSE|NNNAAKLSEL|NNAAKLSELS|NAAKLSELST|AAKLSELSTA|RAEEKDTYFK|AEEKDTYFKN|EEKDTYFKNR|EKDTYFKNRE|KDTYFKNREN|DTYFKNRENG|TYFKNRENGK|YFKNRENGKL|FKNRENGKLL|KNRENGKLLL|NRENGKLLLW|RENGKLLLWN|ENGKLLLWNY|NGKLLLWNYK|GKLLLWNYKC|KLLLWNYKCG|LLLWNYKCGH|LLWNYKCGHH|LWNYKCGHHV|WNYKCGHHVN|N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ject



222
223
224
225
226
227
228
229
# File 'lib/bio/sequence/aa/aa.rb', line 222

def sig2_status
  if sig2_like? 
    sig2 = 'sig2_like'
  else
    sig2 = 'other'
  end
  sig2
end

#start_motifObject



7
8
9
10
# File 'lib/bio/sequence/aa/aa.rb', line 7

def start_motif
  #warn "[DEPRECATION] 'start_motif' is deprecated.  Please use `n_terminal_motif` instead."
  n_terminal_motif
end

#var1_statusObject



141
142
143
144
145
146
147
148
# File 'lib/bio/sequence/aa/aa.rb', line 141

def var1_status
  if is_var1?
    status = 'var1'
  else
    status = 'other'
  end
  status
end

#vw_missing?Boolean

Returns:

  • (Boolean)


210
211
212
# File 'lib/bio/sequence/aa/aa.rb', line 210

def vw_missing?
  true unless self =~ /VW/i
end

#vw_posObject



29
30
31
# File 'lib/bio/sequence/aa/aa.rb', line 29

def vw_pos
  rindex("VW")
end

#vw_ww_missing?Boolean

Returns:

  • (Boolean)


214
215
216
# File 'lib/bio/sequence/aa/aa.rb', line 214

def vw_ww_missing?
  true if ww_missing? && vw_missing?
end

#ww_missing?Boolean

Returns:

  • (Boolean)


206
207
208
# File 'lib/bio/sequence/aa/aa.rb', line 206

def ww_missing?
  true unless self =~ /WW/i
end

#ww_posObject



25
26
27
# File 'lib/bio/sequence/aa/aa.rb', line 25

def ww_pos
  rindex("WW")
end