be4311c07e14feb728abc6425ee606ffaa611a58 markd Fri Jan 22 06:46:58 2021 -0800 merge with master diff --git src/inc/obscure.h src/inc/obscure.h index 241628e..062a0a0 100644 --- src/inc/obscure.h +++ src/inc/obscure.h @@ -144,30 +144,36 @@ * 1-this1=val1 2-this='quoted val2' var3="another val" * If firstStartsWithLetter is true, then the left side of the equals must start with * and equals. */ struct hash *hashWordsInFile(char *fileName, int hashSize); /* Create a hash of space delimited words in file. * hashSize is as in hashNew() - pass 0 for default. */ struct hash *hashNameIntFile(char *fileName); /* Given a two column file (name, integer value) return a * hash keyed by name with integer values */ struct hash *hashTwoColumnFile(char *fileName); /* Given a two column file (key, value) return a hash. */ +struct hash *hashTsvBy(char *in, int keyColIx, int *retColCount); +/* Return a hash of rows keyed by the given column */ + +void writeTsvRow(FILE *f, int rowSize, char **row); +/* Write out row of strings to a line in tab-sep file */ + struct slPair *slPairTwoColumnFile(char *fileName); /* Read in a two column file into an slPair list */ void shuffleArrayOfChars(char *array, int arraySize); /* Shuffle array of characters of given size given number of times. */ void shuffleArrayOfInts(int *array, int arraySize); /* Shuffle array of ints of given size given number of times. */ void shuffleArrayOfPointers(void *pointerArray, int arraySize); /* Shuffle array of pointers of given size given number of times. */ void shuffleList(void *pList); /* Randomize order of slList. Usage: * shuffleList(&list)