static void sim4QueryOut(struct gfOutput *out, FILE *f) /* Do sim4-like output - at end of processing query. */ { struct axtData *aod = out->data; struct axtBundle *gab; for (gab = aod->bundleList; gab != NULL; gab = gab->next) { struct axt *axt = gab->axtList; fprintf(f, "\n"); fprintf(f, "seq1 = %s, %d bp\n", axt->qName, gab->qSize); fprintf(f, "seq2 = %s, %d bp\n", axt->tName, gab->tSize); fprintf(f, "\n"); if (axt->qStrand == '-') fprintf(f, "(complement)\n"); for (axt = gab->axtList; axt != NULL; axt = axt->next) { fprintf(f, "%d-%d ", axt->qStart+1, axt->qEnd); fprintf(f, "(%d-%d) ", axt->tStart+1, axt->tEnd); fprintf(f, "%1.0f%% ", 100.0 * axtIdRatio(axt)); if (axt->qStrand == '-') fprintf(f, "<-\n"); else fprintf(f, "->\n"); } } axtBundleFreeList(&aod->bundleList); }
static void sim4QueryOut(struct gfOutput *out, FILE *f) /* Do sim4-like output - at end of processing query. */ { struct axtData *aod = out->data; struct axtBundle *gab; slReverse(&aod->bundleList); for (gab = aod->bundleList; gab != NULL; gab = gab->next) { struct axt *axt = gab->axtList; // check minIdentity of the entire alignment int goodPpt = 1000 * axtListRatio(axt); if (!(goodPpt >= out->minGood)) continue; fprintf(f, "\n"); fprintf(f, "seq1 = %s, %d bp\n", axt->qName, gab->qSize); fprintf(f, "seq2 = %s, %d bp\n", axt->tName, gab->tSize); fprintf(f, "\n"); if (axt->qStrand == '-') fprintf(f, "(complement)\n"); for (; axt != NULL; axt = axt->next) { fprintf(f, "%d-%d ", axt->qStart+1, axt->qEnd); fprintf(f, "(%d-%d) ", axt->tStart+1, axt->tEnd); fprintf(f, "%1.0f%% ", 100.0 * axtIdRatio(axt)); if (axt->qStrand == '-') fprintf(f, "<-\n"); else fprintf(f, "->\n"); } } axtBundleFreeList(&aod->bundleList); }
static void doAChain(struct chain *chain, struct nibTwoCache *tSeqCache, struct nibTwoCache *qSeqCache, FILE *f) /* Convert one chain to an axt. */ { struct dnaSeq *qSeq = loadSeqStrand(qSeqCache, chain->qName, chain->qStart, chain->qEnd, chain->qStrand); struct dnaSeq *tSeq = loadSeqStrand(tSeqCache, chain->tName, chain->tStart, chain->tEnd, '+'); struct axt *axtList= chainToAxt(chain, qSeq, chain->qStart, tSeq, chain->tStart, maxGap, BIGNUM); struct axt *axt = NULL; for (axt = axtList; axt != NULL; axt = axt->next) { double idRatio = axtIdRatio(axt); if (minIdRatio <= idRatio) { if (bedOut) bedWriteAxt(axt, chain->qSize, chain->tSize, idRatio, f); else axtWrite(axt, f); } } axtFreeList(&axtList); freeDnaSeq(&qSeq); freeDnaSeq(&tSeq); }