54406b80d5d435970989acff7b22dd6146c6b411 braney Sat Jan 22 15:24:59 2022 -0800 adding chrom alias support to big files diff --git src/inc/bigBed.h src/inc/bigBed.h index 5f151b3..e45945f 100644 --- src/inc/bigBed.h +++ src/inc/bigBed.h @@ -47,30 +47,33 @@ struct bigBedInterval /* A partially parsed out bed record plus some extra fields. Use this directly * or convert it to an array of characters with bigBedIntervalToRow. */ { struct bigBedInterval *next; /* Next in list. */ bits32 start, end; /* Range inside chromosome - half open zero based. */ char *rest; /* Rest of line. May be NULL*/ bits32 chromId; /* ID of chromosome. */ }; /*** Routines to open & close bigBed files, and to do chromosome range queries on them. ***/ struct bbiFile *bigBedFileOpen(char *fileName); /* Open up big bed file. Free this up with bbiFileClose. */ +struct bbiFile *bigBedFileOpenAlias(char *fileName, struct hash *aliasHash); +/* Open up big bed file with chrom alias hash. */ + #define bigBedFileClose(a) bbiFileClose(a) struct bigBedInterval *bigBedIntervalQuery(struct bbiFile *bbi, char *chrom, bits32 start, bits32 end, int maxItems, struct lm *lm); /* Get data for interval. Return list allocated out of lm. Set maxItems to maximum * number of items to return, or to 0 for all items. */ int bigBedIntervalToRow(struct bigBedInterval *interval, char *chrom, char *startBuf, char *endBuf, char **row, int rowSize); /* Convert bigBedInterval into an array of chars equivalent to what you'd get by * parsing the bed file. The startBuf and endBuf are used to hold the ascii representation of * start and end. Note that the interval->rest string will have zeroes inserted as a side effect. * Returns number of fields in row. */ boolean bigBedSummaryArray(struct bbiFile *bbi, char *chrom, bits32 start, bits32 end,