| Class | Bio::FANTOM::MaXML::Sequences |
| In: |
lib/bio/db/fantom.rb
|
| Parent: | MaXML |
| Data_XPath | = | 'maxml-sequences' |
# File lib/bio/db/fantom.rb, line 186
186: def [](*arg)
187: if arg[0].is_a?(String) and arg.size == 1 then
188: get(arg[0])
189: else
190: to_a[*arg]
191: end
192: end
# File lib/bio/db/fantom.rb, line 194
194: def cloneids
195: unless defined?(@cloneids)
196: @cloneids = to_a.collect { |x| x.cloneid }
197: end
198: @cloneids
199: end
# File lib/bio/db/fantom.rb, line 174
174: def get(idstr)
175: unless defined?(@hash)
176: @hash = {}
177: end
178: unless @hash.member?(idstr) then
179: @hash[idstr] = self.find do |x|
180: x.altid.values.index(idstr)
181: end
182: end
183: @hash[idstr]
184: end