# Path: SDDetector/Entities/Region.py
# class Region(object):
# 
#     __slots__=['seq','start','end','strand']
# 
#     def __init__(self, seq, start, end, strand):
#         """Region constructor"""
# 
#         self.seq = seq
#         self.start = start
#         self.end = end
#         self.strand = strand
# 
#     def __eq__(self, other):
#         """Equality on all args"""
# 
#         return (self.seq,self.start,self.end,self.strand) == (other.seq,other.start,other.end,other.strand)
# 
#     def __repr__(self):
#         """repr"""
# 
#         return '{}-{}-{}-{}'.format(self.seq,self.start,self.end,self.strand)      


import logging
from SDDetector.Entities.Region import Region
            loopEnd = algmtGene2End
            while loopEnd != algmtGene2Start-1:
                if algmtGene2[index] != '-':
                    if loopEnd in lPosCDSGene2:
                        algmtGene2 = algmtGene2[:index] + algmtGene2[index].upper() + algmtGene2[index+1:]
                    else:
                        algmtGene2 = algmtGene2[:index] + algmtGene2[index].lower() + algmtGene2[index+1:]
                    loopEnd -= 1
                if algmtGene2[index] == '-':
                    next
                index += 1
              
        if  algmtGene2Strand == 1:
            index = 0
            loopEnd = algmtGene2Start
            while loopEnd != algmtGene2End+1:
                if algmtGene2[index] != '-':
                    if loopEnd in lPosCDSGene2:
                        algmtGene2 = algmtGene2[:index] + algmtGene2[index].upper() + algmtGene2[index+1:]
                    else:
                        algmtGene2 = algmtGene2[:index] + algmtGene2[index].lower() + algmtGene2[index+1:]
                    loopEnd += 1
                if algmtGene2[index] == '-':
                    next
                index += 1

        if len(algmtGene1) != len(algmtGene2):
            logging.error("Algmts not same length")
            sys.exit(1)


# Path: SDDetector/Entities/Region.py
# class Region(object):
# 
#     __slots__=['seq','start','end','strand']
# 
#     def __init__(self, seq, start, end, strand):
#         """Region constructor"""
# 
#         self.seq = seq
#         self.start = start
#         self.end = end
#         self.strand = strand
# 
#     def __eq__(self, other):
#         """Equality on all args"""
# 
#         return (self.seq,self.start,self.end,self.strand) == (other.seq,other.start,other.end,other.strand)
# 
#     def __repr__(self):
#         """repr"""
# 
#         return '{}-{}-{}-{}'.format(self.seq,self.start,self.end,self.strand)      


# Path: SDDetector/Entities/GeneLink.py
import logging
from SDDetector.Entities.Region import Region

            loopEnd = algmtGene2End
            while loopEnd != algmtGene2Start-1:
                if algmtGene2[index] != '-':
                    if loopEnd in lPosCDSGene2:
                        algmtGene2 = algmtGene2[:index] + algmtGene2[index].upper() + algmtGene2[index+1:]
                    else:
                        algmtGene2 = algmtGene2[:index] + algmtGene2[index].lower() + algmtGene2[index+1:]
                    loopEnd -= 1
                if algmtGene2[index] == '-':
                    next
                index += 1
              
        if  algmtGene2Strand == 1:
            index = 0
            loopEnd = algmtGene2Start
            while loopEnd != algmtGene2End+1:
                if algmtGene2[index] != '-':
                    if loopEnd in lPosCDSGene2:
                        algmtGene2 = algmtGene2[:index] + algmtGene2[index].upper() + algmtGene2[index+1:]
                    else:
                        algmtGene2 = algmtGene2[:index] + algmtGene2[index].lower() + algmtGene2[index+1:]
                    loopEnd += 1
                if algmtGene2[index] == '-':
                    next
                index += 1

        if len(algmtGene1) != len(algmtGene2):
            logging.error("Algmts not same length")
            sys.exit(1)


        return (algmtGene1,algmtGene2, Region(self.gene1.seqid,algmtGene1Start,algmtGene1End,algmtGene1Strand),Region(self.gene2.seqid,algmtGene2Start,algmtGene2End,algmtGene2Strand))