/* * $Id: PrintBanner.c,v 1.2 2003/01/22 17:12:50 chenj Exp $ * * * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Work" under the * terms of the United States Copyright Act. It was written as part of * the author's official duties as a United States Government employee and * thus cannot be copyrighted. This software/database is freely available * to the public for use. The National Library of Medicine and the U.S. * Government have not placed any restriction on its use or reproduction. * * Although all reasonable efforts have been taken to ensure the accuracy * and reliability of the software and data, the NLM and the U.S. * Government do not and cannot warrant the performance or results that * may be obtained by using this software or data. The NLM and the U.S. * Government disclaim all warranties, express or implied, including * warranties of performance, merchantability or fitness for any particular * purpose. * * Please cite the author in any work or product based on this material. * * =========================================================================== * * * Author: Jie Chen * * * $Log: PrintBanner.c,v $ * Revision 1.2 2003/01/22 17:12:50 chenj * Get Cn3D 4.1 * * Revision 1.1.1.1 2002/12/06 20:17:21 chenj * Imported Scouces * * * * * This file is used to print the html head. * * ========================================================================== */ #include #include #include "vastgenDB.h" #define DISP_IN_GRAPH 'n' #define DISP_IN_TABLE 'y' extern char URLcgi[PATH_MAX]; extern char CGIname[PATH_MAX]; extern char MMDBCGIname[PATH_MAX]; extern Uint1 numSubsets; extern Boolean SubsetInfoLoaded; /*extern CTLibUtilsPtr db_conn1; */ extern Int4 aSdi; void PrintHitsSortBanner(FILE *table, SortBy sortby, SubSetID subsetnum, Int4 pagenum, Int4 numpages, Char cTable) { Int4 i, j, k; static char subsetname[6][100]={"NR, Blast_p<10e-7", "NR, Blast_p<10e-40", "NR, Blast_p<10e-80", "Non-identical seq.", "All of MMDB", "Selected neighbor(s)"}; fprintf(table, "\n\n"); /* Use the Form created in PrintAlignViewBanner */ fprintf(table, "\n", subsetnum); fprintf(table, " "); fprintf(table, "\n"); /* Insert a blank row */ fprintf(table, "\n\n"); fprintf(table, "\n\n\n
"); fprintf(table, ""); fprintf(table, "  subset "); fprintf(table, "\n"); fprintf(table, "\n\n"); fprintf(table, " sorted by \n"); fprintf(table, "\n"); if (pagenum && numpages > 1) { fprintf(table, " page \n"); fprintf(table, "\n"); } fprintf(table, " in \n"); fprintf(table, "\n"); fprintf(table, "
\n\n\n\n\n"); } /* end of PrintHitsSortBanner */ void PrintAlignViewBanner(FILE *table, Int4 iFSID, VastPageDataPtr vpp, Int4 numhitsdisplayed, CharPtr JobID, CharPtr pcPass) { Int4 i; Char str[50], AllId[MAX_TBUFF]; fprintf(table, "\n\n"); /* Create one Form with 3 submits */ fprintf(table, "
\n", URLcgi, CGIname); if (JobID) fprintf(table, "\n", iFSID); else fprintf(table, "\n", aSdi); if (JobID) { fprintf(table, "\n", JobID); fprintf(table, "\n", pcPass); } sprintf(AllId, "%d,", iFSID*10); for (i=0; i< numhitsdisplayed; i++) { sprintf(str, "%d,", vpp[i].bBsfId); StringCat(AllId, str); } fprintf(table, "\n", AllId); fprintf(table, "\n",vpp[0].bBsfId); fprintf(table, ""); fprintf(table, " \n"); fprintf(table, "\n\n\n
\n"); fprintf(table, ""); fprintf(table,""); fprintf(table, "  of \n\n"); fprintf(table, "\n\n"); fprintf(table, " with \n\n"); fprintf(table, "\n\n"); fprintf(table, "\n\n"); fprintf(table, "\"New\"\n"); fprintf(table, "Get Cn3D 4.1!"); fprintf(table, "
\n\n"); fprintf(table, "\n\n\n"); fprintf(table, "\n\n"); fprintf(table, " "); fprintf(table, "\n"); /* Insert a blank row */ fprintf(table, "\n\n"); fprintf(table, "\n\n\n
\n"); fprintf(table, ""); fprintf(table,""); fprintf(table, "  using \n\n"); fprintf(table, "\n\n"); fprintf(table, " for \n"); fprintf(table, "\n\n"); fprintf(table, " VAST neighbors\n"); fprintf(table, "
\n"); fprintf(table, "\n\n\n"); } /* end PrintAlignViewBanner */ void PrintQueryInfo(FILE *table, CharPtr pcPDB, Char cChain, int iDomain, Int4 iMMDBid, CharPtr JobID) { Char title[MAX_TBUFF]; fprintf(table, "\n\n"); fprintf(table, "\n"); /* insert two blank rows for spacing */ fprintf(table, "\n"); fprintf(table, "\n"); fprintf(table, "\n\n"); fprintf(table, "\n"); fprintf(table, "\n"); fprintf(table, "\n\n\n"); if (!JobID && constructPdbDescr(iMMDBid, title, MAX_TBUFF)) { fprintf(table, "\n"); fprintf(table, "\n"); fprintf(table, "\n\n\n"); } fprintf(table, "
"); fprintf(table, "Query:"); if (iMMDBid && !JobID) { fprintf(table, "MMDB "); fprintf(table, "%d", (long)iMMDBid); fprintf(table, ", "); } if (pcPDB[0] != NULLB) fprintf(table, "%s", pcPDB); if (cChain != ' ') fprintf(table, " chain %c", cChain); if (iDomain > 0) fprintf(table, " domain %d", (int) iDomain); if (JobID != NULL) { fprintf(table, ", "); fprintf(table, " Vast Search Job %s", JobID); } fprintf(table, "
\n"); fprintf(table, "Description:%s", title); fprintf(table, "
\n"); fprintf(table, "\n\n\n"); } /* end PrintQueryInfo */ void PrintSearchNbr(FILE *table) { Int4 i, j; fprintf(table, "\n\n"); fprintf(table, " "); fprintf(table, "\n"); /* Insert a blank row */ fprintf(table, "\n\n"); /* use the form created in PrintAlignViewBanner */ fprintf(table, "\n\n"); /* fprintf(table, ""); */ fprintf(table, "\n"); fprintf(table,"\n"); /* fprintf(table, "");*/ fprintf(table, "\n\n\n"); fprintf(table, "
\n\n"); fprintf(table, "\n"); fprintf(table," MMDB or PDB ids:   or 3D-Domain ids: "); fprintf(table, "
\n"); fprintf(table, "\n\n\n"); } /* PrintSearchNbr */