# 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)
        """
        self.assertEqual('2M2S', makeCigar('  ACGT',
                                           '    ATAA'))

    def testRightClippingPaddedOne(self):
        """
        Test that right soft clipping of one base works when the reference
        is padded on the right.
        """
        self.assertEqual('2M1S', makeCigar('  ACGT ',
                                           '    ATA'))

    def testRightClippingPaddedTwo(self):
        """
        Test that right soft clipping of two bases works when the reference
        is padded on the right.
        """
        self.assertEqual('2M2S', makeCigar('  ACGT  ',
                                           '    ATAA'))

    def testLeftInsert(self):
        """
        Test that an insert on the left works.
        """
        self.assertEqual(
            '2I2M',
            makeCigar('--ACGT  ', 'ATAC', noEdgeInsertions=False))

        # When edge insertions are not allowed, the first two bases are
        # soft-clipped (as in tests above).

# 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)

        """
        self.assertEqual('2M2S', makeCigar('  ACGT',
                                           '    ATAA'))

    def testRightClippingPaddedOne(self):
        """
        Test that right soft clipping of one base works when the reference
        is padded on the right.
        """
        self.assertEqual('2M1S', makeCigar('  ACGT ',
                                           '    ATA'))

    def testRightClippingPaddedTwo(self):
        """
        Test that right soft clipping of two bases works when the reference
        is padded on the right.
        """
        self.assertEqual('2M2S', makeCigar('  ACGT  ',
                                           '    ATAA'))

    def testLeftInsert(self):
        """
        Test that an insert on the left works.
        """
        self.assertEqual(
            '2I2M',
            makeCigar('--ACGT  ', 'ATAC', noEdgeInsertions=False))

        # When edge insertions are not allowed, the first two bases are
        # soft-clipped (as in tests above).

        self.assertEqual('2S2M', makeCigar('--ACGT  ',