Class Bio::Blast::Report::BlastXmlSplitter
In: lib/bio/appl/blast/report.rb
Parent: Bio::FlatFile::Splitter::Default

Flatfile splitter for NCBI BLAST XML format. It is internally used when reading BLAST XML. Normally, users do not need to use it directly.

Methods

Public Class methods

creates a new splitter object

[Source]

     # File lib/bio/appl/blast/report.rb, line 482
482:     def initialize(klass, bstream)
483:       super(klass, bstream)
484:       @parsed_entries = []
485:       @raw_unsupported = false
486:     end

Public Instance methods

current raw entry as a String

[Source]

     # File lib/bio/appl/blast/report.rb, line 527
527:     def entry
528:       raise 'not supported for new BLAST XML format' if @raw_unsupported
529:       super
530:     end

(end position of the entry) + 1

[Source]

     # File lib/bio/appl/blast/report.rb, line 541
541:     def entry_ended_pos
542:       if entry_pos_flag then
543:         raise 'not supported for new BLAST XML format' if @raw_unsupported
544:       end
545:       super
546:     end

start position of the entry

[Source]

     # File lib/bio/appl/blast/report.rb, line 533
533:     def entry_start_pos
534:       if entry_pos_flag then
535:         raise 'not supported for new BLAST XML format' if @raw_unsupported
536:       end
537:       super
538:     end

get an entry and return the entry as a string

[Source]

     # File lib/bio/appl/blast/report.rb, line 502
502:     def get_entry
503:       if @parsed_entries.empty? then
504:         @raw_unsupported = false
505:         ent = super
506:         prepare_parsed_entries(ent)
507:         self.parsed_entry = @parsed_entries.shift
508:       else
509:         raise 'not supported for new BLAST XML format'
510:       end
511:       ent
512:     end

get an entry as a Bio::Blast::Report object

[Source]

     # File lib/bio/appl/blast/report.rb, line 515
515:     def get_parsed_entry
516:       if @parsed_entries.empty? then
517:         ent = get_entry
518:       else
519:         self.parsed_entry = @parsed_entries.shift
520:         self.entry = nil
521:         @raw_unsupported = true
522:       end
523:       self.parsed_entry
524:     end

rewinds

[Source]

     # File lib/bio/appl/blast/report.rb, line 489
489:     def rewind
490:       ret = super
491:       @parsed_entries.clear
492:       @raw_unsupported = false
493:       ret
494:     end

do nothing

[Source]

     # File lib/bio/appl/blast/report.rb, line 497
497:     def skip_leader
498:       nil
499:     end

[Validate]