/* File: blxview.h * Author: Erik Sonnhammer, 92-02-20 * Copyright (c) J Thierry-Mieg and R Durbin, 1999 * ------------------------------------------------------------------- * Acedb is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * or see the on-line version at http://www.gnu.org/copyleft/gpl.txt * ------------------------------------------------------------------- * This file is part of the ACEDB genome database package, written by * Richard Durbin (Sanger Centre, UK) rd@sanger.ac.uk, and * Jean Thierry-Mieg (CRBM du CNRS, France) mieg@kaa.crbm.cnrs-mop.fr * * Description: include file for BLXVIEW.C * Other files: iupac.h, blxview.c, translate.c * Exported functions: * HISTORY: * Last edited: Nov 29 11:21 2001 (edgrif) * * Aug 26 16:57 1999 (fw): added this header * Created: Thu Aug 26 16:57:17 1999 (fw) * CVS info: $Id: blxview.h,v 1.34 2001/11/29 12:30:59 edgrif Exp $ *------------------------------------------------------------------- */ #ifndef DEF_BLXVIEW_H #define DEF_BLXVIEW_H #define NAMESIZE 12 #define FULLNAMESIZE 255 #define INITDBSEQLEN 50000 /* Initial estimate of max database sequence length */ #define MAXLINE 10000 #define max(a,b) (((a) > (b)) ? (a) : (b)) #define min(a,b) (((a) < (b)) ? (a) : (b)) #define selectFeaturesStr "Feature series selection tool" #define FS(msp) (msp->type == FSSEG || msp->type == XY) #define XY_NOT_FILLED -1000 /* Magic value meaning "value not provided" */ /* Shapes of XY data */ enum { XY_PARTIAL, XY_INTERPOLATE, XY_BADSHAPE }; /* Types of MSP */ enum { EXBLX, SEQBL, /* Old, discontinue some time */ HSP, GSP, GSPdata, GFF, FSSEG, XY, XYdata, SEQ, SEQdata }; /* Remember to ALWAYS update blxview.c:mspcpy() when changing this !!! */ typedef struct _MSP { struct _MSP *next; int type; /* See enum above */ int score; int id; char *qname; /* For Dotter, the MSP can belong to either sequence */ char qframe[8]; int qstart; int qend; char *sname; char sframe[8]; int sstart; int send; char *sseq; char *desc; int box ; Graph graph; int color; int shape; /* For SFS data, e.g. XY type PARTIAL or INTERPOLATE shapes */ int fs; /* Ordinal number of the series that this MSP belongs to. */ Array xy; /* For XY plot series */ Array gaps; /* gaps in this homolgy */ #ifdef ACEDB KEY key; #endif } MSP; typedef struct featureSeries_ { char *name; int nr; int on; float x; /* Series offset on x axis, to bump series on the screen */ float y; /* Series offset on y axis */ int xy; /* Flag for XY plot series */ } FEATURESERIES; /* blixem can use either efetch (default) or a pfetch server to get */ /* sequences, to use pfetch you need node/port information. */ typedef struct { char *net_id ; int port ; } PfetchParams ; /* Dotter/Blixem Package-wide variables */ extern char *blixemVersion ; extern char *stdcode1[]; /* 1-letter amino acid translation code */ extern int aa_atob[]; extern int PAM120[23][23]; extern Array fsArr; /* in dotter.c */ extern Graph dotterGraph; extern float fsPlotHeight; extern GtkWidget *blixemWindow; /* Dotter/Blixem Package-wide functions */ Graph blxview (char *seq, char *seqname, int dispStart, int offset, MSP *msp, char *opts, PfetchParams *pfetch) ; Graph blxreadhsp(FILE *seqfile, FILE *exblxfile, char *featurefile, char *qname, int dispstart, int qoffset, char *opts, int *argc, char **argv); char *translate(char *seq, char **code); char *revcomp(char *comp, char *seq); void *compl(char *seq); void argvAdd(int *argc, char ***argv, char *s); void loadFeatures(FILE* fil, MSP **msp); float fs2y(MSP *msp, float *maxy, float height); char Seqtype(char *seq); void blviewRedraw(void); void selectFeatures(void); float fsTotalHeight(MSP *msplist); void parseFS(MSP **MSPlist, FILE *file, char *opts, char **seq1, char *seq1name, char **seq2, char *seq2name) ; void insertFS(MSP *msp, char *series); char *readFastaSeq(FILE *seqfile, char *qname); #endif /* !defined DEF_BLXVIEW_H */