Skip to content
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

Variant.originalLine is never set #7

Closed
arrogantrobot opened this issue Nov 1, 2012 · 1 comment
Closed

Variant.originalLine is never set #7

arrogantrobot opened this issue Nov 1, 2012 · 1 comment

Comments

@arrogantrobot
Copy link

The string member of Variant, originalLine, should be set in Variant::parse(string& line, bool parseSamples) of Variant.cpp:

originalLine = line;

Inserted at line 13 or there-abouts should do the trick.

@zeeev
Copy link
Collaborator

zeeev commented Mar 30, 2016

@arrogantrobot Very late, but ...

The parser deletes the original VCF line to save space. If you want the original line you have two options.

  1. Don't parse samples via: variantFile.parseSamples = false;
  2. write the var object to a string stream:

stringstream ss;
var << ss;
string ogLine = ss.str();

@zeeev zeeev closed this as completed Mar 30, 2016
adamnovak added a commit to adamnovak/vcflib that referenced this issue Jun 14, 2018
Don't assume we have multiple SVTYPE entries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants