ian-small / Chloe.jl

5 stars 6 forks source link

Index error when calling chloe from the command-line #5

Open sivico26 opened 3 years ago

sivico26 commented 3 years ago

Hi there!

I would like to integrate chloe in a pipeline I am developing. I have not been able to run it from the command line properly. I had no problems installing the dependencies from the Project.toml.

This is what I am trying currently:

chloe.jl annotate -o zmays_chloe z_mays.fasta

With the following result:

[ Info: found mmap file for: NC_005086
[ Info: found mmap file for: JX512022
[ Info: found mmap file for: NC_002202
[ Info: found mmap file for: NC_026040
[ Info: found mmap file for: NC_001666
[ Info: found mmap file for: AP005672
[ Info: found mmap file for: NC_031333
[ Info: found mmap file for: NC_030504
[ Info: found mmap file for: KT634228
[ Info: found mmap file for: NC_024542
[ Info: found mmap file for: NC_022137
[ Info: found mmap file for: Z00044
[ Info: found mmap file for: NC_004543
[ Info: found mmap file for: MF177093
[ Info: found mmap file for: NC_016986
[ Info: found mmap file for: FJ755183
[ Info: found mmap file for: AP000423
[ Info: found mmap file for: NC_001319
[ Info: found mmap file for: NC_021438
ERROR: LoadError: BoundsError: attempt to access 3-element Vector{SubString{String}} at index [4]
Stacktrace:
  [1] getindex
    @ ./array.jl:801 [inlined]
  [2] (::Main.Annotator.var"#37#38"{String, Dict{String, Main.Annotator.FeatureTemplate}, Vector{String}})(f::IOStream)
    @ Main.Annotator ~/Programs/chloe/src/Annotations.jl:197
  [3] open(f::Main.Annotator.var"#37#38"{String, Dict{String, Main.Annotator.FeatureTemplate}, Vector{String}}, args::String; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base ./io.jl:330
  [4] open
    @ ./io.jl:328 [inlined]
  [5] readTemplates(file::String)
    @ Main.Annotator ~/Programs/chloe/src/Annotations.jl:189
  [6] readReferences(refsdir::String, templates::String; verbose::Bool, forward_only::Bool)
    @ Main.Annotator ~/Programs/chloe/src/annotate_genomes.jl:338
  [7] annotate(refsdir::String, templates::String, fa_files::Vector{String}, output::String; verbose::Bool, forward_only::Bool)
    @ Main.Annotator ~/Programs/chloe/src/annotate_genomes.jl:682
  [8] chloe(; refsdir::String, fasta_files::Vector{String}, template::String, output::String, forward_only::Bool, verbose::Bool)
    @ Main.CmdLine ~/Programs/chloe/src/chloe_cmd.jl:30
  [9] (::Main.CmdLine.var"#11#12"{Dict{Symbol, Any}})()
    @ Main.CmdLine ~/Programs/chloe/src/chloe_cmd.jl:171
 [10] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:491
 [11] with_logger
    @ ./logging.jl:603 [inlined]
 [12] cmd_main()
    @ Main.CmdLine ~/Programs/chloe/src/chloe_cmd.jl:164
 [13] top-level scope
    @ ~/Programs/chloe/chloe.jl:9
in expression starting at /home/sivico26/Programs/chloe/chloe.jl:7

I did some setup before running the line above:

Do you know what might be causing the troubles? Is something not properly set? I would really appreciate your thoughts.

Cheers,

PD: I think it will be helpful if the README includes the setup steps that are necessary to run chloe (i.e downloading the references, create the mmaps, etc.)

ian-small commented 3 years ago

Hi Simon, it looks like Chloe had a problem reading the templates. The code you're using was experimental, not ready for general use yet. If you can wait a bit, there's a new version coming that a) works better and b) should be easier to use (doesn't require mmaps etc). In the meantime I would highly recommend using the website instead, which although also experimental, should at least be a bit more user-friendly...

sivico26 commented 3 years ago

Hi Ian, thanks for the quick reply.

Indeed, I opted to use the webserver for an initial benchmark against other annotators. I am quite confident that chloë is going to have the edge. However, as I want to integrate chloë in a pipeline I am developing, I can not use the web server for that kind of automation.

It is great to hear about the next release! I will look forward to its appearance. Please let me know. Do you have a guess about the release timeline? This would really help me to discuss with the development team and better schedule ourselves.

Cheers

ian-small commented 3 years ago

Should be finished this month, hopefully next week or the week after

sivico26 commented 3 years ago

Thank you Ian! I will be looking forward.

Cheers