A non-optimized Julia program to calculate fitness centrality in networks
-
Visit the official Julia website: https://julialang.org/downloads/
-
Download the appropriate version for your operating system
-
Run the installer and follow the prompts
-
Verify the installation:
- Open a terminal or command prompt
- Type
juliaand press Enter - You should see the Julia REPL (Read-Eval-Print Loop) start up
-
Exit
juliaby pressing<ctrl+d>.
After installing Julia, you need to set up the project environment. This process ensures that all required dependencies are installed and your project is isolated from other Julia projects.
-
Open a terminal or command prompt.
-
Navigate to the directory containing the FitnessCentrality project files.
-
Start Julia in project mode by typing:
julia --projectThis command starts Julia and activates the project environment defined in the current directory.
-
Once Julia starts, you'll see the Julia REPL (Read-Eval-Print Loop). It looks like this:
julia> -
Enter the package manager mode by pressing
]. The prompt will change to:(@v1.x) pkg>The
@v1.xshows your Julia version number. -
In the package manager, run the
instantiatecommand:(@v1.x) pkg> instantiateThis command reads the
Project.tomlfile in your project directory, creates theManifest.tomlfile, and installs all the required packages and their dependencies. It might take a few minutes, especially on the first run. -
Once the instantiation is complete, exit the package manager by pressing the Backspace key. This will return you to the Julia REPL.
-
You can now exit Julia by pressing
ctrl+dor by typing:julia> exit()
After completing these steps, your project environment is set up and ready to use. You won't need to repeat this process unless you move the project to a new machine or update the project's dependencies.
- Input files contain the list of edges of the network, one per line.
- Nodes can be specified as integers or strings.
- The program automatically detects the number of columns:
- If more than two columns are found, the network is treated as weighted.
- File extension (e.g.,
.net) is arbitrary; files are essentially CSV or TSV format.
Execute the program with the following command:
julia --project FitnessCentrality.jl filename
Where filename is the path to the network file you want to analyze. For example:
julia --project FitnessCentrality.jl networks/star-wheel.net
The program will ask if the network is directed. Type y if this is the case.
The analysis results are placed in the results/ folder.