| 1 | package parsers_testscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ |
| 2 | |
| 3 | import ( |
| 4 | "testingscip-go gomod github.com/golang/go/src go1.23.0 testing/" |
| 5 | |
| 6 | "github.com/brentp/irelate/parsersscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/" |
| 7 | |
| 8 | . "gopkg.in/check.v1scip-go gomod gopkg.in/check.v1 10cb98267c6c `gopkg.in/check.v1`/" |
| 9 | ) |
| 10 | |
| 11 | func Testscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/Test().(t *testingscip-go gomod github.com/golang/go/src go1.23.0 testing/.Tscip-go gomod github.com/golang/go/src go1.23.0 testing/T#) { TestingTscip-go gomod gopkg.in/check.v1 10cb98267c6c `gopkg.in/check.v1`/TestingT().(t) } |
| 12 | |
| 13 | type BamSuitescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/BamSuite# struct{} |
| 14 | |
| 15 | var _ = Suitescip-go gomod gopkg.in/check.v1 10cb98267c6c `gopkg.in/check.v1`/Suite().(&BamSuitescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/BamSuite#{}) |
| 16 | |
| 17 | type ipscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ip# struct { |
| 18 | chromscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ip#chrom. string |
| 19 | startscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ip#start. uint32 |
| 20 | endscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ip#end. uint32 |
| 21 | } |
| 22 | |
| 23 | func (p ipscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ip#) Chromscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ip#Chrom().() string { |
| 24 | return p.chromscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ip#chrom. |
| 25 | } |
| 26 | func (p ipscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ip#) Startscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ip#Start().() uint32 { |
| 27 | return p.startscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ip#start. |
| 28 | } |
| 29 | func (p ipscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ip#) Endscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ip#End().() uint32 { |
| 30 | return p.endscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ip#end. |
| 31 | } |
| 32 | |
| 33 | func (s *BamSuitescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/BamSuite#) TestBamQueryscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/BamSuite#TestBamQuery().(c *Cscip-go gomod gopkg.in/check.v1 10cb98267c6c `gopkg.in/check.v1`/C#) { |
| 34 | b, err := parsersscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/.NewBamQueryablescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/NewBamQueryable().("../data/ex.bam") |
| 35 | c.Assertscip-go gomod gopkg.in/check.v1 10cb98267c6c `gopkg.in/check.v1`/C#Assert().(err, IsNilscip-go gomod gopkg.in/check.v1 10cb98267c6c `gopkg.in/check.v1`/IsNil.) |
| 36 | reg := ipscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers_test`/ip#{"chr1", 3048448, 3049340} |
| 37 | |
| 38 | q, err := b.Queryscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/BamQueryable#Query().(reg) |
| 39 | c.Assertscip-go gomod gopkg.in/check.v1 10cb98267c6c `gopkg.in/check.v1`/C#Assert().(err, IsNilscip-go gomod gopkg.in/check.v1 10cb98267c6c `gopkg.in/check.v1`/IsNil.) |
| 40 | |
| 41 | j := 0 |
| 42 | for rec, e := q.Nextscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/RelatableIterator#Next.(); e == nil; rec, e = q.Nextscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/RelatableIterator#Next.() { |
| 43 | c.Assertscip-go gomod gopkg.in/check.v1 10cb98267c6c `gopkg.in/check.v1`/C#Assert().(rec.Chromscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/IPosition#Chrom.(), Equalsscip-go gomod gopkg.in/check.v1 10cb98267c6c `gopkg.in/check.v1`/Equals., "chr1") |
| 44 | j++ |
| 45 | } |
| 46 | c.Assertscip-go gomod gopkg.in/check.v1 10cb98267c6c `gopkg.in/check.v1`/C#Assert().(j, Equalsscip-go gomod gopkg.in/check.v1 10cb98267c6c `gopkg.in/check.v1`/Equals., 2) |
| 47 | |
| 48 | } |