MiGA Manual
AboutCodebaseMiGA Online
Primary version
Primary version
  • Introduction
  • Part I: What is MiGA?
    • How can MiGA help me?
    • Who is using MiGA?
    • Who is behind MiGA?
    • Definitions
  • Part II: Getting started
    • Requirements
      • Using Homebrew
      • Using apt-get
      • Using Conda
      • Installing from source
      • MyTaxa Utils
    • Installation
    • MiGA types
    • Input data
    • Distances
    • Clustering
  • Part III: Interfaces
    • MiGA API
    • MiGA CLI
    • MiGA Web
  • Part IV: Deploying examples
    • RefSeq in MiGA
    • Build a clade collection
    • Launching daemons
    • Setting up MiGA in a cluster
  • Part V: Additional details
    • Advanced configuration
    • MiGA workflow
    • Metadata
    • External Software
  • Part VI: Workflows
    • Quality
    • Dereplicate
    • Classify
    • Preprocess
    • Index
    • Summaries
Powered by GitBook
On this page
  • Controlling many daemons at once
  • Sending an email when the project is ready
  1. Part V: Additional details

Advanced configuration

PreviousPart V: Additional detailsNextMiGA workflow

Last updated 4 years ago

MiGA allows flexible execution using a number of techniques, mainly setting , , and through the .

These are some examples of advanced behaviors that can be configured in MiGA

Controlling many daemons at once

The includes support for mass-controlled daemons when several MiGA projects are in the same folder using the miga lair command.

The MiGA Lair will find all the MiGA projects in a folder (or subfolders) and control all the corresponding daemons together:

# Check the current status of all the daemons
miga lair list -p /path/to/folder

# Terminate all the daemons at once
miga lair terminate -p /path/to/folder

# Launch and daemonize a process to keep all daemons running
miga lair start -p /path/to/folder

# See more options
miga lair -h

Sending an email when the project is ready

# First cd to the project folder
cd /path/to/project

# And open the MiGA Console
miga c

In the MiGA Console:

# Set the hook "on_preprocessing_ready" to
# execute a shell command ("run_cmd") consisting of
# sending an email with the project path ("{{project}}")
MiGA::Project.load('.').tap do |p|
  p.metadata[:on_preprocessing_ready] = [
    ['run_cmd', 'echo \'Project ready: {{project}}\' | sendmail me@example.com']
  ]
end.save
quit

Make sure to change /path/to/project to the project path and me@example.com to the email where you want to receive the notification. Also, note that depending on your sendmail configuration you might get that email in the spam folder (or flat-out rejected), so make sure to test sendmail first.

If your project runs for a long time and you want to be notified by email when it's ready, you can use :

daemon configuration
MiGA CLI
project metadata flags
dataset metadata flags
project hooks