void whyConserved(char *database, char *chrom, char *homologyTrack) /* whyConserved - Try and analyse why a particular thing is conserved. */ { struct sqlConnection *conn; int chromSize; Bits *h**o = NULL; Bits *bits = NULL; Bits *once = NULL; conn = hAllocConn(database); chromSize = hChromSize(database, chrom); h**o = bitAlloc(chromSize); bits = bitAlloc(chromSize); once = bitAlloc(chromSize); /* Get homology bitmap and set once mask to be the same. */ fbOrTableBits(database, h**o, homologyTrack, chrom, chromSize, conn); bitOr(once, h**o, chromSize); /* printHeader */ printf("%-21s %8s %8s %5s %6s %6s %5s %5s \n", "Track Specification", "track", "overlap", "track", "mus", "track", "new", "cum"); printf("%-21s %8s %8s %5s %6s %6s %5s %5s \n", "", "size", "size", "geno", "track", "mus", "mus", "mus"); printf("-----------------------------------------------------------------------------\n"); /* Whittle awway at homology... */ explainSome(database, h**o, once, bits, chrom, chromSize, conn, NULL, homologyTrack); explainSome(database, h**o, once, bits, chrom, chromSize, conn, "sanger22:CDS", NULL); explainSome(database, h**o, once, bits, chrom, chromSize, conn, "refGene:CDS", NULL); explainSome(database, h**o, once, bits, chrom, chromSize, conn, "est", NULL); explainSome(database, h**o, once, bits, chrom, chromSize, conn, "intronEst:exon", NULL); explainSome(database, h**o, once, bits, chrom, chromSize, conn, "blatMouse:exon", NULL); explainSome(database, h**o, once, bits, chrom, chromSize, conn, "xenoMrna:exon", NULL); explainSome(database, h**o, once, bits, chrom, chromSize, conn, "xenoEst:exon", NULL); explainSome(database, h**o, once, bits, chrom, chromSize, conn, "genscan:exon", NULL); explainSome(database, h**o, once, bits, chrom, chromSize, conn, "exoFish", NULL); hFreeConn(&conn); }
void trackOverlap(char *database, char *chrom, char *homologyTrack, char *specFile) /* trackOverlap - Correlate a track with a series of tracks specified in specFile. */ { struct lineFile *lf = NULL; char *line = NULL; struct sqlConnection *conn; int chromSize; Bits *h**o = NULL; Bits *bits = NULL; Bits *once = NULL; lf = lineFileOpen(specFile, TRUE); conn = hAllocConn(database); chromSize = hChromSize(database, chrom); h**o = bitAlloc(chromSize); bits = bitAlloc(chromSize); once = bitAlloc(chromSize); /* Get homology bitmap and set once mask to be the same. */ fbOrTableBits(database, h**o, homologyTrack, chrom, chromSize, conn); bitOr(once, h**o, chromSize); /* printHeader */ printf("%-21s %8s %8s %5s %6s %6s %5s %5s \n", "Track Specification", "track", "overlap", "track", "cov", "track", "new", "cum"); printf("%-21s %8s %8s %5s %6s %6s %5s %5s \n", "", "size", "size", "geno", "track", "cov", "cov", "cov"); printf("-----------------------------------------------------------------------------\n"); /* Whittle awway at homology... */ explainSome(database, h**o, once, bits, chrom, chromSize, conn, NULL, homologyTrack); while(lineFileNextReal(lf, &line)) { explainSome(database, h**o, once, bits, chrom, chromSize, conn, line, NULL); } lineFileClose(&lf); hFreeConn(&conn); }