/* sgdAbundance.h was originally generated by the autoSql program, which also 
 * generated sgdAbundance.c and sgdAbundance.sql.  This header links the database and
 * the RAM representation of objects. */

/* Copyright (C) 2010 The Regents of the University of California 
 * See README in this or parent directory for licensing information. */

#ifndef SGDABUNDANCE_H
#define SGDABUNDANCE_H

#define SGDABUNDANCE_NUM_COLS 3

struct sgdAbundance
/* Protein abundance data from http://yeastgfp.yeastgenome.org via SGD */
    {
    struct sgdAbundance *next;  /* Next in singly linked list. */
    char *name;	/* ORF name in sgdGene table */
    float abundance;	/* Absolute abundance from 41 to 1590000 */
    char *error;	/* Error - either a floating point number or blank */
    };

void sgdAbundanceStaticLoad(char **row, struct sgdAbundance *ret);
/* Load a row from sgdAbundance table into ret.  The contents of ret will
 * be replaced at the next call to this function. */

struct sgdAbundance *sgdAbundanceLoad(char **row);
/* Load a sgdAbundance from row fetched with select * from sgdAbundance
 * from database.  Dispose of this with sgdAbundanceFree(). */

struct sgdAbundance *sgdAbundanceLoadAll(char *fileName);
/* Load all sgdAbundance from whitespace-separated file.
 * Dispose of this with sgdAbundanceFreeList(). */

struct sgdAbundance *sgdAbundanceLoadAllByChar(char *fileName, char chopper);
/* Load all sgdAbundance from chopper separated file.
 * Dispose of this with sgdAbundanceFreeList(). */

#define sgdAbundanceLoadAllByTab(a) sgdAbundanceLoadAllByChar(a, '\t');
/* Load all sgdAbundance from tab separated file.
 * Dispose of this with sgdAbundanceFreeList(). */

struct sgdAbundance *sgdAbundanceCommaIn(char **pS, struct sgdAbundance *ret);
/* Create a sgdAbundance out of a comma separated string. 
 * This will fill in ret if non-null, otherwise will
 * return a new sgdAbundance */

void sgdAbundanceFree(struct sgdAbundance **pEl);
/* Free a single dynamically allocated sgdAbundance such as created
 * with sgdAbundanceLoad(). */

void sgdAbundanceFreeList(struct sgdAbundance **pList);
/* Free a list of dynamically allocated sgdAbundance's */

void sgdAbundanceOutput(struct sgdAbundance *el, FILE *f, char sep, char lastSep);
/* Print out sgdAbundance.  Separate fields with sep. Follow last field with lastSep. */

#define sgdAbundanceTabOut(el,f) sgdAbundanceOutput(el,f,'\t','\n');
/* Print out sgdAbundance as a line in a tab-separated file. */

#define sgdAbundanceCommaOut(el,f) sgdAbundanceOutput(el,f,',',',');
/* Print out sgdAbundance as a comma separated list including final comma. */

/* -------------------------------- End autoSql Generated Code -------------------------------- */

#endif /* SGDABUNDANCE_H */

