#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
Include dependency graph for gor.h:
Go to the source code of this file.
Compounds | |
struct | State_ |
State_ : holds the GOR parameter table (Table) and the structural state name. More... | |
struct | Gortable_ |
Gortable_ : stores the amino acid permutation string Aaperm, the number of structural states (Statno), the length of Aaperm (Aano) and a Statno-long array (States[]) whose elements are the State_ records (see above) for each structural state. More... | |
Functions | |
Gortable_ | read_gortable (const char *Fname) |
read_gortable(Fname): reads a GOR table from the ASCII file Fname. More... | |
char* | gor_predict (const char *Seq, Gortable_ Gtbl, int *Info[]) |
gor_predict(Seq, Gtbl, Info): carries out a GOR prediction on a sequence Seq using the tables in Gtbl. More... | |
void | gor_pred (const char *Seq, Gortable_ Gtbl, int *Info[]) |
gor_pred(Seq, Gtbl, Info): carries out a GOR prediction on a sequence Seq using the tables in Gtbl. More... | |
char | pred_char (Gortable_ Gtbl, const int Infos[]) |
pred_char(Gtbl, Infos): returns a 1-letter code for the predicted conformation at a given position. More... | |
void | clean_gortable (Gortable_ *Gtbl) |
clean_gortable(Gtbl): frees up all memory allocated to Gtbl. |
Definition in file gor.h.
|
read_gortable(Fname): reads a GOR table from the ASCII file Fname. The format is rather strict in this case: the first line is the description of the table (Gtbl.Descr), the second line must have the format "# States=x", where x is a positive integer, stored in Gtbl.Statno (the number of states), the third line must contain an all-uppercase string (the amino acid permutation Gtbl.Aaperm), its length is Gtbl.Aano. The rest of the file must contain the tables for each state, starting with a line that serves as a descriptor (like "Alpha"), stored in Gtbl.States[i].Name, the first character of this string will be the one-letter code for the structural state. This is followed by a line containing a single integer, the decision constant. The following Gtbl.Aano lines must contain the info. table rows for each amino acid (GOR_POS entries), the lines follow each other in the same order as the AA codes in Gtbl.Aaperm. Rudimentary error checking is done. Return value: the complete Gtbl structure. A read error is indicated by Gtbl.Aano==0 or Gtbl.Statno==0. Referenced by Gortable_::States(). |
|
gor_predict(Seq, Gtbl, Info): carries out a GOR prediction on a sequence Seq using the tables in Gtbl. Gaps are skipped. The prediction string will contain the first char of the structural state for each residue with the highest probability and GAP characters for gaps. If Info!=NULL, then the detailed information values are returned in it. Info should be allocated as an array of int pointers long enough to hold the sequence positions. Its pointers will be set within and will point to int arrays Gtbl.Statno long. The info entries are in the same order as in Gtbl. Return value: the string holding the predicted structure codes. If Gtbl was invalid (see above) then NULL is returned. Referenced by Gortable_::States(). |
|
gor_pred(Seq, Gtbl, Info): carries out a GOR prediction on a sequence Seq using the tables in Gtbl. Gaps are skipped. The detailed information values are returned in Info[][] which should be allocated prior to the call. Info has as many rows as the length of Seq[] and as Gtbl.Statno columns. The Info entries for each pos are in the same order as in Gtbl. No error check is done here: Gtbl is assumed to be correct. This routine is a version of the gor_predict() function which is more general. Here no prediction code is generated. Referenced by Gortable_::States(). |
|
pred_char(Gtbl, Infos): returns a 1-letter code for the predicted conformation at a given position. Infos[] holds the information values for each conformation defined in Gtbl. The code is the lower-case version of the 1st char of the state names in Gtbl. Returns the code 'c' (for coil) if Gtbl is empty. Referenced by Gortable_::States(). |
|
clean_gortable(Gtbl): frees up all memory allocated to Gtbl.
Referenced by Gortable_::States(). |