Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sivico26 opened this issue Oct 3, 2021 · 4 comments
Open

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

sivico26 opened this issue Oct 3, 2021 · 4 comments

Comments

@sivico26
Copy link

sivico26 commented Oct 3, 2021

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:

  • I downloaded the chloe_references.
  • I ran chloe.jl mmap *.fa in the chloe_references folder (fix a previous error saying there were no gwsas or mmap for the references)
  • Just out of caution, I also ran chloe.jl suffix *.fa and chloe.jl gff3 *.sff on the chloe_references folder.
  • I am running Julia 1.6.1

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
Copy link
Owner

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
Copy link
Author

sivico26 commented Oct 4, 2021

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
Copy link
Owner

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

@sivico26
Copy link
Author

sivico26 commented Oct 5, 2021

Thank you Ian! I will be looking forward.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants