diff --git a/snp2h5/vcf.c b/snp2h5/vcf.c index 22b9fa0..164718e 100644 --- a/snp2h5/vcf.c +++ b/snp2h5/vcf.c @@ -172,11 +172,13 @@ void vcf_parse_haplotypes(VCFInfo *vcf_info, char *haplotypes, /* try with '/' separator instead */ n = sscanf(inner_tok, "%d/%d", &hap1, &hap2); - if(n == 2 && warn_phase) { - my_warn("%s:%d: some genotypes are unphased (delimited " - "with '/' instead of '|')\n", __FILE__, __LINE__, - inner_tok); - warn_phase = FALSE; + if(n == 2) { + if(warn_phase) { + my_warn("%s:%d: some genotypes are unphased (delimited " + "with '/' instead of '|')\n", __FILE__, __LINE__, + inner_tok); + warn_phase = FALSE; + } } else { my_warn("%s:%d: could not parse genotype string '%s'\n", __FILE__, __LINE__, inner_tok);