pyrad
pyrad copied to clipboard
Fixing newline formatting in VCF
Currently, if the first locus in .loci does not contain a polymorphic site then the first line after the header is a blank line. Changed loci2vcf.py here in line 64 to check to make sure 'vcflist' evaluates to TRUE (is not empty) before printing in line 65 (as "not 0 % 1000" evaluates to TRUE).
Also added a newline write to line 72 so that the file ends in a newline character for POSIX compliance and to enable compatibility with the VCF parser in the R package SNPRelate (snpgdsVCF2gds).
Thanks! Evan