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

#ifndef BIGRMSKALIGNBED_H
#define BIGRMSKALIGNBED_H

#define BIGRMSKALIGNBED_NUM_COLS 17

extern char *bigRmskAlignBedCommaSepFieldNames;

struct bigRmskAlignBed
/* Repetitive Element Alignment Auxilary Data */
    {
    struct bigRmskAlignBed *next;  /* Next in singly linked list. */
    char *chrom;	/* Reference sequence chromosome or scaffold */
    unsigned chromStart;	/* Start position of alignment on chromosome */
    unsigned chromEnd;	/* End position of alignment on chromosome */
    unsigned chromRemain;	/* Remaining bp in the chromosome or scaffold */
    float score;	/* alignment score (sw, bits or evalue) */
    float percSubst;	/* Base substitution percentage */
    float percDel;	/* Base deletion percentage */
    float percIns;	/* Bases insertion percentage */
    char strand[2];	/* Strand - either + or - */
    char *repName;	/* Name of repeat */
    char *repType;	/* Type of repeat */
    char *repSubtype;	/* Subtype of repeat */
    unsigned repStart;	/* Start in repeat sequence */
    unsigned repEnd;	/* End in repeat sequence */
    unsigned repRemain;	/* Remaining unaligned bp in the repeat sequence */
    unsigned id;	/* The ID of the hit. Used to link related fragments */
    char *calignData;	/* The alignment data stored as a single string */
    };

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

struct bigRmskAlignBed *bigRmskAlignBedLoad(char **row);
/* Load a bigRmskAlignBed from row fetched with select * from bigRmskAlignBed
 * from database.  Dispose of this with bigRmskAlignBedFree(). */

struct bigRmskAlignBed *bigRmskAlignBedLoadAll(char *fileName);
/* Load all bigRmskAlignBed from whitespace-separated file.
 * Dispose of this with bigRmskAlignBedFreeList(). */

struct bigRmskAlignBed *bigRmskAlignBedLoadAllByChar(char *fileName, char chopper);
/* Load all bigRmskAlignBed from chopper separated file.
 * Dispose of this with bigRmskAlignBedFreeList(). */

#define bigRmskAlignBedLoadAllByTab(a) bigRmskAlignBedLoadAllByChar(a, '\t');
/* Load all bigRmskAlignBed from tab separated file.
 * Dispose of this with bigRmskAlignBedFreeList(). */

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

void bigRmskAlignBedFree(struct bigRmskAlignBed **pEl);
/* Free a single dynamically allocated bigRmskAlignBed such as created
 * with bigRmskAlignBedLoad(). */

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

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

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

#define bigRmskAlignBedCommaOut(el,f) bigRmskAlignBedOutput(el,f,',',',');
/* Print out bigRmskAlignBed as a comma separated list including final comma. */

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

#endif /* BIGRMSKALIGNBED_H */

