Minor bugfixes / consistency fixes to filter strings of Genotypes and AC/AF annotations
-- GenotypeBuilder now sorts the list of filter strings so that the output is in a consistent order -- calculateChromosomeCounts removes the AC/AF fields entirely when there are no alt alleles, to be on VCF spec for A defined info field values
This commit is contained in:
parent
6ebefcc89f
commit
5ad9a98a15
|
|
@ -382,7 +382,7 @@ public final class GenotypeBuilder {
|
|||
else if ( filters.size() == 1 )
|
||||
return filter(filters.get(0));
|
||||
else
|
||||
return filter(ParsingUtils.join(";", filters));
|
||||
return filter(ParsingUtils.join(";", ParsingUtils.sortList(filters)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -147,6 +147,10 @@ public class VariantContextUtils {
|
|||
|
||||
attributes.put(VCFConstants.ALLELE_COUNT_KEY, alleleCounts.size() == 1 ? alleleCounts.get(0) : alleleCounts);
|
||||
attributes.put(VCFConstants.ALLELE_FREQUENCY_KEY, alleleFreqs.size() == 1 ? alleleFreqs.get(0) : alleleFreqs);
|
||||
} else {
|
||||
// if there's no alt AC and AF shouldn't be present
|
||||
attributes.remove(VCFConstants.ALLELE_COUNT_KEY);
|
||||
attributes.remove(VCFConstants.ALLELE_FREQUENCY_KEY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue