Re: [Seqan-dev] check for errors when reading GTF annotations


Hi all,

Plz find a patch attached.

It provides 2 minor improvements for store_io_gff.h:
- made checking for simple open file error when loading a GTF file available from read(...) interface
- empty strings  are now skipped (instead of creating an empty annotation)

--
 Konstantin

On Thu, Oct 18, 2012 at 11:36 AM, Konstantin Okonechnikov <k.okonechnikov@gmail.com> wrote:
Hi all,
it's me again.

Well, according to function signature to read annotations

template<typename TFile, typename TSpec, typename TConfig>
inline void
read (
    TFile & file,
    FragmentStore<TSpec, TConfig> & fragStore,
    Gtf)

the return type is void, which I also could've guessed from the compilation output.

However, I was misleaded by the following documentation page which indicates that return value should be bool:
http://docs.seqan.de/seqan/dev/FUNCTION.read.html

So, the question remains: how can I check for errors when reading a GTF file?

Thanks in advance,
 Konstantin


On Tue, Oct 16, 2012 at 6:52 PM, Konstantin Okonechnikov <k.okonechnikov@gmail.com> wrote:
Hi all,

How can I check for errors when reading a GTF file?

I tried checking return value of read() function, but it doesn't compile (see example attached)

Env: Ubuntu Linux 12.04 64bit, GCC 4.6.3
Seqan SVN revision: 13076

Tnx in advance,
   Konstantin


Attachment: patch_reading_gtf.diff
Description: Binary data