Only print warning about allele incompatibility when running there are genotypes in the file in CombineVariants

This commit is contained in:
Mark DePristo 2011-12-16 16:33:13 -05:00
parent 1863da4d18
commit 1994c3e3bc
1 changed files with 3 additions and 2 deletions

View File

@ -619,8 +619,9 @@ public class VariantContextUtils {
if (vc.alleles.size() == 1) if (vc.alleles.size() == 1)
continue; continue;
if ( hasPLIncompatibleAlleles(alleles, vc.alleles)) { if ( hasPLIncompatibleAlleles(alleles, vc.alleles)) {
logger.warn(String.format("Stripping PLs at %s due incompatible alleles merged=%s vs. single=%s", if ( ! genotypes.isEmpty() )
genomeLocParser.createGenomeLoc(vc), alleles, vc.alleles)); logger.warn(String.format("Stripping PLs at %s due incompatible alleles merged=%s vs. single=%s",
genomeLocParser.createGenomeLoc(vc), alleles, vc.alleles));
genotypes = stripPLs(genotypes); genotypes = stripPLs(genotypes);
// this will remove stale AC,AF attributed from vc // this will remove stale AC,AF attributed from vc
calculateChromosomeCounts(vc, attributes, true); calculateChromosomeCounts(vc, attributes, true);