# Path: seqcluster/libs/classes.py
# class annotation:
#     """
#     Object with information about annotation: database, name of the feature, strand,
#     distance to 5' end, distance to 3' end
#     """
#     def __init__(self,db,name,strand,to5,to3):
#         self.db = db
#         self.name = name
#         self.strand = strand
#         self.to5 = to5
#         self.to3 = to3
# 
# class dbannotation:
#     """
#     Object with information about annotation: containg one dict that
#     store all features for each database type
#     """
#     def __init__(self,na):
#         self.ann = {}
#     def add_db_ann(self,ida,ndba):
#         self.ann[ida] = ndba


import seqcluster.libs.logger as mylog
import os
from seqcluster.libs.classes import annotation, dbannotation
        id_eb = 8
        id_stb = 11
        id_tag = 9
    ida = 0
    clus_id = clus_obj.clus
    loci_id = clus_obj.loci
    db = os.path.splitext(db)[0]
    logger.debug("Type:%s\n" % type_ann)
    for cols in c.features():
        if type_ann == "gtf":
            cb, sb, eb, stb, db, tag = read_gtf_line(cols[6:], feature_id)
        else:
            sb = int(cols[id_sb])
            eb = int(cols[id_eb])
            stb = cols[id_stb]
            tag = cols[id_tag]
        id = int(cols[id_id])
        idl = int(cols[id_idl])
        if (id in clus_id):
            clus = clus_id[id]
            sa = int(cols[id_sa])
            ea = int(cols[id_ea])
            ida += 1
            lento5, lento3, strd = _position_in_feature([sa, ea, cols[id_sta]], [sb, eb, stb])
            if db in loci_id[idl].db_ann:
                ann = annotation(db, tag, strd, lento5, lento3)
                tdb = loci_id[idl].db_ann[db]
                tdb.add_db_ann(ida, ann)
                loci_id[idl].add_db(db, tdb)
            else:

# Path: seqcluster/libs/classes.py
# class annotation:
#     """
#     Object with information about annotation: database, name of the feature, strand,
#     distance to 5' end, distance to 3' end
#     """
#     def __init__(self,db,name,strand,to5,to3):
#         self.db = db
#         self.name = name
#         self.strand = strand
#         self.to5 = to5
#         self.to3 = to3
# 
# class dbannotation:
#     """
#     Object with information about annotation: containg one dict that
#     store all features for each database type
#     """
#     def __init__(self,na):
#         self.ann = {}
#     def add_db_ann(self,ida,ndba):
#         self.ann[ida] = ndba


# Path: seqcluster/libs/annotation.py
import seqcluster.libs.logger as mylog
import os
from seqcluster.libs.classes import annotation, dbannotation

        id_eb = 8
        id_stb = 11
        id_tag = 9
    ida = 0
    clus_id = clus_obj.clus
    loci_id = clus_obj.loci
    db = os.path.splitext(db)[0]
    logger.debug("Type:%s\n" % type_ann)
    for cols in c.features():
        if type_ann == "gtf":
            cb, sb, eb, stb, db, tag = read_gtf_line(cols[6:], feature_id)
        else:
            sb = int(cols[id_sb])
            eb = int(cols[id_eb])
            stb = cols[id_stb]
            tag = cols[id_tag]
        id = int(cols[id_id])
        idl = int(cols[id_idl])
        if (id in clus_id):
            clus = clus_id[id]
            sa = int(cols[id_sa])
            ea = int(cols[id_ea])
            ida += 1
            lento5, lento3, strd = _position_in_feature([sa, ea, cols[id_sta]], [sb, eb, stb])
            if db in loci_id[idl].db_ann:
                ann = annotation(db, tag, strd, lento5, lento3)
                tdb = loci_id[idl].db_ann[db]
                tdb.add_db_ann(ida, ann)
                loci_id[idl].add_db(db, tdb)
            else:

                ann = annotation(db, tag, strd, lento5, lento3)