# Path: dark/cigar.py
# (CINS_STR, CDEL_STR, CMATCH_STR, CEQUAL_STR, CDIFF_STR,
#  CHARD_CLIP_STR) = 'IDM=XH'
# def dna2cigar(s1, s2, concise=False):
# def makeCigar(reference, query, noEdgeInsertions=True):
# def cigarTuplesToOperations(tuples, includeHardClip=True):
# def softClippedOffset(offset, pairs, cigarOperations):
# def insertionOffset(offset, pairs, cigarOperations):


from unittest import TestCase
from pysam import CSOFT_CLIP, CHARD_CLIP, CMATCH, CINS
from dark.cigar import (
    CINS_STR, CDEL_STR, CMATCH_STR, CEQUAL_STR, CDIFF_STR,
    dna2cigar, makeCigar, cigarTuplesToOperations, softClippedOffset,
    insertionOffset)
        case, the CIGAR string must indicate that they do not match.
        """
        self.assertEqual('1X', dna2cigar('A', 'a'))

    def testEqualStringsLength1Concise(self):
        """
        If two equal strings of length 1 are passed and the concise argument
        is True, the correct CIGAR string must be returned.
        """
        self.assertEqual('1M', dna2cigar('A', 'A', concise=True))

    def testUnequalStringsLength1(self):
        """
        If two unequal strings of length 1 are passed, the correct CIGAR
        string must be returned.
        """
        self.assertEqual('1X', dna2cigar('A', 'G'))

    def testUnequalStringsLength1Concise(self):
        """
        If two unequal strings of length 1 are passed and the concise argument
        is True, the correct CIGAR string must be returned.
        """
        self.assertEqual('1M', dna2cigar('A', 'G', concise=True))

    def testEqualStringsLength2(self):
        """
        If two equal strings of length 2 are passed, the correct CIGAR string
        must be returned.
        """

# Path: dark/cigar.py
# (CINS_STR, CDEL_STR, CMATCH_STR, CEQUAL_STR, CDIFF_STR,
#  CHARD_CLIP_STR) = 'IDM=XH'
# def dna2cigar(s1, s2, concise=False):
# def makeCigar(reference, query, noEdgeInsertions=True):
# def cigarTuplesToOperations(tuples, includeHardClip=True):
# def softClippedOffset(offset, pairs, cigarOperations):
# def insertionOffset(offset, pairs, cigarOperations):


# Path: test/test_cigar.py
from unittest import TestCase
from pysam import CSOFT_CLIP, CHARD_CLIP, CMATCH, CINS
from dark.cigar import (
    CINS_STR, CDEL_STR, CMATCH_STR, CEQUAL_STR, CDIFF_STR,
    dna2cigar, makeCigar, cigarTuplesToOperations, softClippedOffset,
    insertionOffset)

        case, the CIGAR string must indicate that they do not match.
        """
        self.assertEqual('1X', dna2cigar('A', 'a'))

    def testEqualStringsLength1Concise(self):
        """
        If two equal strings of length 1 are passed and the concise argument
        is True, the correct CIGAR string must be returned.
        """
        self.assertEqual('1M', dna2cigar('A', 'A', concise=True))

    def testUnequalStringsLength1(self):
        """
        If two unequal strings of length 1 are passed, the correct CIGAR
        string must be returned.
        """
        self.assertEqual('1X', dna2cigar('A', 'G'))

    def testUnequalStringsLength1Concise(self):
        """
        If two unequal strings of length 1 are passed and the concise argument
        is True, the correct CIGAR string must be returned.
        """
        self.assertEqual('1M', dna2cigar('A', 'G', concise=True))

    def testEqualStringsLength2(self):
        """
        If two equal strings of length 2 are passed, the correct CIGAR string
        must be returned.
        """

        self.assertEqual('2=', dna2cigar('AT', 'AT'))