You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I open a VCF file and I immediately write it back to a different file with code like this:
vcf_reader = vcf.Reader(infile)
vcf_writer = vcf.Writer(outfile,vcf_reader)
I get that the order of things in the headers is now messed up. If at first I am more like:
fileformat=VCFv4.1
FORMAT=...
INFO=...
contig=...
reference=...
In the output file things are more like:
contig=...
reference=...
contig=...
fileformat=VCFv4.1
contig=...
INFO=...
FORMAT=...
Is this even allowed by the VCF format? Is there a way to control this behavior?
The text was updated successfully, but these errors were encountered:
This is not allowed by the VCF format (the fileformat header line must be first). Looking at the code, the lines are stored as key/value pairs in a dictionary and retrieved from it in no particular order.
If I open a VCF file and I immediately write it back to a different file with code like this:
vcf_reader = vcf.Reader(infile)
vcf_writer = vcf.Writer(outfile,vcf_reader)
I get that the order of things in the headers is now messed up. If at first I am more like:
fileformat=VCFv4.1
FORMAT=...
INFO=...
contig=...
reference=...
In the output file things are more like:
contig=...
reference=...
contig=...
fileformat=VCFv4.1
contig=...
INFO=...
FORMAT=...
Is this even allowed by the VCF format? Is there a way to control this behavior?
The text was updated successfully, but these errors were encountered: