0dc41ec22723a16550fc1aebc0970192a410aed0 angie Wed Mar 6 17:40:05 2019 -0800 Strip commas before parsing positions in all 4 position parsing routines in hgTracks.c. Back in 4a03019 (hgFind cleanup), making hgTracks.c's parseVirtPosition strip commas wasn't sufficient; parseNonVirtPosition also needs to strip commas. Just to be safe, I'm making parseVPosition and parseNVPosition strip commas too. I think it would be better to make use of hdb's parsePosition rather than duplicate the core parsing code in 4 new places, but will leave that for another day. diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 40a8a0d..9bf9096 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -2619,51 +2619,53 @@ boolean virtualSingleChrom() /* Return TRUE if using virtual single chromosome mode */ { return (sameString(virtModeType,"exonMostly") || sameString(virtModeType,"geneMostly")); } void parseVPosition(char *position, char **pChrom, long *pStart, long *pEnd) /* parse Virt position */ { if (!position) { errAbort("position NULL"); } char *vPos = cloneString(position); +stripChar(vPos, ','); char *colon = strchr(vPos, ':'); if (!colon) errAbort("position has no colon"); char *dash = strchr(vPos, '-'); if (!dash) errAbort("position has no dash"); *colon = 0; *dash = 0; *pChrom = cloneString(vPos); *pStart = atol(colon+1) - 1; *pEnd = atol(dash+1); } void parseNVPosition(char *position, char **pChrom, int *pStart, int *pEnd) /* parse NonVirt position */ { if (!position) { errAbort("position NULL"); } char *vPos = cloneString(position); +stripChar(vPos, ','); char *colon = strchr(vPos, ':'); if (!colon) errAbort("position has no colon"); char *dash = strchr(vPos, '-'); if (!dash) errAbort("position has no dash"); *colon = 0; *dash = 0; *pChrom = cloneString(vPos); *pStart = atoi(colon+1) - 1; *pEnd = atoi(dash+1); } char *disguisePositionVirtSingleChrom(char *position) // DISGUISE VMODE /* Hide the virt position, convert to real single chrom span. @@ -9006,30 +9008,31 @@ errAbort("position has no dash"); *colon = 0; *dash = 0; virtWinStart = atol(colon+1) - 1; virtWinEnd = atol(dash+1); } void parseNonVirtPosition(char *position) /* parse non-virtual position */ { if (!position) { errAbort("position NULL"); } char *vPos = cloneString(position); +stripChar(vPos, ','); char *colon = strchr(vPos, ':'); if (!colon) errAbort("position has no colon"); char *dash = strchr(vPos, '-'); if (!dash) errAbort("position has no dash"); *colon = 0; *dash = 0; chromName = cloneString(vPos); winStart = atol(colon+1) - 1; winEnd = atol(dash+1); } boolean findNearestVirtMatch(char *chrom, int start, int end, boolean findNearest, long *retVirtStart, long *retVirtEnd) /* find nearest match on virt chrom.