diff --git a/Project.toml b/Project.toml index 3be19c2..7874b09 100644 --- a/Project.toml +++ b/Project.toml @@ -14,7 +14,7 @@ TableTraits = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" TableTraitsUtils = "382cd787-c1b6-5bf2-a167-d5b971a19bda" [compat] -Bedgraph = "1.2" +Bedgraph = "2.3" DataValues = "0.4" FileIO = "1.0.1" IterableTables = "0.9, 0.10, 0.11, 1" diff --git a/src/BedgraphFiles.jl b/src/BedgraphFiles.jl index f200428..3c200ee 100644 --- a/src/BedgraphFiles.jl +++ b/src/BedgraphFiles.jl @@ -71,16 +71,6 @@ function Base.collect(T::Type, x::BedgraphFile) return collect(T, getiterator(x)) end -function Base.convert(::Type{T}, nt::NamedTuple{(:chrom, :first, :last, :value),Tuple{String,Int64,Int64,R}}) where {R <: Real, T<: Bedgraph.Record} - @debug "Convert - strict." - return T(nt.chrom, nt.first, nt.last, nt.value) -end - -function Base.convert(::Type{T}, nt::NamedTuple{names,Tuple{String,Int64,Int64,R}}) where {R <: Real, names, T<: Bedgraph.Record} - @debug "Convert - names." - return T(nt[1], nt[2], nt[3], nt[4]) -end - function Vector{T}(x) where {T <: Bedgraph.Record} return collect(T, getiterator(x)) end @@ -96,7 +86,7 @@ function save(file::BedgraphFileFormat, records::Vector{<:Bedgraph.Record}; bump sort!(records) - header = Bedgraph.generateBasicHeader(records, bump_forward = bump_forward) #TODO: consolidate header generation and determine whether there is a need for bump_forward. + header = Bedgraph.generate_basic_header(records, bump_forward = bump_forward) #TODO: consolidate header generation and determine whether there is a need for bump_forward. return save(file, header, records) end diff --git a/test/runtests.jl b/test/runtests.jl index 56d4287..179106b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -76,10 +76,6 @@ using .Bag # Check return of data from save method. @test Bag.records == Bag.records |> save(Bag.tmp_output_path) - # Check convert - @test Bag.record == convert(Bedgraph.Record, (chrom = "chr1", first=1, last=1, value=0)) - @test Bag.record == convert(Bedgraph.Record, (chrom = "chr1", left=1, right=1, value=0)) - @testset "Integrations" begin include("integrations/test-Tables.jl") include("integrations/test-QueryOperators.jl")