Class: Bio::MAF::EmptySequence

Inherits:
Sequence
  • Object
show all
Defined in:
lib/bio/maf/maf.rb

Overview

An empty sequence record from an 'e' line.

This indicates that "there isn't aligning DNA for a species but that the current block is bridged by a chain that connects blocks before and after this block" (MAF spec).

Constant Summary

Constants inherited from Sequence

Sequence::I_STATUS

Instance Attribute Summary collapse

Attributes inherited from Sequence

#i_data, #quality, #size, #source, #src_size, #start, #strand

Instance Method Summary collapse

Methods inherited from Sequence

#decode_status_char, #delete_text, #end, #gapped?, #interval, #joinable_with?, #left_count, #left_status, #left_status_char, #right_count, #right_status, #right_status_char, #species, #text_range, #to_bio_alignment

Constructor Details

#initialize(*args) ⇒ EmptySequence

Returns a new instance of EmptySequence.



443
444
445
446
# File 'lib/bio/maf/maf.rb', line 443

def initialize(*args)
  super(*args[0..4])
  @status = args[5]
end

Instance Attribute Details

#statusObject (readonly)



441
442
443
# File 'lib/bio/maf/maf.rb', line 441

def status
  @status
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


465
466
467
# File 'lib/bio/maf/maf.rb', line 465

def empty?
  true
end

#join(o) ⇒ Object



456
457
458
459
460
461
462
463
# File 'lib/bio/maf/maf.rb', line 456

def join(o)
  EmptySequence.new(source,
                    start,
                    size + o.size,
                    strand,
                    src_size,
                    @status)
end

#slice(offset, len) ⇒ Object



452
453
454
# File 'lib/bio/maf/maf.rb', line 452

def slice(offset, len)
  self
end

#textObject



448
449
450
# File 'lib/bio/maf/maf.rb', line 448

def text
  ''
end

#write_fasta(writer) ⇒ Object



469
470
471
# File 'lib/bio/maf/maf.rb', line 469

def write_fasta(writer)
  raise "empty sequence output not implemented!"
end