src/hg/inc/makeItemsItem.h 1.3
1.3 2010/04/10 01:13:59 kent
Taking a few more steps towards making the makeItems type custom track. It actually seems to be storing ranges in the customTrash database and displaying them now based on your javascript selections!
Index: src/hg/inc/makeItemsItem.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/inc/makeItemsItem.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -B -U 1000000 -r1.2 -r1.3
--- src/hg/inc/makeItemsItem.h 9 Apr 2010 17:45:57 -0000 1.2
+++ src/hg/inc/makeItemsItem.h 10 Apr 2010 01:13:59 -0000 1.3
@@ -1,95 +1,97 @@
/* makeItemsItem.h was originally generated by the autoSql program, which also
* generated makeItemsItem.c and makeItemsItem.sql. This header links the database and
* the RAM representation of objects. */
#ifndef MAKEITEMSITEM_H
#define MAKEITEMSITEM_H
#include "jksql.h"
-#define MAKEITEMSITEM_NUM_COLS 9
+#define MAKEITEMSITEM_NUM_COLS 11
struct makeItemsItem
/* An item in a makeItems type track. */
{
struct makeItemsItem *next; /* Next in singly linked list. */
unsigned bin; /* Bin for range index */
char *chrom; /* Reference sequence chromosome or scaffold */
unsigned chromStart; /* Start position in chromosome */
unsigned chromEnd; /* End position in chromosome */
char *name; /* Name of item - up to 16 chars */
- char strand[2]; /* + or - for strand */
unsigned score; /* 0-1000. Higher numbers are darker. */
- char *color; /* Comma separated list of RGB components. IE 255,0,0 for red */
+ char strand[2]; /* + or - for strand */
+ unsigned thickStart; /* Start of thick part */
+ unsigned thickEnd; /* End position of thick part */
+ unsigned itemRgb; /* RGB 8 bits each as in bed */
char *description; /* Longer item description */
};
void makeItemsItemStaticLoad(char **row, struct makeItemsItem *ret);
/* Load a row from makeItemsItem table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct makeItemsItem *makeItemsItemLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all makeItemsItem from table that satisfy the query given.
* Where query is of the form 'select * from example where something=something'
* or 'select example.* from example, anotherTable where example.something =
* anotherTable.something'.
* Dispose of this with makeItemsItemFreeList(). */
void makeItemsItemSaveToDb(struct sqlConnection *conn, struct makeItemsItem *el, char *tableName, int updateSize);
/* Save makeItemsItem as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use makeItemsItemSaveToDbEscaped() */
void makeItemsItemSaveToDbEscaped(struct sqlConnection *conn, struct makeItemsItem *el, char *tableName, int updateSize);
/* Save makeItemsItem as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than makeItemsItemSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct makeItemsItem *makeItemsItemLoad(char **row);
/* Load a makeItemsItem from row fetched with select * from makeItemsItem
* from database. Dispose of this with makeItemsItemFree(). */
struct makeItemsItem *makeItemsItemLoadAll(char *fileName);
/* Load all makeItemsItem from whitespace-separated file.
* Dispose of this with makeItemsItemFreeList(). */
struct makeItemsItem *makeItemsItemLoadAllByChar(char *fileName, char chopper);
/* Load all makeItemsItem from chopper separated file.
* Dispose of this with makeItemsItemFreeList(). */
#define makeItemsItemLoadAllByTab(a) makeItemsItemLoadAllByChar(a, '\t');
/* Load all makeItemsItem from tab separated file.
* Dispose of this with makeItemsItemFreeList(). */
struct makeItemsItem *makeItemsItemCommaIn(char **pS, struct makeItemsItem *ret);
/* Create a makeItemsItem out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new makeItemsItem */
void makeItemsItemFree(struct makeItemsItem **pEl);
/* Free a single dynamically allocated makeItemsItem such as created
* with makeItemsItemLoad(). */
void makeItemsItemFreeList(struct makeItemsItem **pList);
/* Free a list of dynamically allocated makeItemsItem's */
void makeItemsItemOutput(struct makeItemsItem *el, FILE *f, char sep, char lastSep);
/* Print out makeItemsItem. Separate fields with sep. Follow last field with lastSep. */
#define makeItemsItemTabOut(el,f) makeItemsItemOutput(el,f,'\t','\n');
/* Print out makeItemsItem as a line in a tab-separated file. */
#define makeItemsItemCommaOut(el,f) makeItemsItemOutput(el,f,',',',');
/* Print out makeItemsItem as a comma separated list including final comma. */
/* -------------------------------- End autoSql Generated Code -------------------------------- */
#endif /* MAKEITEMSITEM_H */