70e4f023e0cd98a096dfe959142bbada59c4e7a9
braney
  Mon May 20 17:28:31 2024 -0700
ongoing work on pair browser

diff --git src/hg/lib/quickLift.c src/hg/lib/quickLift.c
index 99f165f..cfd22fc 100644
--- src/hg/lib/quickLift.c
+++ src/hg/lib/quickLift.c
@@ -78,47 +78,59 @@
     else
         thisInterval = bigBedIntervalQuery(bbi, chain->qName, qStart, qEnd, 10000, lm);
     bbList = slCat(thisInterval, bbList);
     
     // for the mapping we're going to use the same chain we queried on to map the items, but we need to swap it
     chainSwap(chain);
 
     if (*pChainHash == NULL)
         *pChainHash = newHash(0);
     liftOverAddChainHash(*pChainHash, chain);
     }
 
 return bbList;
 }
 
+void make12(struct bed *bed)
+{
+bed->blockCount = 1;
+bed->blockSizes = needMem(sizeof(int));
+bed->blockSizes[0] = bed->chromEnd - bed->chromStart;
+bed->chromStarts = needMem(sizeof(int));
+bed->chromStarts[0] = 0;
+}
+
 struct bed *quickLiftBed(struct bbiFile *bbi, struct hash *chainHash, struct bigBedInterval *bb)
 /* Using chains stored in chainHash, port a bigBedInterval from another assembly to a bed
  * on the reference.
  */
 {
 char startBuf[16], endBuf[16];
 char *bedRow[bbi->fieldCount];
 char chromName[256];
 static int lastChromId = -1;
 
 bbiCachedChromLookup(bbi, bb->chromId, lastChromId, chromName, sizeof(chromName));
 //lastChromId=bb->chromId;
 
 bigBedIntervalToRow(bb, chromName, startBuf, endBuf, bedRow, ArraySize(bedRow));
 
 struct bed *bed = bedLoadN(bedRow, bbi->definedFieldCount);
 char *error;
+if (bbi->definedFieldCount < 12)
+    make12(bed);
+
 if ((error = remapBlockedBed(chainHash, bed, 0.0, 0.1, TRUE, TRUE, NULL, NULL)) == NULL)
     return bed;
 //else
     //printf("bed %s error:%s<BR>", bed->name, error);
 
 return NULL;
 }
 
 unsigned quickLiftGetChain(char *fromDb, char *toDb)
 /* Return the id from the quickLiftChain table for given assemblies. */
 {
 unsigned ret = 0;
 struct sqlConnection *conn = hConnectCentral();
 char query[2048];
 sqlSafef(query, sizeof(query), "select q.id from quickLiftChain q  where q.fromDb='%s' and q.toDb='%s'", fromDb, toDb);