CiaranOMara / BedgraphFiles.jl

FileIO.jl integration for bedGraph files
MIT License
2 stars 6 forks source link

Examples no longer work #18

Open edmundmiller opened 1 year ago

edmundmiller commented 1 year ago

Just running through the README and

# Load into an IndexedTable
it = IndexedTable(load("data.bedgraph"))

# Plot directly with Gadfly
plot(load("data.bedgraph"), xmin=:leftposition, xmax=:rightposition, y=:value, Geom.bar)

fails with


Closest candidates are:
  IndexedTable(::NDSparse; kwargs...)
   @ IndexedTables ~/.julia/packages/IndexedTables/boKfI/src/ndsparse.jl:12
  IndexedTable(::C, ::Vector{Int64}, ::Vector{IndexedTables.Perm}, ::Vector{Union{Missing, Float64}}, ::Any) where C<:(StructArrays.StructVector)
   @ IndexedTables ~/.julia/packages/IndexedTables/boKfI/src/indexedtable.jl:22

Stacktrace:
 [1] top-level scope

and

ERROR: MethodError: no method matching evalmapping(::BedgraphFiles.BedgraphFile, ::Symbol)

Closest candidates are:
  evalmapping(::Any, ::AbstractArray)
   @ Gadfly ~/.julia/packages/Gadfly/OQ068/src/mapping.jl:183
  evalmapping(::Any, ::Distributions.Distribution)
   @ Gadfly ~/.julia/packages/Gadfly/OQ068/src/mapping.jl:185
  evalmapping(::Gadfly.MeltedData, ::Symbol)
   @ Gadfly ~/.julia/packages/Gadfly/OQ068/src/mapping.jl:194
  ...

Stacktrace:
 [1] _evalmapping!(mapping::Dict{Symbol, Any}, data_source::BedgraphFiles.BedgraphFile, data::Gadfly.Data)
   @ Gadfly ~/.julia/packages/Gadfly/OQ068/src/mapping.jl:204
 [2] evalmapping!(mapping::Dict{Symbol, Any}, data_source::BedgraphFiles.BedgraphFile, data::Gadfly.Data)
   @ Gadfly ~/.julia/packages/Gadfly/OQ068/src/mapping.jl:233
 [3] plot
   @ ~/.julia/packages/Gadfly/OQ068/src/Gadfly.jl:327 [inlined]
 [4] plot(data_source::BedgraphFiles.BedgraphFile, elements::Type{Gadfly.Geom.BarGeometry}; mapping::Base.Pairs{Symbol, Symbol, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:xmin, :xmax, :y), Tuple{Symbol, Symbol, Symbol}}})
   @ Gadfly ~/.julia/packages/Gadfly/OQ068/src/Gadfly.jl:289
 [5] top-level scope
CiaranOMara commented 6 months ago

The instantiation of an IndexedTable appears to have become just table.

Sadly, Gadfly no longer works (see https://github.com/queryverse/IterableTables.jl/commit/8420c63e21bf7e7cde3b31b2b0ffdfc05be17850).