示例#1
0
void doParDetails(struct trackDb *tdb, char *name)
/* show details of a PAR item. */
{
// load entire PAR table (t's tiny) and partition
struct bed *pars = loadParTable(tdb);
if (slCount(pars) & 1)
    errAbort("par items not paired in %s", tdb->table);

struct bed *clickedPar = getClickedPar(name, &pars);
struct bed *homPar = getHomologousPar(clickedPar, &pars);
slSort(&pars, parCmp);

cartWebStart(cart, database, "Pseudoautosomal regions");
webPrintLinkTableStart();

// header
webPrintLabelCell("");
webPrintLabelCell("Selected PAR");
webPrintLabelCell("Homologous PAR");

// selected
webPrintLinkTableNewRow();
printHomPairRow(clickedPar, homPar);
if (pars != NULL)
    printOtherPars(clickedPar, pars);

webPrintLinkTableEnd();
printTrackHtml(tdb);
webEnd();

bedFreeList(&pars);
bedFree(&clickedPar);
bedFree(&homPar);
}
示例#2
0
void doMiddle(struct cart *cart)
/* Write body of web page. */
{
struct trackDb *tdbList = NULL;
char *organism = NULL;
char *db = NULL;
getDbAndGenome(cart, &db, &organism, NULL);
char *chrom = cartUsualString(cart, "c", hDefaultChrom(db));
measureTiming = isNotEmpty(cartOptionalString(cart, "measureTiming"));

// QUESTION: Do We need track list ???  trackHash ??? Can't we just get one track and no children
trackHash = trackHashMakeWithComposites(db,chrom,&tdbList,FALSE);

cartWebStart(cart, db, "Search for " FILE_SEARCH_WHAT " in the %s %s Assembly", 
             organism, hFreezeFromDb(db));

webIncludeResourceFile("HGStyle.css");
webIncludeResourceFile("jquery-ui.css");
webIncludeResourceFile("ui.dropdownchecklist.css");
jsIncludeFile("jquery.js", NULL);
jsIncludeFile("jquery-ui.js", NULL);
jsIncludeFile("ui.dropdownchecklist.js",NULL);
jsIncludeFile("utils.js",NULL);

// This line is needed to get the multi-selects initialized
jsIncludeFile("ddcl.js",NULL);
printf("<script type='text/javascript'>$(document).ready(function() "
       "{ findTracks.updateMdbHelp(0); });</script>\n");

doFileSearch(db,organism,cart,tdbList);


printf("<BR>\n");
webEnd();
}
示例#3
0
void doMiddle(struct cart *theCart)
/* Set up a few preliminaries and dispatch to a
 * particular form. */
{
cart = theCart;
char headerText[256];
int redirDelay = 5;
safef(headerText, sizeof(headerText),
      "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"%d;URL=%s\">",
      redirDelay, hgTextName());
webStartHeader(cart, headerText, "hgBatch: replaced by hgText");
puts("The Table Browser now supports batch queries, so this page "
     "has been retired.  \n"
     "You will be automatically redirected to the Table Browser in ");
printf("%d seconds, or you can <BR>\n"
       "<A HREF=\"%s\">click here to continue</A>.\n",
       redirDelay, hgTextName());
webEnd();
}
示例#4
0
文件: web.c 项目: elmargb/kentUtils
void webAbort(char* title, char* format, ...)
/* an abort function that outputs a error page */
{
va_list args;
va_start(args, format);

/* output the header */
if(!webHeadAlreadyOutputed)
    webStart(errCart, NULL, title);

/* in text mode, have a different error */
if(webInTextMode)
	printf("\n\n\n          %s\n\n", title);

vprintf(format, args);
printf("<!-- HGERROR -->\n");
printf("\n\n");

webEnd();

va_end(args);
exit(0);
}
示例#5
0
void doInitialPage()
/* Put up page with search box that explains program and
 * some good things to search on. */
{
char *listSpec = NULL;

webStartWrapperDetailedNoArgs(cart, NULL, "", "VisiGene Image Browser",
        FALSE, FALSE, FALSE, TRUE);

printf("<FORM ACTION=\"%s\" METHOD=GET>\n",
	hgVisiGeneCgiName());
puts("<P>VisiGene is a virtual microscope for viewing <em>in situ</em> images. \n"
"These images show where a gene is used in an organism, sometimes down to \n"
"cellular resolution. With VisiGene users can retrieve images that meet specific "
"search criteria, then interactively zoom and scroll across the collection.</P>\n");
printf("<CENTER>");
listSpec = cartUsualString(cart, hgpListSpec, "");
cgiMakeTextVar(hgpListSpec, listSpec, 30);
cgiMakeButton(hgpDoSearch, "search");
printf("<BR>\n");
printf("</CENTER>");
puts(
"<P>Good search terms include gene symbols, authors, years, body parts,\n"
"organisms, GenBank and UniProt accessions, Known Gene descriptive terms,\n"
"<A HREF=\"http://genex.hgu.mrc.ac.uk/Atlas/intro.html\" \n"
"TARGET=_blank>Theiler</A> stages for mice, and \n"
"<A HREF=\"http://www.xenbase.org/atlas/NF/NF-all.html\" \n"
"TARGET=_blank>Nieuwkoop/Faber</A> stages for frogs. The wildcard characters\n"
"* and ? work with gene symbols; otherwise the full word must match.</P>\n"
"<P> \n"
"<H3>Sample queries</H3> \n"
"<TABLE  border=0 CELLPADDING=0 CELLSPACING=0> \n"
"    <TR><TD VALIGN=Top NOWRAP><B>Request:</B><BR></TD> \n"
"        <TD VALIGN=Top COLSPAN=2><B>&nbsp;&nbsp; VisiGene Response:</B><BR></TD> \n"
"    </TR> \n"
// "    <TR><TD VALIGN=Top><BR></TD></TR> \n"
"    <TR><TD VALIGN=Top NOWRAP>nkx2-2</TD> \n"
"        <TD WIDTH=14></TD> \n"
"        <TD VALIGN=Top>Displays images associated with the gene nkx2-2</TD>\n"
"    </TR> \n"
"    <TR><TD VALIGN=Top NOWRAP>hoxa*</TD> \n"
"        <TD WIDTH=14></TD> \n"
"        <TD VALIGN=Top>Displays images of all genes in the Hox-A cluster (Note: * works only at the end of the word)</TD>\n"
"    </TR> \n"
"    <TR><TD VALIGN=Top NOWRAP>NM_007492</TD> \n"
"        <TD WIDTH=14></TD> \n"
"        <TD VALIGN=Top>Displays images associated with accession NM_007492</TD> \n"
"    </TR> \n"
"    <TR><TD VALIGN=Top NOWRAP>theiler 22</TD> \n"
"        <TD WIDTH=14></TD> \n"
"        <TD VALIGN=Top>Displays all images that show Theiler stage 22</TD> \n"
"    </TR> \n"
"    <TR><TD VALIGN=Top NOWRAP>vgPrb_16</TD> \n"
"        <TD WIDTH=14></TD> \n"
"        <TD VALIGN=Top>Displays images associated with VisiGene probe ID 16</TD> \n"
"    </TR> \n"
"    <TR><TD VALIGN=Top NOWRAP>allen institute</TD> \n"
"        <TD WIDTH=14></TD> \n"
"        <TD VALIGN=Top>Displays all images from the Allen Brain Atlas</TD> \n"
"    </TR> \n"
"    <TR><TD VALIGN=Top NOWRAP>mouse</TD> \n"
"        <TD WIDTH=14></TD> \n"
"        <TD VALIGN=Top>Displays all mouse images </TD> \n"
"    </TR> \n"
"    <TR><TD VALIGN=Top NOWRAP>xenopus</TD> \n"
"        <TD WIDTH=14></TD> \n"
"        <TD VALIGN=Top>Displays all images associated with frogs of genus Xenopus </TD>\n"
"    </TR> \n"
"    <TR><TD VALIGN=Top NOWRAP>mouse midbrain</TD> \n"
"        <TD WIDTH=14></TD> \n"
"        <TD VALIGN=Top>Displays mouse images that show expression in the "
"midbrain</TD> \n"
"    </TR> \n"
"    <TR><TD VALIGN=Top NOWRAP>smith jc 1994</TD> \n"
"        <TD WIDTH=14></TD> \n"
"        <TD VALIGN=Top>Displays images contributed by scientist J.C. Smith "
"in 1994</TD> \n"
"    </TR> \n"
"</TABLE> \n"
);
printf("</FORM>\n");
doHelp();
webEnd();
}