Skip to content

Getting started

Fleur Kelpin edited this page Aug 26, 2020 · 6 revisions

This guide will help you to set up the commander and it will explain the basic concepts.

Running for the first time

The first time you run the commander, a short guide will help you to configure it. To run it, go:

mcmd

(If you don't see the guide but get the help page instead, it means you have already run the commander before.)

When this is done, a folder will have been added to your home folder: ~/.mcmd/. In this folder there will be a file called mcmd.yaml. This is the configuration file, and it will contain the settings you just entered. All the settings are explained further in the configuration file.

Feel free to take a look at all the commands that are available:

mcmd --help

Home folder

The home folder will contain:

  • history.log A file containing the execution history. (Also accessible via mcmd history)
  • mcmd.yaml The configuration file.
  • scripts/ A folder that contains commander scripts. (See the Scripts documentation)
  • issues/ A folder containing files that have been downloaded from GitHub issues.

Some of these files or folders may not be there yet. They will appear automatically when they are needed for the first time.

Adding resource folders

When you open the configuration file, you will see a section called resources. Here you can add folders that contain datasets or other resources you want to use, for example:

resources:
  dataset_folders: 
    - /path/to/your/datasets/
    - /path/to/other/datasets/
  resource_folders: 
    - /path/to/resources/
  • Datasets are file types supported by the MOLGENIS importer (EMX, VCF, OWL, etc.)
  • Resources are any other types of files you might want to upload (.css, images, etc.)

The commander will look through these folders when doing things like importing or uploading files. This is the default behaviour for all commands.

Given the configuration above, if you have a file dataset.xlsx in /path/to/you/datasets/, you can import it with:

mcmd import dataset

This saves you the hassle of typing the full path to the file. Of course, you can still do this if you really want to:

mcmd import --from-path /path/to/your/datasets/dataset.xlsx

Most commands that handle files have a --from-path argument to override the default behaviour.

Managing servers

The commander can interact with more than one server. You can add and change servers in the configuration file, but actually it's easier to do this with commands. You can add a server with:

mcmd config add host

Adding a host

If you want to see information about the currently selected server, you can use:

mcmd ping

Checking the current server

And finally, you can change the server with:

mcmd config set host

Setting a host

Clone this wiki locally