lib/xenshow.c File Reference

#include "common.h"
#include "nt4.h"
#include "xenalign.h"

Include dependency graph for xenshow.c:

Go to the source code of this file.

Functions

static void printMatchers (char *a, char *b, int lineSize, FILE *f)
static int nonDashCount (char *s, int size)
void xenShowAli (char *qSym, char *tSym, char *hSym, int symCount, FILE *f, int qOffset, int tOffset, char qStrand, char tStrand, int maxLineSize)

Variables

static char const rcsid [] = "$Id: xenshow.c,v 1.5 2003/05/06 07:33:44 kate Exp $"


Function Documentation

static int nonDashCount ( char *  s,
int  size 
) [static]

Definition at line 22 of file xenshow.c.

Referenced by xenShowAli().

00025 {
00026 int count = 0;
00027 int i;
00028 for (i=0; i<size; ++i)
00029     if (s[i] != '-')
00030         ++count;
00031 return count;
00032 }

Here is the caller graph for this function:

static void printMatchers ( char *  a,
char *  b,
int  lineSize,
FILE *  f 
) [static]

Definition at line 11 of file xenshow.c.

Referenced by xenShowAli().

00013 {
00014 int i;
00015 for (i=0; i<lineSize; ++i)
00016    {
00017    char c = ((a[i] == b[i]) ? '|' : ' ');
00018    fputc(c, f);
00019    }
00020 }

Here is the caller graph for this function:

void xenShowAli ( char *  qSym,
char *  tSym,
char *  hSym,
int  symCount,
FILE *  f,
int  qOffset,
int  tOffset,
char  qStrand,
char  tStrand,
int  maxLineSize 
)

Definition at line 34 of file xenshow.c.

References mustWrite(), nonDashCount(), and printMatchers().

00037 {
00038 int i;
00039 int lineSize;
00040 int count;
00041 
00042 for (i=0; i<symCount; i += lineSize)
00043     {
00044     lineSize = symCount - i;
00045     if (lineSize > maxLineSize) lineSize = maxLineSize;
00046     mustWrite(f, qSym+i, lineSize);
00047     count = nonDashCount(qSym+i, lineSize);
00048     if (qStrand == '-')
00049         count = -count;
00050     qOffset += count;
00051     fprintf(f, " %9d\n", qOffset);
00052     printMatchers(qSym+i, tSym+i, lineSize, f);
00053     fputc('\n', f);
00054     mustWrite(f, tSym+i, lineSize);
00055     count = nonDashCount(tSym+i, lineSize);
00056     if (tStrand == '-')
00057         count = -count;
00058     tOffset += count;
00059     fprintf(f, " %9d\n", tOffset);
00060     mustWrite(f, hSym+i, lineSize);
00061     fputc('\n', f);
00062     fputc('\n', f);
00063     }
00064 }

Here is the call graph for this function:


Variable Documentation

char const rcsid[] = "$Id: xenshow.c,v 1.5 2003/05/06 07:33:44 kate Exp $" [static]

Definition at line 9 of file xenshow.c.


Generated on Tue Dec 25 20:23:27 2007 for blat by  doxygen 1.5.2