Installation
First you need Julia 0.5.2 installed. A new version of MIToS with Julia 0.6 support is under development, we expect to release it soon. The MIToS' stable version can be installed by typing on the Julia REPL:
Pkg.add("MIToS")
If everything goes well with the installation, MIToS will be loaded without errors by typing:
using MIToS
You can optionally do an exhaustive test of your installed version of MIToS with Pkg.test
(it takes few seconds):
Pkg.test("MIToS")
Ways to run Julia
Option | Description |
---|---|
Julia REPL![]() | Built-in Julia command line. Start an Julia interactive session (REPL) by double-clicking the Julia executable or running julia from the system command line. |
JuliaBox![]() | You can try Julia from your web browser. No installation is required. |
IJulia![]() | Jupyter/IPython notebook for Julia. It was used for generating the this documentation. |
Juno![]() | Integrated Development Environment (IDE). |
Plots installation
Julia plotting capabilities are available through external packages. MIToS make use of RecipesBase to define plot recipes, which can be plotted using Plots and different backends. You need to install Plots
to plot MIToS objects:
Pkg.add("Plots")
And you also need to install at least one of the following backends:
Pkg.add("PyPlot")
Pkg.add("GR") # Fast
Pkg.add("PlotlyJS") # Interactive
You need to load Plots in order to use the plot
function. There is more information about it in the Plots documentation.
using Plots
To generate graph (network), arc and chord (circo) plots, you also need to install and load PlotRecipes.
Pkg.add("PlotRecipes")
using PlotRecipes
Scripts location
The MIToS’ scripts are located in the MIToS/scripts
folder and can be runned from your system command line. It’s possible to ask Julia for the location of the installed package using Pkg.dir
joinpath(Pkg.dir("MIToS"), "scripts")
You might want to add this folder into your PATH
to easily access MIToS’ scripts.
How to add the script folder to PATH
in Bash?
You can do it by adding the path of the MIToS script folder into the ~/.bashrc
file:
open(joinpath(homedir(), ".bashrc"), "r+") do fh
path_to_scripts = joinpath(Pkg.dir("MIToS"), "scripts")
if all(line -> !contains(line, path_to_scripts), eachline(fh))
println(fh, "export PATH=\"\$PATH:", path_to_scripts, "\"")
end
end