meringlab / FlashWeave.jl

Inference of microbial interaction networks from large-scale heterogeneous abundance data
Other
70 stars 8 forks source link

MethodError: no method matching nv(::SimpleWeightedGraphs.SimpleWeightedGraph{Int64, Float64}) #29

Closed markobudinich closed 2 years ago

markobudinich commented 2 years ago

Hi all,

I'm having an error while testing FlashWeave 0.18 on julia 1.6.2. I downloaded HMP_SRA_gut_small.tsv and simply run

julia> using FlashWeave
julia> data_path = "HMP_SRA_gut_small.tsv"
julia> net_learn = learn_network(data_path)

It finished the inference, but got a problem getting the network. Any ideas of what might be going on?

Best, Marko

PS. The full Stacktrace:

Network:
Error showing value of type FlashWeave.FWResult{Int64}:
ERROR: MethodError: no method matching nv(::SimpleWeightedGraphs.SimpleWeightedGraph{Int64, Float64})
Closest candidates are:
  nv(::LightGraphs.SimpleGraphs.AbstractSimpleGraph{T}) where T at /root/.julia/packages/LightGraphs/IgJif/src/SimpleGraphs/SimpleGraphs.jl:57
  nv(::LightGraphs.AbstractGraph) at /root/.julia/packages/LightGraphs/IgJif/src/interface.jl:141
Stacktrace:
  [1] show(io::IOContext{Base.TTY}, result::FlashWeave.FWResult{Int64})
    @ FlashWeave ~/.julia/packages/FlashWeave/464SQ/src/types.jl:253
  [2] show(io::IOContext{Base.TTY}, #unused#::MIME{Symbol("text/plain")}, x::FlashWeave.FWResult{Int64})
    @ Base.Multimedia ./multimedia.jl:47
  [3] (::REPL.var"#38#39"{REPL.REPLDisplay{REPL.LineEditREPL}, MIME{Symbol("text/plain")}, Base.RefValue{Any}})(io::Any)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:220
  [4] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:462
  [5] display(d::REPL.REPLDisplay, mime::MIME{Symbol("text/plain")}, x::Any)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:213
  [6] display(d::REPL.REPLDisplay, x::Any)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:225
  [7] display(x::Any)
    @ Base.Multimedia ./multimedia.jl:328
  [8] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
  [9] invokelatest
    @ ./essentials.jl:706 [inlined]
 [10] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:247
 [11] (::REPL.var"#40#41"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:231
 [12] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:462
 [13] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:229
 [14] (::REPL.var"#do_respond#61"{Bool, Bool, REPL.var"#72#82"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:798
 [15] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
 [16] invokelatest
    @ ./essentials.jl:706 [inlined]
 [17] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2441
 [18] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:1126
 [19] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL ./task.jl:411
jtackm commented 2 years ago

Hi Marko,

Yes, this problem started coming up recently due to changes in a dependency. I made a fix today, could you try the master branch (]add FlashWeave#master) and let me know if that works?

markobudinich commented 2 years ago

Works like a charm now!

Thanks, Marko

On 21 Oct 2021, at 17:21, jtackm @.***> wrote:

Hi Marko,

Yes, this problem started coming up recently due to changes in a dependency. I made a fix today, could you try the master branch (]add FlashWeave#master) and let me know if that works?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/meringlab/FlashWeave.jl/issues/29#issuecomment-948719161, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3BNLXABNM2MJGH5PJ4BUDUIAVWRANCNFSM5GOKVXLQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jtackm commented 2 years ago

Great, I'll hopefully get to tag it soon