# Path: mitty/benchmarking/alignmentscore.py
# def is_simple_case(cigar1, cigar2):
# def find_first_common_reference_matching_base_positions(r1, r2):
# def score_alignment_error(r, ri, max_d=200, strict=False):
# def correct_tlen(ri1, ri2, r):
# def tag_alignment(r, ri, max_d=200, strict=False):


from mitty.benchmarking.alignmentscore import find_first_common_reference_matching_base_positions, pysam


def test_ref_matching_base():
  """d-err: Find first reference matching base positions"""
  test_cases = [
    ((100, '100M'), (130, '30S70M')),
    ((100, '10I90M'), (100, '10S90M')),
    ((100, '10I10M10I70M'), (110, '30S70M')),
    ((100, '10M1000D90M'), (1110, '10S90M')),
    ((100, '10M1000D90M'), (1120, '20S90M')),
    ((100, '10M1000D80M10I'), (1120, '20S80M10S')),
    ((1000686, '96S154M'), (1000590, '250M')),
  ]
  for tc1, tc2 in test_cases:

# Path: mitty/benchmarking/alignmentscore.py
# def is_simple_case(cigar1, cigar2):
# def find_first_common_reference_matching_base_positions(r1, r2):
# def score_alignment_error(r, ri, max_d=200, strict=False):
# def correct_tlen(ri1, ri2, r):
# def tag_alignment(r, ri, max_d=200, strict=False):


# Path: mitty/test/benchmarking/test_alignmentscore.py
from mitty.benchmarking.alignmentscore import find_first_common_reference_matching_base_positions, pysam



def test_ref_matching_base():
  """d-err: Find first reference matching base positions"""
  test_cases = [
    ((100, '100M'), (130, '30S70M')),
    ((100, '10I90M'), (100, '10S90M')),
    ((100, '10I10M10I70M'), (110, '30S70M')),
    ((100, '10M1000D90M'), (1110, '10S90M')),
    ((100, '10M1000D90M'), (1120, '20S90M')),
    ((100, '10M1000D80M10I'), (1120, '20S80M10S')),
    ((1000686, '96S154M'), (1000590, '250M')),
  ]
  for tc1, tc2 in test_cases:

    r1, r2 = pysam.AlignedSegment(), pysam.AlignedSegment()