File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -327,6 +327,11 @@ def test_write_vcf__generate_header():
327
327
##contig=<ID=19>
328
328
##contig=<ID=20>
329
329
##contig=<ID=X>
330
+ ##fileDate=20090805
331
+ ##reference=1000GenomesPilot-NCBI36
332
+ ##phasing=partial
333
+ ##ALT=<ID=DEL:ME:ALU,Description="Deletion of ALU element">
334
+ ##ALT=<ID=CNV,Description="Copy number variable region">
330
335
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NA00001 NA00002 NA00003
331
336
""" # noqa: E501
332
337
Original file line number Diff line number Diff line change @@ -414,6 +414,12 @@ def _generate_header(
414
414
file = output ,
415
415
)
416
416
417
+ # Other meta information lines not covered above
418
+ if "vcf_meta_information" in ds .attrs :
419
+ for key , value in ds .attrs ["vcf_meta_information" ]:
420
+ if key not in ("fileformat" , "source" ):
421
+ print (f"##{ key } ={ value } " , file = output )
422
+
417
423
# [1.5 Header line syntax]
418
424
print (
419
425
"#CHROM" ,
You can’t perform that action at this time.
0 commit comments