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

/* Copyright (C) 2004 The Regents of the University of California 
 * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */

#ifndef TRANSREGCODEPROBE_H
#define TRANSREGCODEPROBE_H

#define TRANSREGCODEPROBE_NUM_COLS 7

struct transRegCodeProbe
/* CHIP/CHIP Probe and Transcription Factor Binding Info */
    {
    struct transRegCodeProbe *next;  /* Next in singly linked list. */
    char *chrom;	/* Chromosome binding site is on */
    unsigned chromStart;	/* Start position in chromosome */
    unsigned chromEnd;	/* End position in chromosome */
    char *name;	/* Name of probe */
    unsigned tfCount;	/* Count of bound transcription factors_conditions */
    char **tfList;	/* List of bound transcription factors_conditions */
    float *bindVals;	/* E values for factor binding (lower is better) */
    };

struct transRegCodeProbe *transRegCodeProbeLoad(char **row);
/* Load a transRegCodeProbe from row fetched with select * from transRegCodeProbe
 * from database.  Dispose of this with transRegCodeProbeFree(). */

struct transRegCodeProbe *transRegCodeProbeLoadAll(char *fileName);
/* Load all transRegCodeProbe from whitespace-separated file.
 * Dispose of this with transRegCodeProbeFreeList(). */

struct transRegCodeProbe *transRegCodeProbeLoadAllByChar(char *fileName, char chopper);
/* Load all transRegCodeProbe from chopper separated file.
 * Dispose of this with transRegCodeProbeFreeList(). */

#define transRegCodeProbeLoadAllByTab(a) transRegCodeProbeLoadAllByChar(a, '\t');
/* Load all transRegCodeProbe from tab separated file.
 * Dispose of this with transRegCodeProbeFreeList(). */

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

void transRegCodeProbeFree(struct transRegCodeProbe **pEl);
/* Free a single dynamically allocated transRegCodeProbe such as created
 * with transRegCodeProbeLoad(). */

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

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

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

#define transRegCodeProbeCommaOut(el,f) transRegCodeProbeOutput(el,f,',',',');
/* Print out transRegCodeProbe as a comma separated list including final comma. */

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

#endif /* TRANSREGCODEPROBE_H */

