bfcfffa0ad0401f5264bb656e569a78a12847e12 aamp Tue Feb 28 15:59:13 2012 -0800 changed hgLiftOver to only output message out multiple option not being suppported for the positions format ONLY if the input is positions format and if the multiple option is checked diff --git src/hg/inc/liftOver.h src/hg/inc/liftOver.h index b8eec6b..f8b48a6 100644 --- src/hg/inc/liftOver.h +++ src/hg/inc/liftOver.h @@ -1,44 +1,55 @@ /* lift genome annotations between assemblies using chain files */ #ifndef LIFTOVER_H #define LIFTOVER_H #define LIFTOVER_MINMATCH 0.95 #define LIFTOVER_MINBLOCKS 1.00 +enum liftOverFileType +{ + none = 0, + bed = 1, + positions = 2, +}; + struct liftOverChain *liftOverChainList(); /* Get list of all liftOver chains in the central database */ void filterOutMissingChains(struct liftOverChain **pChainList); /* Filter out chains that don't exist. Helps partially mirrored sites. */ struct liftOverChain *liftOverChainListFiltered(); /* Get list of all liftOver chains in the central database * filtered to include only those chains whose liftover files exist. * This helps partially mirrored sites */ struct liftOverChain *liftOverChainForDb(char *fromDb); /* Return list of liftOverChains for this database. */ struct liftOverChain *liftOverChainListForDbFiltered(char *fromDb); /* Get list of all liftOver chains in the central database for fromDb, * filtered to include only those chains whose liftover files exist. */ char *liftOverChainFile(char *fromDb, char *toDb); /* Get filename of liftOver chain */ +enum liftOverFileType liftOverSniff(char *fileName); +/* the file-sniffing bit used to distinguish bed from positions files */ +/* returns enum concerning the file type */ + int liftOverBed(char *fileName, struct hash *chainHash, double minMatch, double minBlocks, int minSizeT, int minSizeQ, int minChainT, int minChainQ, bool fudgeThick, FILE *f, FILE *unmapped, bool multiple, char *chainTable, int *errCt); /* Open up file, decide what type of bed it is, and lift it. * Return the number of records successfully converted */ int liftOverBedPlus(char *fileName, struct hash *chainHash, double minMatch, double minBlocks, int minSizeT, int minSizeQ, int minChainT, int minChainQ, bool fudgeThick, FILE *f, FILE *unmapped, bool multiple, char *chainTable, int bedPlus, bool hasBin, bool tabSep, int *errCt); /* Lift bed with N+ (where n=bedPlus param) format.