JPRED-2 Add alscript to the Git repository
[jpred.git] / sources / alscript / src / array.h
1 /* Matrix file structure - eg. Dayhoffs matrix */
2
3 struct pmatrix {
4     char *title;    /* title of matrix */
5     char *indx;     /* Index to matrix - ie amino acid codes */
6     int  inlen;     /* number of residues per line */
7     int **array;    /* the actual pair score array */
8 };
9
10 /* Standard structure for storing protein sequence data */
11
12 struct seqdat { /* all lengths include char terminator and [0] */
13     int ilen;   /* length of identifier*/
14     char *id;   /* identifier */
15     int tlen;   /* length of title */
16     char *title;        /* title */
17     int slen;   /* length of sequence*/
18     char *seq;  /* sequence */
19 };
20
21 /* smseq Structure to store the details of an alignment - the alignment
22 itself is stored in an array of seqdat structures
23 */
24
25 struct smseq {
26         int nseq;               /* number of seqs in the alignment */
27         int blen;               /* length of the alignment = no of residues +2 */
28         char *title;            /* a name for the alignment */
29         int ninfo;              /* number of lines of info */
30         char **info;            /* optional information about the alignment */
31         char *gapchars;         /* string of valid gap-characters */
32 };
33
34
35 /*  mseq Structure for storing multiply aligned sequence data - 
36     arranged so that
37     aligned positions in different sequences are adjacent 
38     This structure could easily be extended to include additional annotations
39     (eg. the name of the alignment, its history, etc. etc.) can be added
40     without having to modify existing code (I hope..)
41     */
42
43 struct sident {
44     char *id;       /* sequence id */
45     char *title;    /* sequence title */
46     int uid;        /* unique identifier number for sequence */
47 };
48
49 struct alseq {
50     char *line;     /* one position in the sequence alignment */
51 };
52
53 struct mseq {
54     int nseq;           /* number of sequences in this aligned bloc */
55     int blen;           /* overall aligned length of the bloc */
56     struct sident *itd; /* list of id,title,uid structures */
57     struct alseq *bloc; /* pointer to list of blen lines of the alignment
58                            structure used to allow future expansion of info
59                            on a per-aligned line basis (eg. presence of 
60                            flexible gap, etc)*/
61 };
62
63 /* structure to hold default values for id lengths etc. */
64 struct defstr {
65         int maxilen;    /* max id len */
66         int maxtlen;    /* max title len */
67         int maxslen;    /* max sequence length */
68 };
69
70
71
72
73