060ada2535fca719656219c1214a3e1c16490693 tdreszer Wed Nov 9 16:06:41 2011 -0800 Moved as code in hgTables down to lib and access it from hgc and hgTrackUi. This is to remove 'extraFields' support as per Jim's request in redmine 5883 and 5582 diff --git src/hg/lib/bedDetail.c src/hg/lib/bedDetail.c index 23459e1..5dd8c15 100644 --- src/hg/lib/bedDetail.c +++ src/hg/lib/bedDetail.c @@ -227,54 +227,60 @@ fputc(sep,f); } /* last 2 should always be present */ if (sep == ',') fputc('"',f); fprintf(f, "%s", el->id); if (sep == ',') fputc('"',f); fputc(sep,f); if (sep == ',') fputc('"',f); fprintf(f, "%s", el->description); if (sep == ',') fputc('"',f); fputc(lastSep,f); } /* -------------------------------- End autoSql Generated Code -------------------------------- */ -char *bedDetailAutoSqlString = +static char *bedDetailAutoSqlString = "table bedDetail\n" "\"Browser extensible data, with extended fields for detail page\"\n" " (\n" " string chrom; \"Reference sequence chromosome or scaffold\"\n" " uint chromStart; \"Start position in chromosome\"\n" " uint chromEnd; \"End position in chromosome\"\n" " string name; \"Short Name of item\"\n" " uint score; \"Score from 0-1000\"\n" " char[1] strand; \"+ or -\"\n" " uint thickStart; \"Start of where display should be thick (start codon)\"\n" " uint thickEnd; \"End of where display should be thick (stop codon)\"\n" " uint reserved; \"Used as itemRgb as of 2004-11-22\"\n" " int blockCount; \"Number of blocks\"\n" " int[blockCount] blockSizes; \"Comma separated list of block sizes\"\n" " int[blockCount] chromStarts; \"Start positions relative to chromStart\"\n" " uint expCount; \"Number of experiment values\"\n" " int[expCount] expIds; \"Comma separated list of experiment IDs\"\n" " float[expCount] expScores; \"Comma separated list of experiment scores\"\n" " string id; \"ID to bed used in URL to link back\"\n" " lstring description; \"Long description of item for the details page\"\n" " )\n" ; +struct asObject *bedDetailAsObj() +// Return asObject describing fields of bedDetail +{ +return asParseText(bedDetailAutoSqlString); +} + struct bedDetail *bedDetailLoadWithGaps(char **row, int size) /* Load a bedDetail from row split from a file or from database, may have parts of BED not included. Dispose of this with bedDetailFree(). Size is total number of fields */ { struct bedDetail *ret; AllocVar(ret); ret->chrom = cloneString(row[0]); ret->chromStart = sqlUnsigned(row[1]); ret->chromEnd = sqlUnsigned(row[2]); ret->name = cloneString(row[3]); if (size > 6 && row[4] != NULL) ret->score = sqlUnsigned(row[4]); if (size > 7 && row[5] != NULL)