Skip to content

Commit

Permalink
update for newer go
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Apr 7, 2019
1 parent ed53d0c commit 5858fb2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ os:
- osx

go:
- 1.5
- 1.6
- 1.9.x
- 1.10.x
- 1.11.x
- 1.12.x

script:
- cd cmd/check-sort-order
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ the sort order and presence or absence of the 'chr' prefix for chromosomes.
<!--
for arch in 386 amd64; do
for arch in amd64; do
for os in darwin linux; do
GOOS=$os GOARCH=$arch go build -o check-sort-order-${os}_${arch} cmd/check-sort-order/main.go
done
Expand Down
6 changes: 3 additions & 3 deletions cmd/check-sort-order/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func checkLine(iline int, line []byte, lastChrom []byte, lastStart int,
}

func checkTab(path string, gf *ggd_utils.GenomeFile, getter chromStartGetter) {
if !xopen.Exists(path + ".tbi") {
if !(xopen.Exists(path+".tbi") || xopen.Exists(path+".csi")) {
log.Fatalf("BED: %s should have a .tbi", path)
}
rdr, err := xopen.Ropen(path)
Expand Down Expand Up @@ -138,8 +138,8 @@ func checkTab(path string, gf *ggd_utils.GenomeFile, getter chromStartGetter) {
}

func checkVCF(path string, gf *ggd_utils.GenomeFile) {
if !xopen.Exists(path + ".tbi") {
log.Fatal("VCF should have a .tbi")
if !(xopen.Exists(path+".tbi") || xopen.Exists(path+".csi")) {
log.Fatal("VCF should have a .tbi or .csi")
}

rdr, err := xopen.Ropen(path)
Expand Down

0 comments on commit 5858fb2

Please sign in to comment.