f7f5b164d6bacfd8da9b8f7772497ef971f2b0f8 galt Fri Dec 19 11:37:31 2025 -0800 Add options -chrom -start -end -range -bed -positions -udcDir to bigMafToMaf. Adds -positions to bigBedToBed. Moved parsePosition and parseRange routines into common.c so they could be shared with these and other utilities. -range has one 0-based start on commandline. -positions is a file with a list of 1-based starts. fixes #28109 diff --git src/inc/common.h src/inc/common.h index 48bc58973f2..fa1a2759e71 100644 --- src/inc/common.h +++ src/inc/common.h @@ -1637,16 +1637,27 @@ struct runTimes /* clock time since epoch, user CPU, and system CPU, in seconds */ { double clockSecs; double userSecs; double sysSecs; }; struct runTimes getTimesInSeconds(void); /* get the current clock time since epoch, process user CPU, and system CPU times, all in * seconds. */ struct hash *loadSizes(char *sizesFile); /* load a sizes file */ +boolean parseRange(char *range, char **retSeq, int *retStart, int *retEnd); +/* Parse seq:start-end into components. */ + +void mustParseRange(char *range, char **retSeq, int *retStart, int *retEnd); +/* Parse seq:start-end or die. */ + +boolean parsePosition(char *position, char **retChrom, uint *retStart, uint *retEnd); +/* If position is word:number-number (possibly with commas & whitespace), + * set retChrom, retStart (subtracting 1) and retEnd, and return TRUE. + * Otherwise return FALSE and leave rets unchanged. */ + #endif /* COMMON_H */