Method: Ensembl::Core::Slice#initialize
- Defined in:
- lib/bio-ensembl/core/slice.rb
#initialize(seq_region, start = 1, stop = seq_region.length, strand = 1) ⇒ Slice
Create a new Slice object from scratch.
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/bio-ensembl/core/slice.rb', line 47 def initialize(seq_region, start = 1, stop = seq_region.length, strand = 1) if start.nil? start = 1 end if stop.nil? stop = seq_region.length end unless seq_region.class == Ensembl::Core::SeqRegion raise 'First argument has to be a Ensembl::Core::SeqRegion object' end @seq_region, @start, @stop, @strand = seq_region, start, stop, strand @seq = nil end |