pyrad icon indicating copy to clipboard operation
pyrad copied to clipboard

Fixing newline formatting in VCF

Open atcg opened this issue 8 years ago • 0 comments

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

atcg avatar Aug 05 '16 02:08 atcg