# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (3, 0, 0):
    new_instancemethod = lambda func, inst, cls: _cgatools.SWIG_PyInstanceMethod_New(func)
else:
    from new import instancemethod as new_instancemethod
if _swig_python_version_info >= (2, 7, 0):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_cgatools')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_cgatools')
    _cgatools = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_cgatools', [dirname(__file__)])
        except ImportError:
            import _cgatools
            return _cgatools
        try:
            _mod = imp.load_module('_cgatools', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _cgatools = swig_import_helper()
    del swig_import_helper
else:
    import _cgatools
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        object.__setattr__(self, name, value)
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_method(set):
    def set_attr(self, name, value):
        if (name == "thisown"):
            return self.this.own(value)
        if hasattr(self, name) or (name == "this"):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add attributes to %s" % self)
    return set_attr


class SwigPyIterator(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _cgatools.delete_SwigPyIterator
    def __iter__(self):
        return self
SwigPyIterator.value = new_instancemethod(_cgatools.SwigPyIterator_value, None, SwigPyIterator)
SwigPyIterator.incr = new_instancemethod(_cgatools.SwigPyIterator_incr, None, SwigPyIterator)
SwigPyIterator.decr = new_instancemethod(_cgatools.SwigPyIterator_decr, None, SwigPyIterator)
SwigPyIterator.distance = new_instancemethod(_cgatools.SwigPyIterator_distance, None, SwigPyIterator)
SwigPyIterator.equal = new_instancemethod(_cgatools.SwigPyIterator_equal, None, SwigPyIterator)
SwigPyIterator.copy = new_instancemethod(_cgatools.SwigPyIterator_copy, None, SwigPyIterator)
SwigPyIterator.next = new_instancemethod(_cgatools.SwigPyIterator_next, None, SwigPyIterator)
SwigPyIterator.__next__ = new_instancemethod(_cgatools.SwigPyIterator___next__, None, SwigPyIterator)
SwigPyIterator.previous = new_instancemethod(_cgatools.SwigPyIterator_previous, None, SwigPyIterator)
SwigPyIterator.advance = new_instancemethod(_cgatools.SwigPyIterator_advance, None, SwigPyIterator)
SwigPyIterator.__eq__ = new_instancemethod(_cgatools.SwigPyIterator___eq__, None, SwigPyIterator)
SwigPyIterator.__ne__ = new_instancemethod(_cgatools.SwigPyIterator___ne__, None, SwigPyIterator)
SwigPyIterator.__iadd__ = new_instancemethod(_cgatools.SwigPyIterator___iadd__, None, SwigPyIterator)
SwigPyIterator.__isub__ = new_instancemethod(_cgatools.SwigPyIterator___isub__, None, SwigPyIterator)
SwigPyIterator.__add__ = new_instancemethod(_cgatools.SwigPyIterator___add__, None, SwigPyIterator)
SwigPyIterator.__sub__ = new_instancemethod(_cgatools.SwigPyIterator___sub__, None, SwigPyIterator)
SwigPyIterator_swigregister = _cgatools.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)

CGATOOLS_UTIL_MD5_HPP_ = _cgatools.CGATOOLS_UTIL_MD5_HPP_
class Md5Digest(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, val: 'void const *'):
        _cgatools.Md5Digest_swiginit(self, _cgatools.new_Md5Digest(val))
    __swig_destroy__ = _cgatools.delete_Md5Digest
Md5Digest.set = new_instancemethod(_cgatools.Md5Digest_set, None, Md5Digest)
Md5Digest.data = new_instancemethod(_cgatools.Md5Digest_data, None, Md5Digest)
Md5Digest.size = new_instancemethod(_cgatools.Md5Digest_size, None, Md5Digest)
Md5Digest.hex = new_instancemethod(_cgatools.Md5Digest_hex, None, Md5Digest)
Md5Digest_swigregister = _cgatools.Md5Digest_swigregister
Md5Digest_swigregister(Md5Digest)

class Md5Context(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        _cgatools.Md5Context_swiginit(self, _cgatools.new_Md5Context())
    __swig_destroy__ = _cgatools.delete_Md5Context
Md5Context.init = new_instancemethod(_cgatools.Md5Context_init, None, Md5Context)
Md5Context.update = new_instancemethod(_cgatools.Md5Context_update, None, Md5Context)
Md5Context.getDigest = new_instancemethod(_cgatools.Md5Context_getDigest, None, Md5Context)
Md5Context.hexDigest = new_instancemethod(_cgatools.Md5Context_hexDigest, None, Md5Context)
Md5Context_swigregister = _cgatools.Md5Context_swigregister
Md5Context_swigregister(Md5Context)

CGATOOLS_REFERENCE_RANGE_HPP_ = _cgatools.CGATOOLS_REFERENCE_RANGE_HPP_
class Location(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, chromosome: 'uint16_t', offset: 'uint32_t'):
        _cgatools.Location_swiginit(self, _cgatools.new_Location(chromosome, offset))
    chromosome_ = _swig_property(_cgatools.Location_chromosome__get, _cgatools.Location_chromosome__set)
    offset_ = _swig_property(_cgatools.Location_offset__get, _cgatools.Location_offset__set)
    __swig_destroy__ = _cgatools.delete_Location
Location.distanceTo = new_instancemethod(_cgatools.Location_distanceTo, None, Location)
Location_swigregister = _cgatools.Location_swigregister
Location_swigregister(Location)


def __eq__(lhs: 'Location', rhs: 'Location') -> "bool":
    return _cgatools.__eq__(lhs, rhs)
__eq__ = _cgatools.__eq__

def __ne__(lhs: 'Location', rhs: 'Location') -> "bool":
    return _cgatools.__ne__(lhs, rhs)
__ne__ = _cgatools.__ne__

def __lt__(lhs: 'Location', rhs: 'Location') -> "bool":
    return _cgatools.__lt__(lhs, rhs)
__lt__ = _cgatools.__lt__

def __le__(lhs: 'Location', rhs: 'Location') -> "bool":
    return _cgatools.__le__(lhs, rhs)
__le__ = _cgatools.__le__

def __gt__(lhs: 'Location', rhs: 'Location') -> "bool":
    return _cgatools.__gt__(lhs, rhs)
__gt__ = _cgatools.__gt__

def __ge__(lhs: 'Location', rhs: 'Location') -> "bool":
    return _cgatools.__ge__(lhs, rhs)
__ge__ = _cgatools.__ge__

def __lshift__(ostr: 'std::ostream &', l: 'Location') -> "std::ostream &":
    return _cgatools.__lshift__(ostr, l)
__lshift__ = _cgatools.__lshift__
class Range(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, chromosome: 'uint16_t', begin: 'uint32_t', end: 'uint32_t'):
        _cgatools.Range_swiginit(self, _cgatools.new_Range(chromosome, begin, end))
    chromosome_ = _swig_property(_cgatools.Range_chromosome__get, _cgatools.Range_chromosome__set)
    begin_ = _swig_property(_cgatools.Range_begin__get, _cgatools.Range_begin__set)
    end_ = _swig_property(_cgatools.Range_end__get, _cgatools.Range_end__set)
    __swig_destroy__ = _cgatools.delete_Range
Range.beginLocation = new_instancemethod(_cgatools.Range_beginLocation, None, Range)
Range.endLocation = new_instancemethod(_cgatools.Range_endLocation, None, Range)
Range.length = new_instancemethod(_cgatools.Range_length, None, Range)
Range.contains = new_instancemethod(_cgatools.Range_contains, None, Range)
Range.intersects = new_instancemethod(_cgatools.Range_intersects, None, Range)
Range.overlappingRange = new_instancemethod(_cgatools.Range_overlappingRange, None, Range)
Range_swigregister = _cgatools.Range_swigregister
Range_swigregister(Range)

class RangeOverlap(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        _cgatools.RangeOverlap_swiginit(self, _cgatools.new_RangeOverlap())
    __swig_destroy__ = _cgatools.delete_RangeOverlap
RangeOverlap.__call__ = new_instancemethod(_cgatools.RangeOverlap___call__, None, RangeOverlap)
RangeOverlap_swigregister = _cgatools.RangeOverlap_swigregister
RangeOverlap_swigregister(RangeOverlap)

class GetRangeBoundary(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        _cgatools.GetRangeBoundary_swiginit(self, _cgatools.new_GetRangeBoundary())
    __swig_destroy__ = _cgatools.delete_GetRangeBoundary
GetRangeBoundary.__call__ = new_instancemethod(_cgatools.GetRangeBoundary___call__, None, GetRangeBoundary)
GetRangeBoundary_swigregister = _cgatools.GetRangeBoundary_swigregister
GetRangeBoundary_swigregister(GetRangeBoundary)

CGATOOLS_REFERENCE_COMPACTDNASEQUENCE_HPP_ = _cgatools.CGATOOLS_REFERENCE_COMPACTDNASEQUENCE_HPP_
class AmbiguousRegion(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, code: 'char', pos: 'uint32_t', length: 'uint32_t'):
        _cgatools.AmbiguousRegion_swiginit(self, _cgatools.new_AmbiguousRegion(code, pos, length))
    code_ = _swig_property(_cgatools.AmbiguousRegion_code__get, _cgatools.AmbiguousRegion_code__set)
    offset_ = _swig_property(_cgatools.AmbiguousRegion_offset__get, _cgatools.AmbiguousRegion_offset__set)
    length_ = _swig_property(_cgatools.AmbiguousRegion_length__get, _cgatools.AmbiguousRegion_length__set)
    __swig_destroy__ = _cgatools.delete_AmbiguousRegion
AmbiguousRegion_swigregister = _cgatools.AmbiguousRegion_swigregister
AmbiguousRegion_swigregister(AmbiguousRegion)

class CompactDnaSequence(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, name: 'std::string const &', circular: 'bool', packedData: 'void const *', md5: 'Md5Digest', length: 'size_t', amb: 'std::vector< cgatools::reference::AmbiguousRegion,std::allocator< cgatools::reference::AmbiguousRegion > > const'):
        _cgatools.CompactDnaSequence_swiginit(self, _cgatools.new_CompactDnaSequence(name, circular, packedData, md5, length, amb))
    __swig_destroy__ = _cgatools.delete_CompactDnaSequence
CompactDnaSequence.getSequence = new_instancemethod(_cgatools.CompactDnaSequence_getSequence, None, CompactDnaSequence)
CompactDnaSequence.getUnambiguousSequence = new_instancemethod(_cgatools.CompactDnaSequence_getUnambiguousSequence, None, CompactDnaSequence)
CompactDnaSequence.appendSequence = new_instancemethod(_cgatools.CompactDnaSequence_appendSequence, None, CompactDnaSequence)
CompactDnaSequence.appendUnambiguousSequence = new_instancemethod(_cgatools.CompactDnaSequence_appendUnambiguousSequence, None, CompactDnaSequence)
CompactDnaSequence.getBase = new_instancemethod(_cgatools.CompactDnaSequence_getBase, None, CompactDnaSequence)
CompactDnaSequence.getUnambiguousBase = new_instancemethod(_cgatools.CompactDnaSequence_getUnambiguousBase, None, CompactDnaSequence)
CompactDnaSequence.extendLeftBy3Mers = new_instancemethod(_cgatools.CompactDnaSequence_extendLeftBy3Mers, None, CompactDnaSequence)
CompactDnaSequence.extendRightBy3Mers = new_instancemethod(_cgatools.CompactDnaSequence_extendRightBy3Mers, None, CompactDnaSequence)
CompactDnaSequence.validate = new_instancemethod(_cgatools.CompactDnaSequence_validate, None, CompactDnaSequence)
CompactDnaSequence.getName = new_instancemethod(_cgatools.CompactDnaSequence_getName, None, CompactDnaSequence)
CompactDnaSequence.isCircular = new_instancemethod(_cgatools.CompactDnaSequence_isCircular, None, CompactDnaSequence)
CompactDnaSequence.getMd5Digest = new_instancemethod(_cgatools.CompactDnaSequence_getMd5Digest, None, CompactDnaSequence)
CompactDnaSequence.length = new_instancemethod(_cgatools.CompactDnaSequence_length, None, CompactDnaSequence)
CompactDnaSequence.getAmbiguousRegions = new_instancemethod(_cgatools.CompactDnaSequence_getAmbiguousRegions, None, CompactDnaSequence)
CompactDnaSequence_swigregister = _cgatools.CompactDnaSequence_swigregister
CompactDnaSequence_swigregister(CompactDnaSequence)

CGATOOLS_REFERENCE_CRRFILE_HPP_ = _cgatools.CGATOOLS_REFERENCE_CRRFILE_HPP_
class CrrFile(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, path: 'std::string const &'):
        _cgatools.CrrFile_swiginit(self, _cgatools.new_CrrFile(path))
    currentVersion = staticmethod(_cgatools.CrrFile_currentVersion)
    __swig_destroy__ = _cgatools.delete_CrrFile
CrrFile.open = new_instancemethod(_cgatools.CrrFile_open, None, CrrFile)
CrrFile.listChromosomes = new_instancemethod(_cgatools.CrrFile_listChromosomes, None, CrrFile)
CrrFile.listContigs = new_instancemethod(_cgatools.CrrFile_listContigs, None, CrrFile)
CrrFile.getSequence = new_instancemethod(_cgatools.CrrFile_getSequence, None, CrrFile)
CrrFile.getBase = new_instancemethod(_cgatools.CrrFile_getBase, None, CrrFile)
CrrFile.getChromosomeId = new_instancemethod(_cgatools.CrrFile_getChromosomeId, None, CrrFile)
CrrFile.validate = new_instancemethod(_cgatools.CrrFile_validate, None, CrrFile)
CrrFile.getLocation = new_instancemethod(_cgatools.CrrFile_getLocation, None, CrrFile)
CrrFile_swigregister = _cgatools.CrrFile_swigregister
CrrFile_swigregister(CrrFile)

def CrrFile_currentVersion() -> "uint32_t":
    return _cgatools.CrrFile_currentVersion()
CrrFile_currentVersion = _cgatools.CrrFile_currentVersion


def parseFastaHeader(line: 'std::string const &') -> "std::string":
    return _cgatools.parseFastaHeader(line)
parseFastaHeader = _cgatools.parseFastaHeader

def fasta2crr(fasta_files: 'std::vector< std::string,std::allocator< std::string > > const &', crr_file: 'std::string const &') -> "bool":
    return _cgatools.fasta2crr(fasta_files, crr_file)
fasta2crr = _cgatools.fasta2crr

def right_trim_or_left_extend(crr: 'CrrFile', alleles: 'std::vector< std::string,std::allocator< std::string > > &', pos1: 'uint32_t &', chrIdx: 'int', left_extended: 'uint32_t &', right_trimmed: 'uint32_t &') -> "void":
    return _cgatools.right_trim_or_left_extend(crr, alleles, pos1, chrIdx, left_extended, right_trimmed)
right_trim_or_left_extend = _cgatools.right_trim_or_left_extend

def left_trim(alleles: 'std::vector< std::string,std::allocator< std::string > > &', pos1: 'uint32_t &', left_trimmed: 'uint32_t &') -> "void":
    return _cgatools.left_trim(alleles, pos1, left_trimmed)
left_trim = _cgatools.left_trim

def normalize_variant(crr: 'CrrFile', rec: 'PyObject *', chr_idx: 'size_t', pos_idx: 'size_t', ref_idx: 'size_t', alt_idx: 'size_t') -> "std::string":
    return _cgatools.normalize_variant(crr, rec, chr_idx, pos_idx, ref_idx, alt_idx)
normalize_variant = _cgatools.normalize_variant
