Installation Guide#

Now that we have a general understanding of MEGqc and its Metrics reports, this section will guide you through the installation of MEGqc.

Required dependencies?

The installation method includes all the depencies required to run the GUI and helper scripts. All core requirements are version pinned in pyproject.toml to ensure consistent installations.

Installers#

  • Download the ZIP package: 📦 Installers

  • Extract the ZIP file and run the script: After extracting the ZIP, you will see one subfolder per operating system. Each subfolder contains a specific installation script:

OS

Script

How to Run

Windows 10/11

install_MEGqc.bat

Double-click and Run in the Security Warning

Linux

install_MEGqc.sh

Allow execution (see below) and run the installer

MacOS

install_MEGqc.command

Allow execution (see below) and run the installer

folders

Allow script execution and run the installer for Linux and MacOS users#

Linux systems:#

If you’re working in Linux, you’ll need first to allow the .sh script execution. This can be done in two different ways:

Right click and select “Open terminal here” or open a terminal and use:

cd /path/to/your/installer

Give execute permissions to the installer

chmod +x install_bids_manager.sh

Or alternatively

chmod 755 install_bids_manager.sh

Run the installer

./install_bids_manager.sh

Allow “execute” option in XFCE systems

xfconf-query --channel thunar --property /misc-exec-shell-scripts-by-default --create --type bool --set true

Give execute permissions to the installer

chmod +x install_bids_manager.sh

Or alternatively

chmod 755 install_bids_manager.sh

Run the installer

./install_bids_manager.sh

MacOS systems:#

Because the installer is not from the App Store, macOS will initially block it.

  • Double-click install_bids_manager.command will open a warning ⚠️ dialog. Cick Done.

mac-error
  • Open System Settings and scroll until Privacy & Security.

mac-settings
  • In the Security section, you should now see a mesage about the blocked attempt. Click Open Anyways to allow it.

mac-security

Installation completed! 🎉#

After the installation finishes, you will find two shortcuts on your desktop:

OS

Launch

Uninstall

Windows

run_MEGqc.bat

uninstall_MEGqc.bat

Linux

MEGqc

Uninstall MEGqc

MacOS

MEGqc.command

Uninstall MEGqc.command

  • To open the app, double click on the launcher.

  • First time to launch will take a minute. For the next times that you open the app, the initialization will be faster.

  • To uninstall the app, double click on the uninstall launcher.

Where is MEGqc installed? 🤨#

Installation paths

You can find your MEGqc installed in the following full paths:

Windows:

C:\Users\<your_user>\MEGqc

Linux:

/home/<your_user>/MEGqc

MacOS:

/Users/<your_user>/MEGqc

What if you don’t like GUIs and want to work with commands in the python environment where MEGqc is installed? 🤨#

Activate the environment#

The installer automatically creates and manages a virtual environment (learn more about virtual environments). If you want to manually activate the environment from a terminal or command prompt you can use the following full paths:

Environment activation full path

Windows:

\Users\<your user>\MEGqc\env\Scripts\activate

Linux:

source home/<your user>/MEGqc/env/bin/activate

MacOS:

source Users/<your user>/MEGqc/env/bin/activate

After activation the following commands become available:

  • megqc – opens GUI (similar to the desktop launcher)

  • run-megqc – runs the MEGqc calculation module, you need to add --inputdata followed up by the path to your dataaset. Optionally you can add --subs followed up by the list of subjects ID you want (default all) and n_jobs with the number of pararllel jobs (default 1).

  • run-megqc-plotting – runs the plotting module, you need to add --inputdata followed up by the root path to the derivatives of the calculation module. You can optionally add --derivativs_output followed by the path to a folder to store the HTML reports outside the BIDS dataset.

  • globalqualityindex - recomputes the Global Quality Index, you need to add --inputdata followed by the path to the root of your BIDS dataset. You can optionally add --derivativs_output followed by the path to a folder to store the HTML reports outside the BIDS dataset.

Next section#

In the next section you’ll learn how to use the GUI to run MEGqc.