Skip to content

Commit 4883728

Browse files
committed
Amendments
Base.bytesavailable is provided by CodecBGZF. Add compat entry for CodecBGZF. Keep using TranscodingStreams.
1 parent ef426b1 commit 4883728

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

Project.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ authors = ["Kenta Sato <bicycle1885@gmail.com>", "Ben J. Ward <benjward@protonma
44
version = "0.1.3"
55

66
[deps]
7-
BioCore = "37cfa864-2cd6-5c12-ad9e-b6597d696c81"
7+
BioGenerics = "47718e42-2ac5-11e9-14af-e5595289c2ea"
88
CodecBGZF = "d9d91ef6-315d-495b-8131-db2ca24339d6"
99
GenomicFeatures = "899a7d2d-5c61-547b-bef9-6698a8d05446"
1010
TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
1111

1212
[compat]
13-
BioCore = "2"
13+
BioGenerics = "0.1"
14+
CodecBGZF = "0.1"
1415
GenomicFeatures = "2"
1516
TranscodingStreams = "0.9.5"
1617
julia = "1.3"

src/Indexes.jl

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,12 @@
88

99
module Indexes
1010

11+
using TranscodingStreams
12+
1113
import CodecBGZF
12-
import BioCore
14+
import BioGenerics
1315
import GenomicFeatures: Interval
1416

15-
function Base.bytesavailable(stream::BGZFStreams.BGZFStream{IOStream})
16-
17-
block_index = BGZFStreams.ensure_buffered_data(stream)
18-
if block_index == 0
19-
return 0
20-
end
21-
block = stream.blocks[block_index]
22-
23-
return length(block.position:block.size)
24-
25-
end
26-
2717
include("chunk.jl")
2818
include("bgzfindex.jl")
2919
include("tabix.jl")

0 commit comments

Comments
 (0)