1 /*===========================================================================
2 *
3 *                            PUBLIC DOMAIN NOTICE
4 *               National Center for Biotechnology Information
5 *
6 *  This software/database is a "United States Government Work" under the
7 *  terms of the United States Copyright Act.  It was written as part of
8 *  the author's official duties as a United States Government employee and
9 *  thus cannot be copyrighted.  This software/database is freely available
10 *  to the public for use. The National Library of Medicine and the U.S.
11 *  Government have not placed any restriction on its use or reproduction.
12 *
13 *  Although all reasonable efforts have been taken to ensure the accuracy
14 *  and reliability of the software and data, the NLM and the U.S.
15 *  Government do not and cannot warrant the performance or results that
16 *  may be obtained by using this software or data. The NLM and the U.S.
17 *  Government disclaim all warranties, express or implied, including
18 *  warranties of performance, merchantability or fitness for any particular
19 *  purpose.
20 *
21 *  Please cite the author in any work or product based on this material.
22 *
23 * ===========================================================================
24 *
25 * File Name:  cblast.h
26 *
27 * Author:  Yanli Wang
28 *
29 * Initial Version Creation Date: 6/25/2002
30 *
31 * File Description:
32 *         header file for the CBLAST server CGI-bin
33 *
34 * Modifications:
35 * --------------------------------------------------------------------------
36 * $Log: cblast.h,v $
37 * Revision 1.6  2002/12/31 21:00:33  ywang
38 * read environment variables from config file
39 *
40 * Revision 1.5  2002/12/12 15:59:45  ywang
41 * wording improvement
42 *
43 *
44 *
45 * ==========================================================================
46 */
47 
48 #define MMDBCALL "http://www.ncbi.nlm.nih.gov/Structure/mmdb/mmdbsrv.cgi?uid="
49 #define ENTREZCALL "http://www.ncbi.nlm.nih.gov/entrez/utils/qmap.cgi?db=Protein&form=6&Dopt=g&uid="
50 #define WRPSBCALL "wrpsb.cgi?DATALIB=oasis_sap&INPUT_TYPE=access&GRAPH=2&FILTER=T&SEQUENCE="
51 
52 #define MaxEntryPerPage 50
53 /*---------------------------------------------------------------------------*/
54 /* static global variables                                                   */
55 /*---------------------------------------------------------------------------*/
56 static Char    URLBase[PATH_MAX];
57 static Char    URLcgi[PATH_MAX];
58 
59        Char    CGIurl[PATH_MAX];
60        Char    MMDBcgi[PATH_MAX];
61        Char    CDDhome[PATH_MAX];
62        Char    CGIName[PATH_MAX];
63        Char    CDSRVurl[PATH_MAX];
64 static Char    ENTREZurl[PATH_MAX];
65 static Char    TAXcgi[PATH_MAX];
66 static Char    MMDBurl[PATH_MAX];
67 static Char    DARTcgi[PATH_MAX];
68 static Char    DATApath[PATH_MAX];
69 static Char    REFpath[PATH_MAX];
70 static Char    DOCSUMurl[PATH_MAX];
71 static Char    MAILto[PATH_MAX];
72 static Char    LOGpath[PATH_MAX];
73 static Char    NRPDB[PATH_MAX];
74 static Char    ODBCINI[PATH_MAX];
75 static Char    DARTUSER[PATH_MAX];
76 static Char    DARTPASS[PATH_MAX];
77 static Char    DARTLIB[PATH_MAX];
78 static Char    LDLIBRARYPATH[PATH_MAX];
79 static Char    SYBASE[PATH_MAX];
80 static Char    BLASTDB[PATH_MAX];
81 static Char    NCBI[PATH_MAX];
82 
83 static Char    MMDBpath[PATH_MAX];
84 
85 Int4        maxseqlen;
86 
87 typedef struct cblastscoreinfodata{
88   float seq_identity;
89   Int2  length;
90   FloatHi      evalue;
91   FloatHi      bit_score;
92   Int4         score;
93 } CblastScoreData, PNTR CblastScoreDataPtr;
94 
95 typedef struct cblastseqinfodata{
96   Int4 gi, PDBgi, hsp;
97   /* gi-blast nr representative gi; PDBgi-gi of pdb sequence; hsp-HSP index */
98   SeqIdPtr pdbid;
99   CharPtr doc;   /* entrez docsum */
100   Boolean bRep;
101   Int2 pagenum;
102 }CblastSeqInfoData, PNTR CblastSeqInfoDataPtr;
103 
104 typedef struct blastpdbnb {
105   ValNodePtr csp; /* vnp->data.ptrvalue is CblastScoreDataPtr */
106   ValNodePtr csip; /* vnp->data.ptrvalue is CblastSeqInfoDataPtr */
107   SeqAnnotPtr sap;
108   Int4 query_length;
109   CharPtr query_title;
110   Int2 numpages;
111 } BlastPDBNb, PNTR BlastPDBNbPtr;
112 
113 typedef struct pdbidinfo {
114   SeqIdPtr pdbList;
115   ValNodePtr PDBgiList;
116 } PDBIdInfo, PNTR PDBIdInfoPtr;
117 
118 typedef ValNode NeighborInfo, FAR *NeighborInfoPtr;
119 
120 typedef struct neighborinfodata {
121   Int4                gi;
122   Int4                rank;
123   SeqIdPtr            pdbid;
124                         /* for PdbSeqIdPtr */
125   CharPtr             docsum;
126   Int4                MMDBid;
127   CharPtr             mol;
128   Uint1               chain;
129   Int4                seqlen;
130   Boolean             selected;
131   Int2                pagenum;
132   struct neighborinfodata  PNTR next;
133 } NeighborInfoData, PNTR NeighborInfoDataPtr;
134 
135 typedef struct rankinfo {
136   CharPtr             mol;
137   char               chain;
138   Int4                rank;
139 } RankInfo, PNTR RankInfoPtr;
140 
141 typedef ValNode WWWQuery, FAR *WWWQueryPtr;
142 
143 typedef struct wwwquerydata {
144   CharPtr name;
145   CharPtr value;
146 } WWWQueryData, PNTR WWWQueryDataPtr;
147 
148 typedef struct snp_feature_info {
149 Int4 gi, pos, feature_id;
150 CharPtr title, descr;
151 Int4 color, id;
152 } SnpFeatureInfo, PNTR SnpFeatureInfoPtr;
153 
154 typedef struct cdnb_info{
155 CharPtr CdName;
156 unsigned PssmId;
157 Int2 iClust, iMaprow, iColor;
158 Int4 from, to;
159 Boolean bRep, bFinished;
160 }CdNbInfo, PNTR CdNbInfoPtr;
161 
162 typedef struct maprow_info{
163 Int4 from, to;
164 Int2 iColor;
165 CharPtr CdName;
166 CharPtr cdaln;
167 unsigned PssmId;
168 }MapRowInfo, PNTR MapRowInfoPtr;
169 
170 typedef struct cd_info {
171 Int4 query_length;
172 SeqAnnotPtr sap;
173 Int2 cd_num, maprow_num;
174 ValNodePtr mapinfo;
175       /* (MapRowInfoPtr) (mapinfo->data.ptrvalue)->data.ptrvalue */
176 CdNbInfoPtr *cnip;
177 }CdInfo, PNTR CdInfoPtr;
178