Skip to content

Fixing newline formatting in VCF#31

Open
atcg wants to merge 1 commit intodereneaton:masterfrom
atcg:patch-1
Open

Fixing newline formatting in VCF#31
atcg wants to merge 1 commit intodereneaton:masterfrom
atcg:patch-1

Conversation

@atcg
Copy link
Copy Markdown

@atcg atcg commented Aug 5, 2016

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

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
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

Successfully merging this pull request may close these issues.

1 participant