@@ -512,7 +512,7 @@ def compute_laa_field(variant) -> np.ndarray:
512512 The LAA field is a list of one-based indices into the ALT alleles
513513 that indicates which alternate alleles are observed in the sample.
514514
515- This method infers which alleles are observed from the GT, AD, and PL fields .
515+ This method infers which alleles are observed from the GT field .
516516 """
517517 sample_count = variant .num_called + variant .num_unknown
518518 alt_allele_count = len (variant .ALT )
@@ -528,18 +528,6 @@ def compute_laa_field(variant) -> np.ndarray:
528528 np .bincount , axis = 1 , arr = genotypes , minlength = allele_count
529529 )
530530 allele_counts += genotype_allele_counts
531- if "AD" in variant .FORMAT :
532- depths = variant .format ("AD" )
533- depths .clip (0 , None , out = depths )
534-
535- def bincount_nonzero (arr , * , minlength ):
536- # nonzero returns the indices of the nonzero elements for each axis
537- return np .bincount (arr .nonzero ()[0 ], minlength = minlength )
538-
539- depths_allele_counts = np .apply_along_axis (
540- bincount_nonzero , axis = 1 , arr = depths , minlength = allele_count
541- )
542- allele_counts += depths_allele_counts
543531
544532 allele_counts [:, 0 ] = 0 # We don't count the reference allele
545533 max_row_length = 1
0 commit comments