Julia and Pkg are the best

I have a pipeline that has Julia, R and python and bash-run docker clis and everything is fragile and breaking across builds.

But! when the julia package chokes on unexpected input, I dev the package, and revise (on by default in vs code) loads it up and fix the error. The code is just julia, not compiled c++, not docker images, so the problems can be fixed at the error.

The package manager is of course not perfect. But it is so much better than any of the others. The error messages are not perfect but they are SO much better than the others. Julia is still niche in Bioinformatics but it’s superiority for standard tasks over standard tools is striking.

Coding is horrible no matter what. But when you have a pipeline with these things next to each other the extraordinary excellence of Julia becomes clear. Just wanted to throw a log on the community fire and keep the excitement up.

21 Likes

I’m glad you like Julia, and I’m especially glad you like it for bioinformatics :wink:
Yes, I’ve also found Pkg to be a godsend for bioinfo projects. For bioinfo in particular, I can recommend also looking at JLL packages - for example, suppose you want to use minimap2 - instead of calling it with run(minimap2 ... ), you could instead do:

(my_project) pkg> add minimap2_jll
   [ output... ]

julia> using minimap2_jll

julia> run(`$(minimap2()) -h`)
Usage: minimap2 [options] <target.fa>|<target.idx> [query.fa] [...]
Options:
  Indexing:
    -H           use homopolymer-compressed k-mer (preferrable for PacBio)
    -k INT       k-mer size (no larger than 28) [15]
    -w INT       minimizer window size [10]
  [ ... ]

And in this way have minimap2 be an actual dependency of Julia, managed and downloaded by Pkg, and tracked in the Project.toml and Manifest.toml. The only downside is that, AFAIK, JLL packages must be binary executables and can’t be e.g. Perl or Python programs like NCBI’s blastn. So you might still need a Conda environment.

5 Likes

For what it’s worth, most JLL packages are libraries and not executables at all.

I think it’s possible with the right JLL dependencies. As an example polymake_jll depends on Perl_jll and

julia> using polymake_jll

julia> first(eachline(polymake_jll.polymake_path))
"#!/usr/bin/env perl"

Package dependencies for a foreign language might be an issue though.

1 Like