third_party/nucleus/util/cigar.py
def alignment_length(cigar_units):
  """Computes the span in basepairs of the cigar units.

  Args:
    cigar_units: iterable[CigarUnit] whose alignment length we want to compute.

  Returns:
    The number of basepairs spanned by the cigar_units.
  """
  return sum(unit.operation_length
             for unit in cigar_units
             if unit.operation in REF_ADVANCING_OPS)
Computes the span in basepairs of the cigar units.

  Args:
    cigar_units: iterable[CigarUnit] whose alignment length we want to compute.

  Returns:
    The number of basepairs spanned by the cigar_units.
  
Computes the span in basepairs of the cigar units.
Computes the span in basepairs of the cigar units .
def alignment_length(cigar_units):
  return sum(unit.operation_length
             for unit in cigar_units
             if unit.operation in REF_ADVANCING_OPS)
def alignment_length ( cigar_units ) : return sum ( unit . operation_length for unit in cigar_units if unit . operation in REF_ADVANCING_OPS )
Computes the span in basepairs of the cigar units.
Computes the span in basepairs of the cigar units .
"""Computes the span in basepairs of the cigar units.

  Args:
    cigar_units: iterable[CigarUnit] whose alignment length we want to compute.

  Returns:
    The number of basepairs spanned by the cigar_units.
  """
The number of basepairs spanned by the cigar_units.
The number of basepairs spanned by the cigar_units .
cigar_units
iterable[CigarUnit] whose alignment length we want to compute.
iterable [ CigarUnit ] whose alignment length we want to compute .