BioJulia / Phylogenies.jl

The BioJulia package for working with phylogenetic trees and geneologies.
MIT License
8 stars 4 forks source link

LoadError when "using Phylogenies" #7

Open nmatzke opened 5 years ago

nmatzke commented 5 years ago

Hi all,

I am using Julia v1.1, just installed fresh today. I want to try to run some phylogenetic calculations in Julia and see how much faster they are than R.

However, I'm hitting a problem right at the start. "Phylogenies" installs:

using Pkg
Pkg.add("Phylogenies")
 Resolving package versions...
  Updating `~/.julia/environments/v1.1/Project.toml`
 [no changes]
  Updating `~/.julia/environments/v1.1/Manifest.toml`

But then when I type:

using Phylogenies

I get...

[ Info: Precompiling Phylogenies [875022e3-a016-506a-99d3-0712b6c7904b]
ERROR: LoadError: LoadError: syntax: extra token "Indexer" after end of expression
Stacktrace:
 [1] include at ./boot.jl:326 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1038
 [3] include at ./sysimg.jl:29 [inlined]
 [4] include(::String) at /Users/nickm/.julia/packages/Phylogenies/T6qJZ/src/Phylogenies.jl:10
 [5] top-level scope at none:0
 [6] include at ./boot.jl:326 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1038
 [8] include(::Module, ::String) at ./sysimg.jl:29
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:328 [inlined]
 [11] eval(::Expr) at ./client.jl:404
 [12] top-level scope at ./none:3
in expression starting at /Users/nickm/.julia/packages/Phylogenies/T6qJZ/src/indexing.jl:18
in expression starting at /Users/nickm/.julia/packages/Phylogenies/T6qJZ/src/Phylogenies.jl:56
ERROR: Failed to precompile Phylogenies [875022e3-a016-506a-99d3-0712b6c7904b] to /Users/nickm/.julia/compiled/v1.1/Phylogenies/Rpymd.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1197
 [3] _require(::Base.PkgId) at ./loading.jl:960
 [4] require(::Base.PkgId) at ./loading.jl:858
 [5] require(::Module, ::Symbol) at ./loading.jl:853

Any help? Or am I using the wrong Julia phylogenies tool? What one is most-supported / best for basics (e.g. loading a Newick file, parsing the tree structure to get branchlengths, etc.)

Thanks very much, I know folks are very busy! Cheers, Nick

kescobo commented 5 years ago

Hi Nick, welcome!

Looking at the commits for this package, it seems it hasn't been updated since before Julia 1.0 came out. And looking at Travis, it seems @BenJWard was in the middle of upgrading to julia 0.6 when it was last touched. I'm guessing there's a bunch of deprecated syntax and it needs a bit of love to get it up to date.

That said, IIRC there's been a lot of churn in the ideas around phylogenies spread throughout a number of different packages. I don't know what the current state is, but I think there may be a working package somewhere. It would probably be worth leaving a note in the README of this package since it's in a prominent place.

Last comment - not precisely about this issue. If this is your first foray into julia, I wouldn't necessarily expect a phylogenies package to be substantially faster in julia, just because it's julia. the guts of many R packages are written in C to make them fast, and just have bindings in R. This trips up a lot of people. The key benefit of julia is that things can be made fast in julia, meaning that stuff is much more extensible and adaptable. And julia is a joy to code in, I just don't want you to have unrealistic expectations :-)

TransGirlCodes commented 5 years ago

For more functional phylogenetic julia pkg, I would check out: https://github.com/richardreeve/Phylo.jl I do hope for some of Richard's ideas to make it into Phylogenies when I get time to give the package some more love. Currently I'm working on getting de-novo assembly tools in BioJulia. But I was talking with my group this week about Pseudoseq, and how in addition to creating chromosomes, it might be nice to be able to use very simple evolutionary scenarios to generate the chromosome blueprints. So some Phylogenies.jl TLC might not be too far away but it's certainly not imminent right now.

kescobo commented 5 years ago

@BenJWard Do you think it makes sense to put some language to that effect in the README? I'd be happy to do the PR.

cecileane commented 5 years ago

you can also try PhyloNetworks. It has a focus on phylogenetic networks though, but they encompass trees. For phylogenetic comparative methods: tools have been developed very nicely by @pbastide for continuous traits (as the response), and we are actively developing tools for discrete traits.

nmatzke commented 5 years ago

Hi all! Thanks for the fast replies, I will explore the options given. Re: speed, yes, merely manipulating a tree might not be radically faster (although I am thoroughly tired of the ape phylo object in R, which is extremely messy for various things), but I suspect Julia will be much faster for e.g. exponentiating large matrices and similar things, and to try that out I'd rather not have to write my own tree objects and parsers etc.! Cheers! Nick

kescobo commented 5 years ago

but I suspect Julia will be much faster for e.g. exponentiating large matrices and similar things, and to try that out I'd rather not have to write my own tree objects and parsers etc.! Cheers! Nick

@nmatzke True! And if you do need to adapt something in julia to your own needs, I think you'll find it far more enjoyable extending something than you would in R - at least I do 😄