Skip to content
Snippets Groups Projects
Commit 8bd2f5fb authored by rnc's avatar rnc
Browse files

merged display code with main app, moved zmapDNAColumn() to zmapcols.c

parent 7f800ec6
Branches
Tags
No related merge requests found
/* Last edited: Apr 15 12:49 2004 (rnc) */
/* Last edited: Jun 22 12:22 2004 (rnc) */
/* file: zmapsequence.c
* Author: Simon Kelley (srk@sanger.ac.uk)
* Copyright (c) Sanger Institute, 2003
......@@ -25,70 +25,11 @@
* Simon Kelley (Sanger Institute, UK) srk@sanger.ac.uk
*/
#include <../acedb/graph.h>
#include <../acedb/gex.h>
#include <../acedb/dna.h>
#include <seqregion.h>
#include <zmapcontrol.h>
//#include <wh/graph.h>
//#include <wh/gex.h>
//#include <wzmap/seqregion.h>
//#include <wzmap/zmapcontrol.h>
#ifdef ZMAP
void zMapDNAColumn(ZMapWindow *window, ZMapColumn *col,
float *offsetp, int frame)
{
float offset = *offsetp;
float max = offset;
Coord seqstart = srCoord(window->root->region, window->centre) -
(window->graphHeight * window->basesPerLine) / 2;
Coord seqend = srCoord(window->root->region, window->centre) +
(window->graphHeight * window->basesPerLine) / 2;
Coord i;
if (seqstart < window->root->region->area1)
seqstart = window->root->region->area1;
if (seqend > window->root->region->area2)
seqend = window->root->region->area2;
if (!srGetDNA(window->root->region))
return;
for (i = seqstart; i < seqend; i += window->basesPerLine)
{
char *dnap, buff[10];
int j;
ScreenCoord y = zmScreenCoord(window, i);
sprintf(buff, "%7d", zmVisibleCoord(window->root, i));
graphText(buff, offset, y);
dnap = arrp(window->root->region->dna,
i - (window->root->region->area1-1),
char);
for (j = 0; j < window->basesPerLine; j++)
{
float x = offset+8+j;
buff[0] = dnaDecodeChar[(int)*(dnap+j)];
buff[1] = 0;
graphText(buff, x, y);
if (j+i > window->root->region->area2)
break;
if (j+1 == window->DNAwidth)
{
graphText("...", x+1, y);
j = window->basesPerLine;
x += 4;
}
if (x > max)
max = x;
}
}
*offsetp = max+1;
}
#endif
/********************* end of file ********************************/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment