Index: core/include/seqan/store/store_io_gff.h =================================================================== --- core/include/seqan/store/store_io_gff.h (revision 13099) +++ core/include/seqan/store/store_io_gff.h (working copy) @@ -223,11 +223,17 @@ // read fields of annotation line _parseSkipWhitespace(file, c); + // check if empty line + if (c == '\n') { + _parseSkipLine(file,c); + return false; + } + // read column 1: contig name // The letters until the first whitespace will be read. // Then, we skip until we hit the first tab character. _parseReadGffIdentifier(file, ctx.contigName, c); - if (!empty(ctx.contigName) && ctx.contigName[0] == '#') + if (!empty(ctx.contigName) && ctx.contigName[0] == '#') { _parseSkipLine(file, c); return false; @@ -255,7 +261,7 @@ // read column 5: end position if (_parseIsDigit(c)) - ctx.annotation.endPos = _parseReadNumber(file, c); + ctx.annotation.endPos = _parseReadNumber(file, c); else { ctx.annotation.endPos = TAnnotation::INVALID_POS; @@ -453,7 +459,7 @@ } template -inline void +inline bool read ( TFile & file, FragmentStore & fragStore, @@ -462,7 +468,7 @@ //IOREV _nodoc_ typedef FragmentStore TFragmentStore; - if (_streamEOF(file)) return; + if (_streamEOF(file)) return false; // get first character from the stream char c = _streamGet(file); @@ -480,17 +486,19 @@ _storeClearAnnoBackLinks(fragStore.annotationStore); _storeCreateAnnoBackLinks(fragStore.annotationStore); _storeRemoveTempAnnoNames(fragStore); + + return true; } template -inline void +inline bool read ( TFile & file, FragmentStore & fragStore, Gtf) { //IOREV _nodoc_ how do Gtf and Gff compare? nodoc for gtf - read (file, fragStore, Gff()); + return read (file, fragStore, Gff()); } //////////////////////////////////////////////////////////////////////////////