EBIvariation / vcf-validator

Validation suite for Variant Call Format (VCF) files, implemented using C++11
Apache License 2.0
129 stars 39 forks source link

Adding tool version number to the validator report #134

Closed cyenyxe closed 4 years ago

cyenyxe commented 6 years ago

Currently there is no way to to ensure compatibility between the report generated by the validator and that consumed by the debugulator. Adding the tool version number to the validator report would allow the debugulator to check that it is compatible.

jmmut commented 6 years ago

@srbcheema1, you are more familiar with the validator than other students, so it would be better if @ManeshNarayan finished this PR, also because his proposal is about performance benchmarking and it will be helpful learning about how we use ODB (writing to a DB is potentially a bottleneck).

The PR is not complete, because if the debugulator is going to perform a compatibility check, the version information needs to be present in the DB report.

To add information to the DB report we need to create a small struct in inc/vcf/error.hpp, as ODB is an object-to-DB mapping library. I guess something as simple as

#pragma db object
struct ReportVersion
{
    std::string version;
};

can do the job. Look at src/vcf/odb_report.cpp to understand how an object in memory is written to the DB file (we are using sqlite, which is a DB that is backed by a local file).

jmmut commented 6 years ago

I hope this is not needed, and it will be faster if you ask here for questions about api or design, but in case you want to look at the full ODB manual, here https://www.codesynthesis.com/products/odb/doc/manual.xhtml.

I expect we can solve this with just an extra parameter to OdbReportRW constructor and a line in the same constructor to write the version in the report

srbcheema1 commented 6 years ago

Ok sure, @ManeshNarayan can continue working on this PR :D

tcezard commented 4 years ago

This will be tracked in EVA-2048: closing