tomouellette/CanEvolve.jl

Issue when running the example code

Closed this issue · 4 comments

Hi @tomouellette ,

I encounter a bug when I running the code:

julia> using Pkg

julia> Pkg.activate(".")
  Activating project at `/data/xieduo/Tom_SSL/CanEvolve.jl`

julia> p, n = autoSimulation(1, 0.1, nsubclone_min = 1, nsubclone_max = 2, ndrivers = 3, lower_cutoff = 0.1, upper_cutoff = 0.4)
ERROR: MethodError: no method matching autoSimulation(::Int64, ::Float64; nsubclone_min=1, nsubclone_max=2, ndrivers=3, lower_cutoff=0.1, upper_cutoff=0.4)
Closest candidates are:
  autoSimulation(::Any, ::Any; Nfinal, noise, lower_cutoff, upper_cutoff, nsubclone_min, nsubclone_max, alt_reads, trim) at ~/.julia/packages/CanEvolve/u1KW5/src/automation.jl:59 got unsupported keyword argument "ndrivers"
Stacktrace:
 [1] kwerr(::NamedTuple{(:nsubclone_min, :nsubclone_max, :ndrivers, :lower_cutoff, :upper_cutoff), Tuple{Int64, Int64, Int64, Float64, Float64}}, ::Function, ::Int64, ::Float64)
   @ Base ./error.jl:163
 [2] top-level scope
   @ REPL[5]:1

Maybe it was caused by the inconsistency between the function autoSimulation and the code?

Thank you,

Best,
Duo

Hi Duo,

In Julia after activating a package with Pkg.activate(".") you would also need to call using [PackageNameHere]. So in this case, you need to go:

Pkg.activate(".")
using CanEvolve

That should fix the problem - if the problem still persists please let me know. I'll update the README for clarity.

And one other thing in addition to calling using CanEvolve, autoSimulation doesn't take ndrivers as an argument - I will update the README accordingly.

I re-installed this locally and was able to generate the correct data.

I guess that worked for you? I'm going to close this issue, but feel free to re-open if you're still having problems.

Hi @tomouellette ,

This works well for me. Sorry for not replying.