biogo / hts

biogo high throughput sequencing repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parse SAM header scheme

corburn opened this issue · comments

https://github.com/biogo/hts/blob/master/sam/parse_header.go#L247
The if statement will always evaluate to true because Scheme cannot be both http and ftp:

if rf.uri.Scheme != "http" || rf.uri.Scheme != "ftp" {
    rf.uri.Scheme = "file"
}

https://github.com/biogo/hts/blob/master/bam/bam_test.go#L71
Changing it to && causes the following test to fail:

52    func (s *S) TestRead(c *check.C) {
        ...
71        c.Check(br.Header().Refs(), check.DeepEquals, t.header.Refs())
        ...
92    }

Good find, thank you.

The test fails because I incorrectly specified "file" in the test Golden values.