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, #fasta_desc, #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.



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

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

Instance Attribute Details

#statusObject (readonly)



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

def status
  @status
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


489
490
491
# File 'lib/bio/maf/maf.rb', line 489

def empty?
  true
end

#join(o) ⇒ Object



480
481
482
483
484
485
486
487
# File 'lib/bio/maf/maf.rb', line 480

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

#slice(offset, len) ⇒ Object



476
477
478
# File 'lib/bio/maf/maf.rb', line 476

def slice(offset, len)
  self
end

#textObject



472
473
474
# File 'lib/bio/maf/maf.rb', line 472

def text
  ''
end

#upcase!Object



493
494
495
# File 'lib/bio/maf/maf.rb', line 493

def upcase!
  # no-op
end

#write_fasta(writer) ⇒ Object



497
498
499
# File 'lib/bio/maf/maf.rb', line 497

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