Class: Scaffolder::Test::Annotation

Inherits:
Object
  • Object
show all
Defined in:
lib/scaffolder/test/annotation.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = Hash.new) ⇒ Annotation

Returns a new instance of Annotation.



16
17
18
19
20
# File 'lib/scaffolder/test/annotation.rb', line 16

def initialize(options = Hash.new)
  defaults = {:seqname => 'record', :start => 1, :end     => 10,
              :strand  => '+',      :phase => 1, :feature => 'CDS'}
  @options = defaults.merge(options)
end

Instance Method Details

#initialize_copy(source) ⇒ Object



22
23
24
25
# File 'lib/scaffolder/test/annotation.rb', line 22

def initialize_copy(source)
  super
  @options = @options.dup
end

#to_gff3_recordObject



27
28
29
30
31
32
# File 'lib/scaffolder/test/annotation.rb', line 27

def to_gff3_record
  Bio::GFF::GFF3::Record.new(
    self.seqname, nil, self.feature, self.start,
    self.end,     nil, self.strand,  self.phase,
    self.attributes.to_a)
end