Skip to content

Commit 14479f9

Browse files
committed
fix gff parsing
1 parent 6d2c904 commit 14479f9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/check-sort-order/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var get_vcf_chrom_start chromStartGetter = func(line []byte) ([]byte, int, error
3737
}
3838

3939
var get_gff_chrom_start chromStartGetter = func(line []byte) ([]byte, int, error) {
40-
toks := bytes.SplitN(line, []byte{'\t'}, 4)
40+
toks := bytes.SplitN(line, []byte{'\t'}, 5)
4141
start, err := strconv.Atoi(string(toks[3]))
4242
return toks[0], start, err
4343
}

cmd/check-sort-order/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var lineTests = []struct {
3333

3434
{1, []byte("1\t23\tasdf\tvvv"), []byte("1"), 24, get_gff_chrom_start, less, []byte("1"), 0, true},
3535

36-
{1, []byte("1111\tex\tmRNA\t1235"), []byte("1"), 24, get_gff_chrom_start, less, []byte("1111"), 1235, false},
36+
{1, []byte("1111\tex\tmRNA\t1235\t1236"), []byte("1"), 24, get_gff_chrom_start, less, []byte("1111"), 1235, false},
3737
}
3838

3939
func (s *MTest) TestCases(c *C) {

0 commit comments

Comments
 (0)