@@ -512,7 +512,7 @@ def compute_laa_field(variant) -> np.ndarray:
512
512
The LAA field is a list of one-based indices into the ALT alleles
513
513
that indicates which alternate alleles are observed in the sample.
514
514
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 .
516
516
"""
517
517
sample_count = variant .num_called + variant .num_unknown
518
518
alt_allele_count = len (variant .ALT )
@@ -528,18 +528,6 @@ def compute_laa_field(variant) -> np.ndarray:
528
528
np .bincount , axis = 1 , arr = genotypes , minlength = allele_count
529
529
)
530
530
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
543
531
544
532
allele_counts [:, 0 ] = 0 # We don't count the reference allele
545
533
max_row_length = 1
0 commit comments