docs: def sequence_checker(reference_seq_aln, structure_seq_aln,
                       seq_ident_cutoff=0.5, allow_missing_on_termini=0.2,
                       allow_mutants=False, allow_deletions=False,
                       allow_insertions=False, allow_unresolved=False):
      """Report if a structure's sequence meets coverage checks to a reference sequence.
  
      First aligns a sequence from a chain of a PDB structure to "reference" sequence.
      Then creates a DataFrame of results to check for everything.
  
      Args:
          reference_seq_aln (str, Seq, SeqRecord): Reference sequence, alignment form
          structure_seq_aln (str, Seq, SeqRecord): Structure sequence, alignment form
          seq_ident_cutoff (float): Percent sequence identity cutoff, in decimal form
          allow_missing_on_termini (float): Percentage of the total length of the reference sequence which will be ignored
              when checking for modifications. Example: if 0.1, and reference sequence is 100 AA, then only residues
              5 to 95 will be checked for modifications.
          allow_mutants (bool): If mutations should be allowed or checked for
          allow_deletions (bool): If deletions should be allowed or checked for
          allow_insertions (bool): If insertions should be allowed or checked for
          allow_unresolved (bool): If unresolved residues should be allowed or checked for
  
      Returns:
          bool: If the structure's sequence meets the quality checks.
  
      """
      reference_seq_aln = ssbio.protein.sequence.utils.cast_to_str(reference_seq_aln)
      structure_seq_aln = ssbio.protein.sequence.utils.cast_to_str(structure_seq_aln)
      results = ssbio.protein.sequence.utils.alignment.pairwise_alignment_stats(reference_seq_aln=reference_seq_aln,
                                                                                other_seq_aln=structure_seq_aln)
  
      # Check percent identity cutoff
      stats_percent_ident = results['percent_identity']
      log.debug('{}: percent identity'.format(stats_percent_ident))
      if stats_percent_ident < seq_ident_cutoff:
          log.debug('Alignment does not meet percent identity cutoff')
          return False
      else:
          log.debug('Alignment meets percent identity cutoff')
  
      # Get cutoff stuff ready
      ref_seq_len = len(reference_seq_aln.replace('-', ''))
      allow_missing_on_termini /= 2
      # If any differences appear before start, they are ignored
      start = ref_seq_len - (ref_seq_len * (1 - allow_missing_on_termini))
      # If any differences appear before end, they are ignored
      end = ref_seq_len - (ref_seq_len * allow_missing_on_termini)
  
      no_deletions_in_pdb = False
      no_insertions_in_pdb = False
      no_mutants_in_pdb = False
      no_unresolved_in_pdb = False
  
      # Check everything
      if not allow_deletions:
          # Get indices of the deletions
          deletions = results['deletions']
          # If there are no deletions, that's great
          if len(deletions) == 0:
              log.debug('No deletion regions')
              no_deletions_in_pdb = True
          else:
              log.debug('{} deletion region(s)'.format(len(deletions)))
              # If the deletion appears before or after the cutoff, that's also great
              for deletion in deletions:
                  if deletion[0][1] < start or deletion[0][0] > end:
                      no_deletions_in_pdb = True
                      log.debug('Deletion region(s) are not within structure core')
                  else:
                      no_deletions_in_pdb = False
                      log.debug('Deletions within structure')
                      log.debug('{} > {} or {} < {}'.format(deletion[0][1], start, deletion[0][0], end))
                      break
      else:
          no_deletions_in_pdb = True
  
      if not allow_insertions:
          # Get indices of the insertions
          insertions = results['insertions']
          # If there are no insertions, that's great
          if len(insertions) == 0:
              log.debug('No insertion regions')
              no_insertions_in_pdb = True
          else:
              log.debug('{} insertion region(s)'.format(len(insertions)))
              # If the insertion appears before or after the cutoff, that's also great
              for insertion in insertions:
                  if insertion[0][1] < start or insertion[0][0] > end:
                      no_insertions_in_pdb = True
                      log.debug('Insertion region(s) are not within structure core')
                  else:
                      no_insertions_in_pdb = False
                      log.debug('Insertion regions within structure')
                      break
      else:
          no_insertions_in_pdb = True
  
      if not allow_mutants:
          # Get indices of the mutants
          mutations_full = results['mutations']
          mutations = [x[1] for x in mutations_full]
          # If there are no mutants, that's great
          if len(mutations) == 0:
              log.debug('No point mutations')
              no_mutants_in_pdb = True
          else:
              log.debug('{} point mutation(s)'.format(len(mutations)))
              # If the mutant appears before or after the cutoff, that's also great
              for mutation in mutations:
                  if mutation < start or mutation > end:
                      no_mutants_in_pdb = True
                      log.debug('Mutation region(s) are not within structure core')
                  else:
                      no_mutants_in_pdb = False
                      log.debug('Mutantion regions within structure')
                      break
      else:
          no_mutants_in_pdb = True
  
      if not allow_unresolved:
          # Get indices of the unresolved residues
          unresolved = results['unresolved']
          # If there are no unresolved, that's great
          if len(unresolved) == 0:
              log.debug('No unresolved mutations')
              no_unresolved_in_pdb = True
          else:
              log.debug('{} unresolved residue(s)'.format(len(unresolved)))
              # If the unresolved residue appears before or after the cutoff, that's also great
              for unr in unresolved:
                  if unr < start or unr > end:
                      no_unresolved_in_pdb = True
                      log.debug('Unresolved region(s) are not within structure core')
                  else:
                      no_unresolved_in_pdb = False
                      log.debug('Unresolved residues within structure')
                      break
      else:
          no_unresolved_in_pdb = True
  
      if no_deletions_in_pdb and no_insertions_in_pdb and no_mutants_in_pdb and no_unresolved_in_pdb:
          return True
      else:
          return False