1d59c79ebf8d7596cf0beed61419bb267d5efb5c angie Wed Dec 19 15:37:45 2012 -0800 Adding annoStreamTab and simple test case.refs #6152 Performance will not be good for a series of queries to small regions on the same chromosome, because even if the regions don't overlap, we will have to reopen the file every time and start over just in case there are some items that start to the left of the region but overlap it. To fix that, we could add a queue for use when the region is smaller than a chromosome. Items that end to the right of the region would be kept in a queue in case they're needed in the next region query. When a new sub-chrom region query begins, if there are items in the queue that overlap the new region, they are used first and then we start reading from the file where we left off at the end of the last region. diff --git src/inc/annoStreamTab.h src/inc/annoStreamTab.h new file mode 100644 index 0000000..d7966b1 --- /dev/null +++ src/inc/annoStreamTab.h @@ -0,0 +1,12 @@ +/* annoStreamTab -- subclass of annoStreamer for tab-separated text files/URLs */ + +#ifndef ANNOSTREAMTAB_H +#define ANNOSTREAMTAB_H + +#include "annoStreamer.h" + +struct annoStreamer *annoStreamTabNew(char *fileOrUrl, struct asObject *asObj); +/* Create an annoStreamer (subclass) object from a tab-separated text file/URL + * whose columns are described by asObj (possibly excepting bin column at beginning). */ + +#endif//ndef ANNOSTREAMTAB_H