csw / bioruby-maf

MAF parser for BioRuby
MIT License
11 stars 6 forks source link

Handle empty MAF files #112

Closed csw closed 12 years ago

csw commented 12 years ago

chrUn_gl000226.maf.gz is as follows:

##maf version=1 scoring=autoMZ.v1
##eof maf

And this results in:

ERROR bio-maf: Caught Bio::MAF::ParseError: bad a line at: '##eof maf
>><<' (pos 44 [44], last )
    /Users/csw/src/bioruby-maf/lib/bio/maf/parser.rb:285:in `parse_error'
    /Users/csw/src/bioruby-maf/lib/bio/maf/parser.rb:301:in `parse_block_data'
    /Users/csw/src/bioruby-maf/lib/bio/maf/parser.rb:200:in `_parse_block'
    /Users/csw/src/bioruby-maf/lib/bio/maf/parser.rb:962:in `parse_blocks_parallel'