0e64e5ed246694a275e787f67dca8e41ea62d1b8
aamp
  Mon Apr 4 05:57:10 2011 -0700
Added one function to liftOver library code that accepts either bed or position data
diff --git src/hg/inc/liftOver.h src/hg/inc/liftOver.h
index ab7e12a..b8eec6b 100644
--- src/hg/inc/liftOver.h
+++ src/hg/inc/liftOver.h
@@ -41,30 +41,39 @@
                     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.
  * Return the number of records successfully converted */
 
 int liftOverPositions(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);
 /* Create bed file from positions (chrom:start-end) and lift.
  * Return the number of records successfully converted */
 
+int liftOverBedOrPositions(char *fileName, struct hash *chainHash, 
+                        double minMatch,  double minBlocks, 
+                        int minSizeT, int minSizeQ,
+                        int minChainT, int minChainQ,
+		        bool fudgeThick, FILE *mapped, FILE *unmapped, 
+			   bool multiple, char *chainTable, int *errCt);
+/* Sniff the first line of the file, and determine whether it's a */
+/* bed, a positions file, or neither. */
+
 char *liftOverRemapRange(struct hash *chainHash, double minRatio,
 			char *chrom, int s, int e, char strand, double minMatch,
 			 char **retChrom, int *retStart, int *retEnd, char *retStrand);
 /* Remap a range through chain hash.  If all is well return NULL
  * and results in retChrom, retStart, retEnd.  Otherwise
  * return a string describing the problem. */
 
 void liftOverGff(char *fileName, struct hash *chainHash, 
                     double minMatch, double minBlocks, 
                     FILE *mapped, FILE *unmapped);
 /* Lift over GFF file */
 
 void liftOverPsl(char *fileName, struct hash *chainHash, 
                             double minMatch, double minBlocks, bool fudgeThick,
                                 FILE *f, FILE *unmapped);