39e533cc9ffcb46d9c484dc09a387a031a739391 Merge parents 1c86690 f642bab kate Mon Sep 24 16:35:53 2018 -0700 Updating from master diff --cc src/hg/inc/interact.h index 3038ff6,b682fbe..aacbf61 --- src/hg/inc/interact.h +++ src/hg/inc/interact.h @@@ -86,35 -86,40 +86,46 @@@ #define interactTabOut(el,f) interactOutput(el,f,'\t','\n'); /* Print out interact as a line in a tab-separated file. */ #define interactCommaOut(el,f) interactOutput(el,f,',',','); /* Print out interact as a comma separated list including final comma. */ /* -------------------------------- End autoSql Generated Code -------------------------------- */ struct asObject *interactAsObj(); /* Return asObject describing fields of barChart database table (includes bin) */ struct interact *interactLoadAndValidate(char **row); /* Load a interact from row fetched with select * from interact * from database, validating fields. Dispose of this with interactFree(). */ +struct bed *interactToBed(struct interact *inter); +/* Convert an interact to a BED12 */ + + struct interact *interactLoadAllAndValidate(char *fileName); + /* Load all interact from a whitespace-separated file. + * Dispose of this with interactFreeList(). */ + + void interactOutputCustom(struct interact *el, FILE *f, char sep, char lastSep); + /* Print out interact. Separate fields with sep. Follow last field with lastSep. + * Differs from auto-gen'ed by printing rgb color */ + + void interactFixRange(struct interact *inter); + /* Set values for chromStart/chromEnd based on source and target start/ends */ + char *interactOtherChrom(struct interact *inter); /* Get other chromosome from an interaaction. Return NULL if same chromosome */ int interactRegionCenter(int start, int end); /* Return genomic location of center of region */ +void interactRegionCenters(struct interact *inter, int *sourceCenter, int *targetCenter); +/* Return genomic position of endpoint centers */ + int interactRegionDistance(struct interact *inter); /* Return distance between region midpoints. Return -1 for other chromosome */ int interactDistanceCmp(const void *va, const void *vb); /* Compare based on distance between region midpoints */ #endif /* INTERACT_H */