コード例 #1
0
int
main( int argc, char **argv ) {

    signal( SIGPIPE, SIG_IGN );


    const char * optStr = "ah";
    rodsArguments_t myRodsArgs;
    int status = parseCmdLineOpt( argc, argv, optStr, 0, &myRodsArgs );

    if ( status < 0 ) {
        printf( "Use -h for help\n" );
        return 1;
    }

    if ( myRodsArgs.help == True ) {
        usage();
        return 0;
    }

    if ( myRodsArgs.all == True ) {
        for ( unsigned int i = 0; i < sizeof( icmds ) / sizeof( icmds[0] ); ++i ) {
            std::string myExe( icmds[i] );
            myExe += " -h";
            status = system( myExe.c_str() );
            if ( status ) {
                printf( "error %d running %s\n", status, myExe.c_str() );
            }
        }
        return 0;
    }

    if ( argc == 1 ) {
        printMainHelp();
    }
    else if ( argc == 2 ) {
        for ( unsigned int i = 0; i < sizeof( icmds ) / sizeof( icmds[0] ); ++i ) {
            if ( strcmp( argv[1], icmds[i] ) == 0 ) {
                std::string myExe( icmds[i] );
                myExe += " -h";
                status = system( myExe.c_str() );
                if ( status ) {
                    printf( "error %d running %s\n", status, myExe.c_str() );
                }
                return 0;
            }
        }
        printf( "%s is not an iCommand\n", argv[1] );
    }

    return 0;
}
コード例 #2
0
ファイル: mainPage.c プロジェクト: davidhoover/kent
void mainPageAfterOpen(struct sqlConnection *conn)
/* Put up main page assuming htmlOpen()/htmlClose()
 * will happen in calling routine. */
{
hPrintf(
  "Use this program to retrieve the data associated with a track in text "
  "format, to calculate intersections between tracks, and to retrieve "
  "DNA sequence covered by a track. For help in using this application "
  "see <A HREF=\"#Help\">Using the Table Browser</A> for a description "
  "of the controls in this form, the "
  "<A HREF=\"../goldenPath/help/hgTablesHelp.html\">User's Guide</A> for "
  "general information and sample queries, and the OpenHelix Table Browser "
  "<A HREF=\"http://www.openhelix.com/cgi/tutorialInfo.cgi?id=28\" "
  "TARGET=_blank>tutorial</A> for a narrated presentation of the software "
  "features and usage. "
  "For more complex queries, you may want to use "
  "<A HREF=\""GALAXY_URL_BASE"\" target=_BLANK>Galaxy</A> or "
  "our <A HREF=\"../goldenPath/help/mysql.html\">public "
  "MySQL server</A>. "
  "To examine the biological function of your set through annotation "
  "enrichments, send the data to "
  "<A HREF=\"http://great.stanford.edu\" target=_BLANK>GREAT</A>. "
  "%s"
  "Refer to the "
  "<A HREF=\"../goldenPath/credits.html\">Credits</A> page for the list of "
  "contributors and usage restrictions associated with these data. "
  "All tables can be downloaded in their entirety from the "
  "<A HREF=\"http://hgdownload.cse.ucsc.edu/downloads.html\""
  ">Sequence and Annotation Downloads</A> page."
   , getGenomeSpaceText()
   );

hPrintf("<script type=\"text/javascript\">\n");
// When GREAT is selected, disable the other checkboxes and force output to BED
hPrintf("function onSelectGreat() {\n");
hPrintf("document.getElementById('checkboxGalaxy').checked=false;\n");
if (isGenomeSpaceEnabled())
    hPrintf("document.getElementById('checkboxGenomeSpace').checked=false;\n");
hPrintf("document.getElementById('outBed').selected=true;\n");
hPrintf("return true;\n");
hPrintf("}\n");
// Disable/enable noGenome tracks depending on whether region is genome.
hPrintf("function maybeDisableNoGenome() {\n"
        "   var regionTypeSelected = $('input[name=\"hgta_regionType\"]:checked').val();\n"
        "   var regionIsGenome = (regionTypeSelected === 'genome');\n"
        "   var $noGenomeOptions = $('select[name=\"hgta_track\"] option.hgtaNoGenome');\n"
        "   $noGenomeOptions.attr('disabled', regionIsGenome)\n"
        "                   .css('color', regionIsGenome ? '' : 'black');\n"
        "}\n"
        "$(document).ready(function() {\n"
        // once when the page loads, and every time the user changes the region type:
        "    maybeDisableNoGenome();\n"
        "    $('input[name=\"hgta_regionType\"]').change(maybeDisableNoGenome);\n"
        "});\n"
        "</script>\n");

/* Main form. */
hPrintf("<FORM ACTION=\"%s\" NAME=\"mainForm\" METHOD=%s>\n",
	getScriptName(), cartUsualString(cart, "formMethod", "POST"));
cartSaveSession(cart);
jsInit();
showMainControlTable(conn);
hPrintf("</FORM>\n");

/* Hidden form - for benefit of javascript. */
    {
    static char *saveVars[] = {
      "clade", "org", "db", hgtaGroup, hgtaTrack, hgtaTable, hgtaRegionType,
      hgtaRange, hgtaOutputType, hgtaOutFileName};
    jsCreateHiddenForm(cart, getScriptName(), saveVars, ArraySize(saveVars));
    }

/* Hidden form for jumping to custom tracks CGI. */
hPrintf("<FORM ACTION='%s' NAME='customTrackForm'>", hgCustomName());
cartSaveSession(cart);
hPrintf("</FORM>\n");

/* Hidden form for jumping to track hub manager CGI. */
hPrintf("<FORM ACTION='%s' NAME='trackHubForm'>", hgHubConnectName());
cartSaveSession(cart);
hPrintf("</FORM>\n");

webNewSection("<A NAME=\"Help\"></A>Using the Table Browser\n");
printMainHelp();
cartFlushHubWarnings();
}
コード例 #3
0
ファイル: mainPage.c プロジェクト: bowhan/kent
void mainPageAfterOpen(struct sqlConnection *conn)
/* Put up main page assuming htmlOpen()/htmlClose()
 * will happen in calling routine. */
{
hPrintf("%s",
  "Use this program to retrieve the data associated with a track in text "
  "format, to calculate intersections between tracks, and to retrieve "
  "DNA sequence covered by a track. For help in using this application "
  "see <A HREF=\"#Help\">Using the Table Browser</A> for a description "
  "of the controls in this form, the "
  "<A HREF=\"../goldenPath/help/hgTablesHelp.html\">User's Guide</A> for "
  "general information and sample queries, and the OpenHelix Table Browser "
  "<A HREF=\"http://www.openhelix.com/cgi/tutorialInfo.cgi?id=28\" "
  "TARGET=_blank>tutorial</A> for a narrated presentation of the software "
  "features and usage. "
  "For more complex queries, you may want to use "
  "<A HREF=\""GALAXY_URL_BASE"\" target=_BLANK>Galaxy</A> or "
  "our <A HREF=\"../goldenPath/help/mysql.html\">public "
  "MySQL server</A>. "
  "To examine the biological function of your set through annotation "
  "enrichments, send the data to "
  "<A HREF=\"http://great.stanford.edu\">GREAT</A>. Refer to the "
  "<A HREF=\"../goldenPath/credits.html\">Credits</A> page for the list of "
  "contributors and usage restrictions associated with these data. "
  "All tables can be downloaded in their entirety from the "
  "<A HREF=\"http://hgdownload.cse.ucsc.edu/downloads.html\""
  ">Sequence and Annotation Downloads</A> page."
   );

hPrintf("<script type=\"text/javascript\">\n");
hPrintf("function onSelectGreat() {\n");
hPrintf("document.getElementById('checkboxGalaxy').checked=false;\n");
hPrintf("document.getElementById('outBed').selected=true;\n");
hPrintf("return true;\n");
hPrintf("}\n");
hPrintf("</script>\n");


/* Main form. */
hPrintf("<FORM ACTION=\"%s\" NAME=\"mainForm\" METHOD=%s>\n",
	getScriptName(), cartUsualString(cart, "formMethod", "POST"));
cartSaveSession(cart);
jsWriteFunctions();
showMainControlTable(conn);
hPrintf("</FORM>\n");

/* Hidden form - for benefit of javascript. */
    {
    static char *saveVars[] = {
      "clade", "org", "db", hgtaGroup, hgtaTrack, hgtaTable, hgtaRegionType,
      hgtaRange, hgtaOutputType, hgtaOutFileName};
    jsCreateHiddenForm(cart, getScriptName(), saveVars, ArraySize(saveVars));
    }

/* Hidden form for jumping to custom tracks CGI. */
hPrintf("<FORM ACTION='%s' NAME='customTrackForm'>", hgCustomName());
cartSaveSession(cart);
hPrintf("</FORM>\n");

/* Hidden form for jumping to track hub manager CGI. */
hPrintf("<FORM ACTION='%s' NAME='trackHubForm'>", hgHubConnectName());
cgiMakeHiddenVar(hgHubConnectCgiDestUrl, "../cgi-bin/hgTables");
cartSaveSession(cart);
hPrintf("</FORM>\n");

webNewSection("<A NAME=\"Help\"></A>Using the Table Browser\n");
printMainHelp();
}