AD should be UNBOUNDED, actually
-- Pass in # alt alleles as appropriate for getCount in VCF header line
This commit is contained in:
parent
ac7460ef8c
commit
b5bce8d3f9
|
|
@ -151,7 +151,7 @@ public class DepthPerAlleleBySample extends GenotypeAnnotation implements Standa
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new VCFFormatHeaderLine(
|
new VCFFormatHeaderLine(
|
||||||
getKeyNames().get(0),
|
getKeyNames().get(0),
|
||||||
VCFHeaderLineCount.A,
|
VCFHeaderLineCount.UNBOUNDED,
|
||||||
VCFHeaderLineType.Integer,
|
VCFHeaderLineType.Integer,
|
||||||
"Allelic depths for the ref and alt alleles in the order listed"));
|
"Allelic depths for the ref and alt alleles in the order listed"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ class BCF2Writer extends IndexingVariantContextWriter {
|
||||||
|
|
||||||
private final int getNGenotypeFieldValues(final String field, final VariantContext vc) {
|
private final int getNGenotypeFieldValues(final String field, final VariantContext vc) {
|
||||||
final VCFCompoundHeaderLine metaData = VariantContext.getMetaDataForField(header, field);
|
final VCFCompoundHeaderLine metaData = VariantContext.getMetaDataForField(header, field);
|
||||||
int nFields = metaData.getCount(vc.getNAlleles());
|
int nFields = metaData.getCount(vc.getNAlleles() - 1);
|
||||||
if ( nFields == -1 ) { // unbounded, need to look at values
|
if ( nFields == -1 ) { // unbounded, need to look at values
|
||||||
return computeMaxSizeOfGenotypeFieldFromValues(field, vc);
|
return computeMaxSizeOfGenotypeFieldFromValues(field, vc);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue