Ejemplo n.º 1
0
static void doAggregateOverlaps(struct chromAnnReader* inCar, FILE *outFh, FILE *dropFh)
/* Do aggreate overlap processing */
{
struct chromAnn *inCa;
while ((inCa = inCar->caRead(inCar)) != NULL)
    {
    doAggregateOverlap(inCa, outFh, dropFh);
    chromAnnFree(&inCa);
    }
}
Ejemplo n.º 2
0
void chromAnnMapAdd(struct chromAnnMap *cam,
                    struct chromAnn *ca)
/* add a record to the table. */
{
/* don't add if zero-length, they can't select */
if (ca->start < ca->end)
    genomeRangeTreeAddValList(cam->ranges, ca->chrom, ca->start, ca->end, ca);
else
    chromAnnFree(&ca);
}
Ejemplo n.º 3
0
static void doItemOverlaps(struct chromAnnReader* inCar, FILE *outFh, FILE *dropFh)
/* Do individual item overlap processings */
{
struct chromAnn *inCa;
while ((inCa = inCar->caRead(inCar)) != NULL)
    {
    doItemOverlap(inCa, outFh, dropFh);
    chromAnnFree(&inCa);
    }
}
Ejemplo n.º 4
0
void chromAnnMapFree(struct chromAnnMap **camPtr)
/* free chromAnnMap structures. */
{
struct chromAnnMap *cam = *camPtr;
if (cam != NULL)
    {
    struct hashCookie chromCookie = hashFirst(cam->ranges->hash);
    struct hashEl *chromEl;
    for (chromEl = hashNext(&chromCookie); chromEl != NULL; chromEl = chromEl->next)
        {
        struct range *r, *ranges = genomeRangeTreeList(cam->ranges, chromEl->name);
        for (r = ranges; r != NULL; r = r->next)
            {
            struct chromAnn *ca, *cas = r->val;
            while ((ca = slPopHead(&cas)) != NULL)
                chromAnnFree(&ca);
            }
        }
    freez(camPtr);
    }
}