Debian Codegraph @

fai/fai_test.go

raw symbols SCIP
1 // Copyright ©2013 The bíogo Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 package faiscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/
6
7 import (
8 "bytesscip-go gomod github.com/golang/go/src go1.19 bytes/"
9 "encoding/csvscip-go gomod github.com/golang/go/src go1.19 `encoding/csv`/"
10 "errorsscip-go gomod github.com/golang/go/src go1.19 errors/"
11 "reflectscip-go gomod github.com/golang/go/src go1.19 reflect/"
12 "strconvscip-go gomod github.com/golang/go/src go1.19 strconv/"
13 "stringsscip-go gomod github.com/golang/go/src go1.19 strings/"
14 "testingscip-go gomod github.com/golang/go/src go1.19 testing/"
15 )
16
17 func TestNewIndexscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/TestNewIndex().(t *testingscip-go gomod github.com/golang/go/src go1.19 testing/.Tscip-go gomod github.com/golang/go/src go1.19 testing/T#) {
18 for i, test := range []struct {
19 in string
20 idx Indexscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Index#
21 err error
22 }{
23 {
24 in: ``,
25 idx: Indexscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Index#{},
26 err: nil,
27 },
28 {
29 in: `>FN654386.1
30 TTTTTCAAAGACGTTAAGAGCATCAAACAGAATCATTTTGTTCTCGGATGAGAAGCTGAAAACGAGATTC
31 TCGTGTTGCTTCTCGGTCATACCAAAGACC
32 >FN654386.2
33 GCGAACTGATGGTCAAGCACAGCTAGAACGTCTTCGTTTGAAGCTGGAGACGATTGCCGCGCAGGCAACT
34 CGCCGACATCGACGATGTCTTCGTAGTCAT
35 >FN654386.3
36 CTGAATTGAGCCGCGGGCGATTGATTCGTGTCGGCGCGTCAGGAGGAAGTTCAAGTCGGAATCTCGCGTT
37 TTCATTAATCATTTGTACTGGATCTGTTCG
38 `,
39 // Index validated against samtools faidx for this set of sequences.
40 idx: Indexscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Index#{
41 "FN654386.1": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.1", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 100, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 12, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 70, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 71},
42 "FN654386.2": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.2", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 100, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 126, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 70, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 71},
43 "FN654386.3": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.3", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 100, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 240, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 70, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 71},
44 },
45 err: nil,
46 },
47 {
48 // Index validated against samtools faidx for this set of sequences.
49 in: `>FN654386.1 descriptive text separated by tab
50 TTTTTCAAAGACGTTAAGAGCATCAAACAGAATCATTTTGTTCTCGGATGAGAAGCTGAAAACGAGATTC
51 TCGTGTTGCTTCTCGGTCATACCAAAGACC
52 >FN654386.2 descriptive text separated by space
53 GCGAACTGATGGTCAAGCACAGCTAGAACGTCTTCGTTTGAAGCTGGAGACGATTGCCGCGCAGGCAACT
54 CGCCGACATCGACGATGTCTTCGTAGTCAT
55 >FN654386.3
56 CTGAATTGAGCCGCGGGCGATTGATTCGTGTCGGCGCGTCAGGAGGAAGTTCAAGTCGGAATCTCGCGTT
57 TTCATTAATCATTTGTACTGGATCTGTTCG
58 `,
59 // Index validated against samtools faidx for this set of sequences.
60 idx: Indexscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Index#{
61 "FN654386.1": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.1", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 100, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 46, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 70, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 71},
62 "FN654386.2": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.2", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 100, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 196, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 70, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 71},
63 "FN654386.3": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.3", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 100, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 310, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 70, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 71},
64 },
65 err: nil,
66 },
67 {
68 in: `>FN654386.1
69 TTTTTCAAAGACGTTAAGAGCATCAAACAGAATCATTTTGTTCTCGGATGAGAAGCTGAA
70 TCGTGTTGCTTCTCGGTCATACCAAAGACC
71 >FN654386.2
72 GCGAACTGATGGTCAAGCACAGCTAGAACGTCTTCGTTTGAAGCTGGAGACGATTGCCGCGCAGGCAACT
73 CGCCGACATCGACGATGTCTTCGTAGTCAT
74 >FN654386.3
75 CTGAATTGAGCCGCGGGCGATTGATTCGTGTCGGCGCGTCAGGAGGAAGTTCAAGTCGGAATCTCGCGTT
76 TTCATTAATCATTTGTACTGGATCTGTTCG
77 `,
78 // Index validated against samtools faidx for this set of sequences.
79 idx: Indexscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Index#{
80 "FN654386.1": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.1", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 90, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 12, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
81 "FN654386.2": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.2", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 100, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 116, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 70, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 71},
82 "FN654386.3": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.3", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 100, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 230, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 70, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 71},
83 },
84 err: nil,
85 },
86 {
87 in: `>FN654386.1
88 TTTTTCAAAGACGTTAAGAGCATCAAACAGAATCATTTTGTTCTCGGATGAGAAGCTGAA
89 TCGTGTTGCTTCTCGGTCATACCAAAGACC
90 >
91 GCGAACTGATGGTCAAGCACAGCTAGAACGTCTTCGTTTGAAGCTGGAGACGATTGCCGCGCAGGCAACT
92 CGCCGACATCGACGATGTCTTCGTAGTCAT
93 >FN654386.3
94 CTGAATTGAGCCGCGGGCGATTGATTCGTGTCGGCGCGTCAGGAGGAAGTTCAAGTCGGAATCTCGCGTT
95 TTCATTAATCATTTGTACTGGATCTGTTCG
96 `,
97 idx: nil,
98 err: errorsscip-go gomod github.com/golang/go/src go1.19 errors/.Newscip-go gomod github.com/golang/go/src go1.19 errors/New().("fai: missing sequence name at 104"),
99 },
100 {
101 in: `>FN654386.1
102 TTTTTCAAAGACGTTAAGAGCATCAAACAGAATCATTTTGTTCTCGGATGAGAAGCTGAA
103 TCGTGTTGCTTCTCGGTCATACCAAAGACC
104 >` + " " + `
105 GCGAACTGATGGTCAAGCACAGCTAGAACGTCTTCGTTTGAAGCTGGAGACGATTGCCGCGCAGGCAACT
106 CGCCGACATCGACGATGTCTTCGTAGTCAT
107 >FN654386.3
108 CTGAATTGAGCCGCGGGCGATTGATTCGTGTCGGCGCGTCAGGAGGAAGTTCAAGTCGGAATCTCGCGTT
109 TTCATTAATCATTTGTACTGGATCTGTTCG
110 `,
111 idx: nil,
112 err: errorsscip-go gomod github.com/golang/go/src go1.19 errors/.Newscip-go gomod github.com/golang/go/src go1.19 errors/New().("fai: missing sequence name at 104"),
113 },
114 {
115 in: `>FN654386.1
116 TTTTTCAAAGACGTTAAGAGCATCAAACAGAATCATTTTGTTCTCGGATGAGAAGCTGAAAACGAGATTC
117 TCGTGTTGCTTCTCGGTCATACCAAAGACC
118 >FN654386.1
119 GCGAACTGATGGTCAAGCACAGCTAGAACGTCTTCGTTTGAAGCTGGAGACGATTGCCGCGCAGGCAACT
120 CGCCGACATCGACGATGTCTTCGTAGTCAT
121 >FN654386.3
122 CTGAATTGAGCCGCGGGCGATTGATTCGTGTCGGCGCGTCAGGAGGAAGTTCAAGTCGGAATCTCGCGTT
123 TTCATTAATCATTTGTACTGGATCTGTTCG
124 `,
125 idx: nil,
126 err: errorsscip-go gomod github.com/golang/go/src go1.19 errors/.Newscip-go gomod github.com/golang/go/src go1.19 errors/New().("fai: duplicate sequence identifier FN654386.1 at 114"),
127 },
128 {
129 in: `>FN654386.1
130 TTTTTCAAAGACGTTAAGAGCATCAAACAGAATCATTTTGTTCTCGGATGAGAAGCTGAAAACGAGATTC
131 GAGCATCAAACAGAATCATTTTGTTCTCGGATGAGAAGCTGAAAACGAGATTCTTTTTCAAAGACGTTA
132 TCGTGTTGCTTCTCGGTCATACCAAAGACC
133 >FN654386.2
134 GCGAACTGATGGTCAAGCACAGCTAGAACGTCTTCGTTTGAAGCTGGAGACGATTGCCGCGCAGGCAACT
135 CGCCGACATCGACGATGTCTTCGTAGTCAT
136 >FN654386.3
137 CTGAATTGAGCCGCGGGCGATTGATTCGTGTCGGCGCGTCAGGAGGAAGTTCAAGTCGGAATCTCGCGTT
138 TTCATTAATCATTTGTACTGGATCTGTTCG
139 `,
140 idx: nil,
141 err: errorsscip-go gomod github.com/golang/go/src go1.19 errors/.Newscip-go gomod github.com/golang/go/src go1.19 errors/New().("fai: unexpected short line before offset 153"),
142 },
143 {
144 in: `>FN654386.1
145 TTTTTCAAAGACGTTAAGAGCATCAAACAGAATCATTTTGTTCTCGGATGAGAAGCTGAAAACGAGATTC
146 GAGCATCAAACAGAATCATTTTGTTCTCGGATGAGAAGCTGAAAACGAGATTCTTTTTCAAAGACGTTACG
147 TCGTGTTGCTTCTCGGTCATACCAAAGACC
148 >FN654386.2
149 GCGAACTGATGGTCAAGCACAGCTAGAACGTCTTCGTTTGAAGCTGGAGACGATTGCCGCGCAGGCAACT
150 CGCCGACATCGACGATGTCTTCGTAGTCAT
151 >FN654386.3
152 CTGAATTGAGCCGCGGGCGATTGATTCGTGTCGGCGCGTCAGGAGGAAGTTCAAGTCGGAATCTCGCGTT
153 TTCATTAATCATTTGTACTGGATCTGTTCG
154 `,
155 idx: nil,
156 err: errorsscip-go gomod github.com/golang/go/src go1.19 errors/.Newscip-go gomod github.com/golang/go/src go1.19 errors/New().("fai: unexpected long line at offset 83"),
157 },
158 } {
159 got, err := NewIndexscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/NewIndex().(stringsscip-go gomod github.com/golang/go/src go1.19 strings/.NewReaderscip-go gomod github.com/golang/go/src go1.19 strings/NewReader().(test.in))
160 if !reflectscip-go gomod github.com/golang/go/src go1.19 reflect/.DeepEqualscip-go gomod github.com/golang/go/src go1.19 reflect/DeepEqual().(err, test.err) {
161 t.Errorfscip-go gomod github.com/golang/go/src go1.19 testing/common#Errorf().("unexpected error: got:%v want:%v", err, test.err)
162 }
163 if !reflectscip-go gomod github.com/golang/go/src go1.19 reflect/.DeepEqualscip-go gomod github.com/golang/go/src go1.19 reflect/DeepEqual().(got, test.idx) {
164 t.Errorfscip-go gomod github.com/golang/go/src go1.19 testing/common#Errorf().("unexpected result for test %d: got:%#v want:%#v", i, got, test.idx)
165 }
166 }
167 }
168
169 func TestReadFromscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/TestReadFrom().(t *testingscip-go gomod github.com/golang/go/src go1.19 testing/.Tscip-go gomod github.com/golang/go/src go1.19 testing/T#) {
170 for i, test := range []struct {
171 in string
172 idx Indexscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Index#
173 err error
174 }{
175 {
176 in: ``,
177 idx: nil,
178 err: nil,
179 },
180 {
181 in: `NODE_7194_length_226_cov_2.672566 246 35 60 61
182 NODE_7195_length_193_cov_2.906736 213 321 60 61
183 NODE_7419_length_181_cov_4.668508 201 573 60 61
184 NODE_7473_length_222_cov_10.977477 242 814 60 61
185 NODE_11804_length_273_cov_2.186813 293 1097 60 61
186 NODE_12878_length_198_cov_2.358586 218 1431 60 61
187 NODE_19170_length_305_cov_2.147541 325 1689 60 61
188 NODE_23972_length_201_cov_2.452736 221 2056 60 61
189 NODE_25171_length_223_cov_2.869955 243 2317 60 61
190 NODE_26170_length_196_cov_2.658163 216 2601 60 61
191 NODE_28488_length_231_cov_2.290043 251 2857 60 61
192 NODE_29471_length_195_cov_5.102564 215 3149 60 61
193 NODE_30404_length_252_cov_1.480159 272 3404 60 61
194 NODE_30635_length_192_cov_2.947917 212 3717 60 61
195 NODE_34404_length_184_cov_7.989130 204 3969 60 61
196 NODE_36516_length_195_cov_3.517949 215 4213 60 61
197 NODE_41230_length_277_cov_3.498195 297 4468 60 61
198 NODE_42422_length_182_cov_2.609890 202 4806 60 61
199 NODE_43724_length_236_cov_3.500000 256 5048 60 61
200 NODE_44676_length_185_cov_1.421622 205 5345 60 61
201 NODE_53327_length_192_cov_1.854167 212 5590 60 61
202 `,
203 idx: Indexscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Index#{
204 "NODE_7194_length_226_cov_2.672566": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_7194_length_226_cov_2.672566", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 246, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 35, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
205 "NODE_7195_length_193_cov_2.906736": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_7195_length_193_cov_2.906736", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 213, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 321, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
206 "NODE_7419_length_181_cov_4.668508": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_7419_length_181_cov_4.668508", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 201, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 573, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
207 "NODE_7473_length_222_cov_10.977477": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_7473_length_222_cov_10.977477", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 242, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 814, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
208 "NODE_11804_length_273_cov_2.186813": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_11804_length_273_cov_2.186813", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 293, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 1097, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
209 "NODE_12878_length_198_cov_2.358586": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_12878_length_198_cov_2.358586", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 218, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 1431, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
210 "NODE_19170_length_305_cov_2.147541": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_19170_length_305_cov_2.147541", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 325, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 1689, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
211 "NODE_23972_length_201_cov_2.452736": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_23972_length_201_cov_2.452736", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 221, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 2056, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
212 "NODE_25171_length_223_cov_2.869955": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_25171_length_223_cov_2.869955", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 243, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 2317, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
213 "NODE_26170_length_196_cov_2.658163": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_26170_length_196_cov_2.658163", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 216, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 2601, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
214 "NODE_28488_length_231_cov_2.290043": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_28488_length_231_cov_2.290043", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 251, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 2857, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
215 "NODE_29471_length_195_cov_5.102564": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_29471_length_195_cov_5.102564", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 215, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 3149, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
216 "NODE_30404_length_252_cov_1.480159": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_30404_length_252_cov_1.480159", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 272, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 3404, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
217 "NODE_30635_length_192_cov_2.947917": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_30635_length_192_cov_2.947917", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 212, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 3717, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
218 "NODE_34404_length_184_cov_7.989130": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_34404_length_184_cov_7.989130", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 204, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 3969, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
219 "NODE_36516_length_195_cov_3.517949": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_36516_length_195_cov_3.517949", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 215, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 4213, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
220 "NODE_41230_length_277_cov_3.498195": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_41230_length_277_cov_3.498195", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 297, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 4468, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
221 "NODE_42422_length_182_cov_2.609890": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_42422_length_182_cov_2.609890", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 202, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 4806, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
222 "NODE_43724_length_236_cov_3.500000": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_43724_length_236_cov_3.500000", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 256, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 5048, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
223 "NODE_44676_length_185_cov_1.421622": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_44676_length_185_cov_1.421622", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 205, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 5345, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
224 "NODE_53327_length_192_cov_1.854167": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "NODE_53327_length_192_cov_1.854167", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 212, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 5590, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 60, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 61},
225 },
226 err: nil,
227 },
228 {
229 in: `NODE_7194_length_226_cov_2.672566 246 35 60 61
230 NODE_7195_length_193_cov_2.906736 213 321 60 61
231 NODE_7419_length_181_cov_4.668508 201 573 60 61
232 NODE_7473_length_222_cov_10.977477 242 814 60 61
233 NODE_11804_length_273_cov_2.186813 293 1097 60 61
234 NODE_12878_length_198_cov_2.358586 218 1431 60 61
235 NODE_19170_length_305_cov_2.147541 325 1689 60 61
236 NODE_23972_length_201_cov_2`,
237 idx: nil,
238 err: parseErrorscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/parseError().(8, 1, csvscip-go gomod github.com/golang/go/src go1.19 `encoding/csv`/.ErrFieldCountscip-go gomod github.com/golang/go/src go1.19 `encoding/csv`/ErrFieldCount.),
239 },
240 {
241 in: `NODE_7194_length_226_cov_2.672566 246 35 60 61
242 NODE_7195_length_193_cov_2.906736 213 321 60 61
243 NODE_7419_length_181_cov_4.668508 201 573 60 61
244 NODE_7473_length_222_cov_10.977477 242 814 60 61
245 NODE_11804_length_273_cov_2.186813 293 1097 60 61
246 NODE_12878_length_198_cov_2.358586 218 1431 60 61
247 NODE_19170_length_305_cov_2.147541 325 1689 60 61
248 NODE_23972_length_201_cov_2.452736 221 2056 60 61
249 NODE_25171_length_223_cov_2.869955 243 2317 60 61
250 NODE_26170_length_196_cov_2.658163 216 2601 60 61
251 NODE_28488_length_231_cov_2.290043 251 2857 60 61
252 NODE_29471_length_195_cov_5.102564 215 3149 60 61
253 NODE_30404_length_252_cov_1.480159 272 3404 60 61` + "\t" + `
254 NODE_30635_length_192_cov_2.947917 212 3717 60 61
255 NODE_34404_length_184_cov_7.989130 204 3969 60 61
256 NODE_36516_length_195_cov_3.517949 215 4213 60 61
257 NODE_41230_length_277_cov_3.498195 297 4468 60 61
258 NODE_42422_length_182_cov_2.609890 202 4806 60 61
259 NODE_43724_length_236_cov_3.500000 256 5048 60 61
260 NODE_44676_length_185_cov_1.421622 205 5345 60 61
261 NODE_53327_length_192_cov_1.854167 212 5590 60 61
262 `,
263 idx: nil,
264 err: parseErrorscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/parseError().(13, 1, csvscip-go gomod github.com/golang/go/src go1.19 `encoding/csv`/.ErrFieldCountscip-go gomod github.com/golang/go/src go1.19 `encoding/csv`/ErrFieldCount.),
265 },
266 {
267 in: `NODE_7194_length_226_cov_2.672566 246 35 60 61
268 NODE_7195_length_193_cov_2.906736 213 321 60 61
269 NODE_7419_length_181_cov_4.668508 201 573 60 61
270 NODE_7473_length_222_cov_10.977477 242 814 60 61
271 NODE_11804_length_273_cov_2.186813 293 1097 60 61
272 NODE_12878_length_198_cov_2.358586 218 1431 60 61
273 NODE_19170_length_305_cov_2.147541 325 1689 60 61
274 NODE_23972_length_201_cov_2.452736 221 2056 60 61
275 NODE_25171_length_223_cov_2.869955 243 2317 60 61
276 NODE_26170_length_196_cov_2.658163 216 2601 60 61
277 NODE_28488_length_231_cov_2.290043 251 2857 60 61
278 NODE_29471_length_195_cov_5.102564 215 3149 60 61
279 NODE_30404_length_252_cov_1.480159 272 3404 60 61
280 NODE_12878_length_198_cov_2.358586 218 1431 60 61
281 NODE_34404_length_184_cov_7.989130 204 3969 60 61
282 NODE_36516_length_195_cov_3.517949 215 4213 60 61
283 NODE_41230_length_277_cov_3.498195 297 4468 60 61
284 NODE_42422_length_182_cov_2.609890 202 4806 60 61
285 NODE_43724_length_236_cov_3.500000 256 5048 60 61
286 NODE_44676_length_185_cov_1.421622 205 5345 60 61
287 NODE_53327_length_192_cov_1.854167 212 5590 60 61
288 `,
289 idx: nil,
290 err: parseErrorscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/parseError().(14, 0, ErrNonUniquescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/ErrNonUnique.),
291 },
292 {
293 in: `NODE_7194_length_226_cov_2.672566 246 35 60 61
294 NODE_7195_length_193_cov_2.906736 213 321 60 61
295 NODE_7419_length_181_cov_4.668508 201 573 60 61
296 NODE_7473_length_222_cov_10.977477 242 814 60 61
297 NODE_11804_length_273_cov_2.186813 293 1097 60 61
298 NODE_12878_length_198_cov_2.358586 218 1431 60 61
299 NODE_19170_length_305_cov_2.147541 325 1689 60 61
300 NODE_23972_length_201_cov_2.452736 221 2056 sixty 61
301 NODE_25171_length_223_cov_2.869955 243 2317 60 61
302 NODE_26170_length_196_cov_2.658163 216 2601 60 61
303 NODE_28488_length_231_cov_2.290043 251 2857 60 61
304 NODE_29471_length_195_cov_5.102564 215 3149 60 61
305 NODE_30404_length_252_cov_1.480159 272 3404 60 61
306 NODE_30635_length_192_cov_2.947917 212 3717 60 61
307 NODE_34404_length_184_cov_7.989130 204 3969 60 61
308 NODE_36516_length_195_cov_3.517949 215 4213 60 61
309 NODE_41230_length_277_cov_3.498195 297 4468 60 61
310 NODE_42422_length_182_cov_2.609890 202 4806 60 61
311 NODE_43724_length_236_cov_3.500000 256 5048 60 61
312 NODE_44676_length_185_cov_1.421622 205 5345 60 61
313 NODE_53327_length_192_cov_1.854167 212 5590 60 61
314 `,
315 idx: nil,
316 err: parseErrorscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/parseError().(8, 3, &strconvscip-go gomod github.com/golang/go/src go1.19 strconv/.NumErrorscip-go gomod github.com/golang/go/src go1.19 strconv/NumError#{
317 Funcscip-go gomod github.com/golang/go/src go1.19 strconv/NumError#Func.: "ParseInt",
318 Numscip-go gomod github.com/golang/go/src go1.19 strconv/NumError#Num.: "sixty",
319 Errscip-go gomod github.com/golang/go/src go1.19 strconv/NumError#Err.: strconvscip-go gomod github.com/golang/go/src go1.19 strconv/.ErrSyntaxscip-go gomod github.com/golang/go/src go1.19 strconv/ErrSyntax.,
320 }),
321 },
322 } {
323 got, err := ReadFromscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/ReadFrom().(stringsscip-go gomod github.com/golang/go/src go1.19 strings/.NewReaderscip-go gomod github.com/golang/go/src go1.19 strings/NewReader().(test.in))
324 if !reflectscip-go gomod github.com/golang/go/src go1.19 reflect/.DeepEqualscip-go gomod github.com/golang/go/src go1.19 reflect/DeepEqual().(err, test.err) {
325 t.Errorfscip-go gomod github.com/golang/go/src go1.19 testing/common#Errorf().("unexpected error for test %d: got:%#v want:%#v", i, err, test.err)
326 }
327 if !reflectscip-go gomod github.com/golang/go/src go1.19 reflect/.DeepEqualscip-go gomod github.com/golang/go/src go1.19 reflect/DeepEqual().(got, test.idx) {
328 t.Errorfscip-go gomod github.com/golang/go/src go1.19 testing/common#Errorf().("unexpected result for test %d: got:%#v want:%#v", i, got, test.idx)
329 }
330 }
331 }
332
333 func TestWriteToscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/TestWriteTo().(t *testingscip-go gomod github.com/golang/go/src go1.19 testing/.Tscip-go gomod github.com/golang/go/src go1.19 testing/T#) {
334 for i, test := range []struct {
335 idx Indexscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Index#
336 want string
337 }{
338 {
339 idx: Indexscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Index#{
340 "FN654386.1": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.1", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 100, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 12, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 70, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 71},
341 "FN654386.2": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.2", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 100, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 126, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 70, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 71},
342 "FN654386.3": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.3", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 100, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 240, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 70, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 71},
343 },
344 want: `FN654386.1 100 12 70 71
345 FN654386.2 100 126 70 71
346 FN654386.3 100 240 70 71
347 `,
348 },
349 {
350 // Map iteration order is stated to be unspecified, but in practice,
351 // maps that are shorter than one bucket have consistent order, so
352 // provide a different ordering.
353 idx: Indexscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Index#{
354 "FN654386.2": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.2", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 100, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 126, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 70, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 71},
355 "FN654386.1": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.1", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 100, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 12, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 70, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 71},
356 "FN654386.3": Recordscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#{Namescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Name.: "FN654386.3", Lengthscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Length.: 100, Startscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#Start.: 240, BasesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BasesPerLine.: 70, BytesPerLinescip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/Record#BytesPerLine.: 71},
357 },
358 want: `FN654386.1 100 12 70 71
359 FN654386.2 100 126 70 71
360 FN654386.3 100 240 70 71
361 `,
362 },
363 } {
364 var buf bytesscip-go gomod github.com/golang/go/src go1.19 bytes/.Bufferscip-go gomod github.com/golang/go/src go1.19 bytes/Buffer#
365 err := WriteToscip-go gomod github.com/biogo/hts . `github.com/biogo/hts/fai`/WriteTo().(&buf, test.idx)
366 if err != nil {
367 t.Errorfscip-go gomod github.com/golang/go/src go1.19 testing/common#Errorf().("unexpected error: got:%v", err)
368 }
369 got := buf.Stringscip-go gomod github.com/golang/go/src go1.19 bytes/Buffer#String().()
370 if got != test.want {
371 t.Errorfscip-go gomod github.com/golang/go/src go1.19 testing/common#Errorf().("unexpected result for test %d: got:\n%s\nwant:%s", i, got, test.want)
372 }
373 }
374 }