intv->tid = get_tid(idx, str->s + b);
if (i != str->l) str->s[i] = '\t';
} else if (id == idx->conf.bc) {
- // here ->beg is 1-based. it will be changed to 0-based at the end of this routine.
+ // here ->beg is 0-based.
intv->beg = intv->end = strtol(str->s + b, &s, 0);
if (!(idx->conf.preset&TI_FLAG_UCSC)) --intv->beg;
} else {
if (op == 'M' || op == 'D' || op == 'N') l += x;
s = t + 1;
}
- intv->end = intv->beg + l - 1;
+ intv->end = intv->beg + l;
}
} else if ((idx->conf.preset&0xffff) == TI_PRESET_VCF) {
// FIXME: the following is NOT tested and is likely to be buggy
s = t + 1;
} else ++s;
}
- intv->end = intv->beg + max - 1;
+ intv->end = intv->beg + max;
}
}
}
}
}
if (intv->tid < 0 || intv->beg < 0 || intv->end < 0) return -1;
- intv->bin = ti_reg2bin(intv->beg-1, intv->end);
+ intv->bin = ti_reg2bin(intv->beg, intv->end);
return 0;
}
#include "bgzf.h"
#include "tabix.h"
-#define PACKAGE_VERSION "0.1.1 (r542)"
+#define PACKAGE_VERSION "0.1.2 (r543)"
static int fetch_func(int l, const char *s, void *data)
{
Column of start chromosomal position. [4]
.TP
.BI "-e " INT
-Column of end chromosomal position. The end column can be the same as
-start column, [5]
+Column of end chromosomal position. The end column can be the same as the
+start column. [5]
.TP
.BI "-S " INT
Skip first INT lines in the data file. [0]
.RE
.SH EXAMPLE
-grep -v ^"#" unsorted.gff | sort -k1,1 -k4,4n | bgzip -c > sorted.gff.gz;
+(grep ^"#" in.gff; grep -v ^"#" in.gff | sort -k1,1 -k4,4n) | bgzip > sorted.gff.gz;
tabix -p gff sorted.gff.gz;