X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=code_ruby%2Flib%2Fmaasha%2Ffasta.rb;h=971ad545582c8e82d63b3e2c3846069c87acd3b5;hb=164c771704dbc986614e93aed25a6d1fc0e200c7;hp=c9ce43d6d0610d1e7e69603471eaa720849d4650;hpb=354e8c6706ede00940b714bd8f6878b1376dedba;p=biopieces.git diff --git a/code_ruby/lib/maasha/fasta.rb b/code_ruby/lib/maasha/fasta.rb index c9ce43d..971ad54 100644 --- a/code_ruby/lib/maasha/fasta.rb +++ b/code_ruby/lib/maasha/fasta.rb @@ -32,7 +32,11 @@ class Fasta < Filesys # Method to get the next FASTA entry form an ios and return this # as a Seq object. If no entry is found or eof then nil is returned. def get_entry - block = @io.gets($/ + '>') + block = nil + + while block = @io.gets($/ + '>') and block.chomp($/ + '>').empty? + end + return nil if block.nil? block.chomp!($/ + '>')