12d0bf30d4a9fbe7aee60fdf9e7f8827116ba400 markd Wed Jan 27 17:49:12 2021 -0800 allow overlap select to ignore non-standard columns in BED as well as genePred and PSL, as often come with bigBed diff --git src/hg/utils/overlapSelect/rowReader.h src/hg/utils/overlapSelect/rowReader.h index 5f8c0e5..b7b99d7 100644 --- src/hg/utils/overlapSelect/rowReader.h +++ src/hg/utils/overlapSelect/rowReader.h @@ -1,34 +1,36 @@ /* rowReader - read rows from tab files or databases without length restrictions */ /* Copyright (C) 2010 The Regents of the University of California * See README in this or parent directory for licensing information. */ #ifndef ROWREADER_H #define ROWREADER_H struct rowReader -/* object to read rows */ +/* object to read records as rows */ { int numCols; /* number of columns in current row */ - char **row; /* parsed row */ + char **row; /* split row */ + int maxParsedCols; /* number of columns that are to be parsed, others + * should be just passed through. */ int colSpace; /* number of columns allocated in row */ struct lineFile *lf; /* if reading from a file */ }; -struct rowReader *rowReaderOpen(char *fileName, boolean isPslFile); +struct rowReader *rowReaderOpen(char *fileName, int maxParsedCols, boolean isPslFile); /* create a row reader for a file */ void rowReaderFree(struct rowReader **rrPtr); /* free a row reader */ boolean rowReaderNext(struct rowReader *rr); /* read the next row into the rowReader, return FALSE on EOF. */ void rowReaderExpectAtLeast(struct rowReader *rr, int minCols); /* generate an error if there are not enough columns in a row */ char **rowReaderCloneColumns(struct rowReader *rr); /* Make dynamic copy of columns currently in reader. Vector is NULL terminated * and should be released with a single freeMem call. Must be called before * autoSql parser is called on a row, as it will modify array rows. */ #endif