class Bio::Blast::Report::FLATFILE_SPLITTER
Flatfile splitter for NCBI
BLAST XML format. It is internally used when reading BLAST XML. Normally, users do not need to use it directly.
Public Class Methods
new(klass, bstream)
click to toggle source
creates a new splitter object
Calls superclass method
Bio::FlatFile::Splitter::Default::new
# File lib/bio/appl/blast/report.rb 518 def initialize(klass, bstream) 519 super(klass, bstream) 520 @parsed_entries = [] 521 @raw_unsupported = false 522 end
Public Instance Methods
entry()
click to toggle source
current raw entry as a String
Calls superclass method
# File lib/bio/appl/blast/report.rb 563 def entry 564 raise 'not supported for new BLAST XML format' if @raw_unsupported 565 super 566 end
entry_ended_pos()
click to toggle source
(end position of the entry) + 1
Calls superclass method
# File lib/bio/appl/blast/report.rb 577 def entry_ended_pos 578 if entry_pos_flag then 579 raise 'not supported for new BLAST XML format' if @raw_unsupported 580 end 581 super 582 end
entry_start_pos()
click to toggle source
start position of the entry
Calls superclass method
# File lib/bio/appl/blast/report.rb 569 def entry_start_pos 570 if entry_pos_flag then 571 raise 'not supported for new BLAST XML format' if @raw_unsupported 572 end 573 super 574 end
get_entry()
click to toggle source
get an entry and return the entry as a string
Calls superclass method
Bio::FlatFile::Splitter::Default#get_entry
# File lib/bio/appl/blast/report.rb 538 def get_entry 539 if @parsed_entries.empty? then 540 @raw_unsupported = false 541 ent = super 542 prepare_parsed_entries(ent) 543 self.parsed_entry = @parsed_entries.shift 544 else 545 raise 'not supported for new BLAST XML format' 546 end 547 ent 548 end
get_parsed_entry()
click to toggle source
get an entry as a Bio::Blast::Report
object
# File lib/bio/appl/blast/report.rb 551 def get_parsed_entry 552 if @parsed_entries.empty? then 553 get_entry 554 else 555 self.parsed_entry = @parsed_entries.shift 556 self.entry = nil 557 @raw_unsupported = true 558 end 559 self.parsed_entry 560 end
rewind()
click to toggle source
rewinds
Calls superclass method
Bio::FlatFile::Splitter::Template#rewind
# File lib/bio/appl/blast/report.rb 525 def rewind 526 ret = super 527 @parsed_entries.clear 528 @raw_unsupported = false 529 ret 530 end
skip_leader()
click to toggle source
do nothing
# File lib/bio/appl/blast/report.rb 533 def skip_leader 534 nil 535 end