lib/jointalign.c File Reference

#include "common.h"
#include "errabort.h"
#include "jointalign.h"

Include dependency graph for jointalign.c:

Go to the source code of this file.

Functions

void htmlPrintJointAlignment (char *seq1, char *seq2, int columnNum, int start, int end, char *strand)
void htmlPrintJointAlignmentLine (char *seq1, char *seq2, int start, int end)
boolean ucaseMatch (char a, char b)
void validateSeqs (char *seq1, char *seq2)

Variables

static char const rcsid [] = "$Id: jointalign.c,v 1.11 2003/05/06 07:33:43 kate Exp $"


Function Documentation

void htmlPrintJointAlignment ( char *  seq1,
char *  seq2,
int  columnNum,
int  start,
int  end,
char *  strand 
)

Definition at line 13 of file jointalign.c.

References htmlPrintJointAlignmentLine(), min, and validateSeqs().

00019 {
00020 int i;
00021 validateSeqs( seq1, seq2 );
00022 
00023 /*print the sequences with lines connecting identical residues
00024  *in columns of size columnNum*/
00025 for( i=0; i<strlen(seq1); i += columnNum )
00026     htmlPrintJointAlignmentLine(seq1, seq2, i, min(i+columnNum, strlen(seq1)));
00027 
00028 /*printf( "<tt><hr><br>%s<br>%s<br></tt>", seq1, seq2 );*/
00029 
00030 }

Here is the call graph for this function:

void htmlPrintJointAlignmentLine ( char *  seq1,
char *  seq2,
int  start,
int  end 
)

Definition at line 32 of file jointalign.c.

References ucaseMatch().

Referenced by htmlPrintJointAlignment().

00035 {
00036 
00037 int i;
00038 printf("<tt>");
00039 for( i=start; i<end; i++ )
00040     printf("%c",seq1[i]);
00041 printf("<br>");
00042 for( i=start; i<end; i++ )
00043     {
00044     if(ucaseMatch( seq1[i], seq2[i] ))
00045         printf("|");
00046     else
00047         printf("&nbsp;");
00048     }
00049 printf("<br>");
00050 for( i=start; i<end; i++ )
00051     printf("%c",seq2[i]);
00052 printf("</tt>");
00053 printf("<br><br>");
00054    
00055 
00056 }

Here is the call graph for this function:

Here is the caller graph for this function:

boolean ucaseMatch ( char  a,
char  b 
)

Definition at line 58 of file jointalign.c.

References FALSE, and TRUE.

Referenced by htmlPrintJointAlignmentLine().

00060 {
00061 if( toupper( a ) == toupper( b ) )
00062     return( TRUE );
00063 else 
00064     return( FALSE );
00065 }

Here is the caller graph for this function:

void validateSeqs ( char *  seq1,
char *  seq2 
)

Definition at line 67 of file jointalign.c.

References errAbort().

Referenced by htmlPrintJointAlignment().

00069 {
00070 if( strlen(seq1) != strlen(seq2) )
00071     {
00072     printf("%s<br>%s<br>", seq1, seq2 );
00073     errAbort("The sequences are not properly aligned (different lengths)<br>\n"); 
00074     }
00075 }

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

char const rcsid[] = "$Id: jointalign.c,v 1.11 2003/05/06 07:33:43 kate Exp $" [static]

Definition at line 10 of file jointalign.c.


Generated on Tue Dec 25 19:56:49 2007 for blat by  doxygen 1.5.2