Method: Bio::Locations#length

Defined in:
lib/bio/location.rb

#lengthObject Also known as: size

Returns a length of the spliced RNA.



356
357
358
359
360
361
362
363
364
365
366
# File 'lib/bio/location.rb', line 356

def length
  len = 0
  @locations.each do |x|
    if x.sequence
      len += x.sequence.size
    else
      len += (x.to - x.from + 1)
    end
  end
  len
end