-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a skeleton VCF parser which can print variants in VCF output. #46
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nive work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just have two questions
@@ -0,0 +1,193 @@ | |||
#include <seqan3/io/stream/concept.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the connection to the seqan3 VCF parser? Will you also be using it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! So at the moment, seqan3 doesn't have a VCF parser implemented. So the one I'm implementing here will be used as a sort of framework for the future seqan3 implementation!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thanks for the explanation!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work!
Could you maybe add some Information to the classes and the head of the file, as I mentioned?
And if you don't have a strong opinion, I would replace that i
with an _i
. 💅
Thanks again!
/*! \brief Set the file format for this VCF file header. | ||
* | ||
* \param fileformati The input fileformat. | ||
*/ | ||
void set_fileformat(std::string fileformati) | ||
{ | ||
fileformat = fileformati; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an idea, so it doesn't look like a typo:
/*! \brief Set the file format for this VCF file header. | |
* | |
* \param fileformati The input fileformat. | |
*/ | |
void set_fileformat(std::string fileformati) | |
{ | |
fileformat = fileformati; | |
} | |
/*! \brief Set the file format for this VCF file header. | |
* | |
* \param fileformat_i The input fileformat. | |
*/ | |
void set_fileformat(std::string fileformat_i) | |
{ | |
fileformat = fileformat_i; | |
} |
#include <seqan3/io/stream/concept.hpp> | ||
#include <fstream> | ||
#include <map> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a short description like
/*
* We're using the The Variant Call Format (VCF) Specification: VCFv4.3 and BCFv2.2
* https://samtools.github.io/hts-specs/VCFv4.3.pdf
*/
#include <fstream> | ||
#include <map> | ||
|
||
class info_entry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe something like this for the info_enty class:
/*
* An Info field looks like:
* ##INFO=<ID=ID,Number=number,Type=type,Description="description",Source="source",Version="version">
* https://samtools.github.io/hts-specs/VCFv4.3.pdf (1.4.2 Information field format)
*/
bf36365
to
2d48cbc
Compare
0d5fe3f
to
bafad3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGFM, thank you!
[INFRA] Update CI
Resolves #9 and resolves #10.
Here I introduce a skeleton VCF parser to address issue #29. It doesn't really do any checking to make sure values are valid, but it does provide a template for information regarding variants to be stored in a VCF format-friendly way.
Some things up for discussion:
variant_header
andvariant_record
are currently empty, because I figured all of the information is not always known on construction. But maybe it makes sense to change this?