e6775d01a591715928bcdce52c694744cc498caa braney Thu Oct 17 15:21:35 2013 -0700 implement maf output in table browser diff --git src/hg/hgTables/mainPage.c src/hg/hgTables/mainPage.c index 018cfe2..0c9d284 100644 --- src/hg/hgTables/mainPage.c +++ src/hg/hgTables/mainPage.c @@ -481,55 +481,59 @@ struct outputType otPal = { NULL, outPalOptions, "CDS FASTA alignment from multiple alignment", }; struct outputType otGff = { NULL, outGff, "GTF - gene transfer format", }; struct outputType otBed = { NULL, outBed, "BED - browser extensible data", }; struct outputType otCustomTrack = { NULL, outCustomTrack, "custom track", }; struct outputType otHyperlinks = { NULL, outHyperlinks, "hyperlinks to Genome Browser", }; struct outputType otWigData = { NULL, outWigData, "data points", }; struct outputType otWigBed = { NULL, outWigBed, "bed format", }; struct outputType otMaf = { NULL, outMaf, "MAF - multiple alignment format", }; struct outputType otChromGraphData = { NULL, outChromGraphData, "data points", }; struct outputType otMicroarrayNames = { NULL, outMicroarrayNames, "microarray names", }; struct outputType otMicroarrayGroupings = { NULL, outMicroarrayGroupings, "microarray groupings", }; static void showOutputTypeRow(boolean isWig, boolean isBedGr, boolean isPositional, boolean isMaf, boolean isChromGraphCt, - boolean isPal, boolean isMicroarray) + boolean isPal, boolean isMicroarray, boolean isHalSnake) /* Print output line. */ { struct outputType *otList = NULL, *otDefault = NULL; boolean bedifiedOnly = (anySubtrackMerge(database, curTable) || anyIntersection()); hPrintf("output format:\n"); if (isBedGr) { if (! bedifiedOnly) { slAddTail(&otList, &otAllFields); slAddTail(&otList, &otSelected); } slAddTail(&otList, &otWigData); slAddTail(&otList, &otWigBed); slAddTail(&otList, &otCustomTrack); } else if (isWig) { slAddTail(&otList, &otWigData); slAddTail(&otList, &otWigBed); slAddTail(&otList, &otCustomTrack); } +else if (isHalSnake) + { + slAddTail(&otList, &otMaf); + } else if (isMaf) { slAddTail(&otList, &otMaf); if (! bedifiedOnly) slAddTail(&otList, &otAllFields); } else if (isChromGraphCt) { slAddTail(&otList, &otChromGraphData); } else if (isMicroarray) { slAddTail(&otList, &otMicroarrayNames); slAddTail(&otList, &otAllFields); slAddTail(&otList, &otSelected); @@ -560,31 +564,31 @@ } void nbSpaces(int count) /* Print some non-breaking spaces. */ { int i; for (i=0; i\n"); /* Print clade, genome and assembly line. */ { if (gotClade) { hPrintf("clade:\n"); printCladeListHtml(hGenome(database), onChangeClade()); nbSpaces(3); hPrintf("genome:\n"); printGenomeListForCladeHtml(database, onChangeOrg()); } @@ -631,30 +635,31 @@ hPrintf(""); curTable = showTableField(curTrack, hgtaTable, TRUE); if (isHubTrack(curTable) || (strchr(curTable, '.') == NULL)) /* In same database */ { hti = getHti(database, curTable, conn); isPositional = htiIsPositional(hti); } isBam = isBamTable( curTable); isVcf = isVcfTable( curTable); isWig = isWiggle(database, curTable); if (isBigWigTable(curTable)) { isPositional = TRUE; isWig = TRUE; } + isHalSnake = isHalTable( curTable); isMaf = isMafTable(database, curTrack, curTable); isBedGr = isBedGraph(curTable); isArray = isMicroarray(curTrack, curTable); struct trackDb *tdb = findTdbForTable(database, curTrack, curTable, ctLookupName); isPal = isPalCompatible(conn, tdb, curTable); nbSpaces(1); if (isCustomTrack(curTable)) { isChromGraphCt = isChromGraph(tdb); } cgiMakeButton(hgtaDoSchema, "describe table schema"); hPrintf("\n"); } if (curTrack == NULL) @@ -831,31 +836,31 @@ { hPrintf("
 (debug: '%s', '%s(%s)')", curTrack->type, tdb2->type, table2); } /* debugging debug ^^^^^ */ #endif } else cgiMakeButton(hgtaDoCorrelatePage, "create"); hPrintf("\n"); } /* Print output type line. */ -showOutputTypeRow(isWig, isBedGr, isPositional, isMaf, isChromGraphCt, isPal, isArray); +showOutputTypeRow(isWig, isBedGr, isPositional, isMaf, isChromGraphCt, isPal, isArray, isHalSnake); /* Print output destination line. */ { char *compressType = cartUsualString(cart, hgtaCompressType, textOutCompressNone); char *fileName = cartUsualString(cart, hgtaOutFileName, ""); hPrintf("\n"); hPrintf("output file: "); cgiMakeTextVar(hgtaOutFileName, fileName, 29); hPrintf(" (leave blank to keep output in browser)\n"); hPrintf("\n"); hPrintf("file type returned: "); cgiMakeRadioButton(hgtaCompressType, textOutCompressNone, sameWord(textOutCompressNone, compressType)); hPrintf(" plain text  ");