/* affy120KDetails.h was originally generated by the autoSql program, which also * generated affy120KDetails.c and affy120KDetails.sql. This header links the database and * the RAM representation of objects. */ #ifndef AFFY120KDETAILS_H #define AFFY120KDETAILS_H #ifndef JKSQL_H #include "jksql.h" #endif #define AFFY120KDETAILS_NUM_COLS 64 struct affy120KDetails /* Information from affyGenoDetails representing the Affymetrix 120K SNP Genotyping array */ { struct affy120KDetails *next; /* Next in singly linked list. */ int affyId; /* Affymetrix SNP id */ char *rsId; /* RS identifier (some are null) */ char baseA[3]; /* The first allele (A) */ char baseB[3]; /* The second allele (B) */ char sequenceA[35]; /* The A allele with flanking sequence */ char sequenceB[35]; /* The B allele with flanking sequence */ char enzyme[9]; /* The enzyme that was used to prepare the sample (HindIII or XbaI) */ float minFreq; /* The minimum allele frequency */ float hetzyg; /* The heterozygosity from all observations */ float avHetSE; /* The Standard Error for the average heterozygosity (not used) */ char NA04477[3]; /* Individual 01 */ char NA04479[3]; /* Individual 02 */ char NA04846[3]; /* Individual 03 */ char NA11036[3]; /* Individual 04 */ char NA11038[3]; /* Individual 05 */ char NA13056[3]; /* Individual 06 */ char NA17011[3]; /* Individual 07 */ char NA17012[3]; /* Individual 08 */ char NA17013[3]; /* Individual 09 */ char NA17014[3]; /* Individual 10 */ char NA17015[3]; /* Individual 11 */ char NA17016[3]; /* Individual 12 */ char NA17101[3]; /* Individual 13 */ char NA17102[3]; /* Individual 14 */ char NA17103[3]; /* Individual 15 */ char NA17104[3]; /* Individual 16 */ char NA17105[3]; /* Individual 17 */ char NA17106[3]; /* Individual 18 */ char NA17201[3]; /* Individual 19 */ char NA17202[3]; /* Individual 20 */ char NA17203[3]; /* Individual 21 */ char NA17204[3]; /* Individual 22 */ char NA17205[3]; /* Individual 23 */ char NA17206[3]; /* Individual 24 */ char NA17207[3]; /* Individual 25 */ char NA17208[3]; /* Individual 26 */ char NA17210[3]; /* Individual 27 */ char NA17211[3]; /* Individual 28 */ char NA17212[3]; /* Individual 29 */ char NA17213[3]; /* Individual 30 */ char PD01[3]; /* Individual 31 */ char PD02[3]; /* Individual 32 */ char PD03[3]; /* Individual 33 */ char PD04[3]; /* Individual 34 */ char PD05[3]; /* Individual 35 */ char PD06[3]; /* Individual 36 */ char PD07[3]; /* Individual 37 */ char PD08[3]; /* Individual 38 */ char PD09[3]; /* Individual 39 */ char PD10[3]; /* Individual 40 */ char PD11[3]; /* Individual 41 */ char PD12[3]; /* Individual 42 */ char PD13[3]; /* Individual 43 */ char PD14[3]; /* Individual 44 */ char PD15[3]; /* Individual 45 */ char PD16[3]; /* Individual 46 */ char PD17[3]; /* Individual 47 */ char PD18[3]; /* Individual 48 */ char PD19[3]; /* Individual 49 */ char PD20[3]; /* Individual 50 */ char PD21[3]; /* Individual 51 */ char PD22[3]; /* Individual 52 */ char PD23[3]; /* Individual 53 */ char PD24[3]; /* Individual 54 */ }; void affy120KDetailsStaticLoad(char **row, struct affy120KDetails *ret); /* Load a row from affy120KDetails table into ret. The contents of ret will * be replaced at the next call to this function. */ struct affy120KDetails *affy120KDetailsLoad(char **row); /* Load a affy120KDetails from row fetched with select * from affy120KDetails * from database. Dispose of this with affy120KDetailsFree(). */ struct affy120KDetails *affy120KDetailsLoadAll(char *fileName); /* Load all affy120KDetails from whitespace-separated file. * Dispose of this with affy120KDetailsFreeList(). */ struct affy120KDetails *affy120KDetailsLoadAllByChar(char *fileName, char chopper); /* Load all affy120KDetails from chopper separated file. * Dispose of this with affy120KDetailsFreeList(). */ #define affy120KDetailsLoadAllByTab(a) affy120KDetailsLoadAllByChar(a, '\t'); /* Load all affy120KDetails from tab separated file. * Dispose of this with affy120KDetailsFreeList(). */ struct affy120KDetails *affy120KDetailsLoadByQuery(struct sqlConnection *conn, char *query); /* Load all affy120KDetails 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 affy120KDetailsFreeList(). */ void affy120KDetailsSaveToDb(struct sqlConnection *conn, struct affy120KDetails *el, char *tableName, int updateSize); /* Save affy120KDetails 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 affy120KDetailsSaveToDbEscaped() */ void affy120KDetailsSaveToDbEscaped(struct sqlConnection *conn, struct affy120KDetails *el, char *tableName, int updateSize); /* Save affy120KDetails 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 affy120KDetailsSaveToDb(). * For example automatically copies and converts: * "autosql's features include" --> "autosql\'s features include" * before inserting into database. */ struct affy120KDetails *affy120KDetailsCommaIn(char **pS, struct affy120KDetails *ret); /* Create a affy120KDetails out of a comma separated string. * This will fill in ret if non-null, otherwise will * return a new affy120KDetails */ void affy120KDetailsFree(struct affy120KDetails **pEl); /* Free a single dynamically allocated affy120KDetails such as created * with affy120KDetailsLoad(). */ void affy120KDetailsFreeList(struct affy120KDetails **pList); /* Free a list of dynamically allocated affy120KDetails's */ void affy120KDetailsOutput(struct affy120KDetails *el, FILE *f, char sep, char lastSep); /* Print out affy120KDetails. Separate fields with sep. Follow last field with lastSep. */ #define affy120KDetailsTabOut(el,f) affy120KDetailsOutput(el,f,'\t','\n'); /* Print out affy120KDetails as a line in a tab-separated file. */ #define affy120KDetailsCommaOut(el,f) affy120KDetailsOutput(el,f,',',','); /* Print out affy120KDetails as a comma separated list including final comma. */ /* -------------------------------- End autoSql Generated Code -------------------------------- */ #endif /* AFFY120KDETAILS_H */