# Installation

MacSyFinder works with models for macromolecular systems that are not shipped with it, you have to install them separately. See the msf_data section below. We also provide container so you can use macsyfinder directly.

## MacSyFinder Installation procedure

To develop new models and share them, MacSyFinder requires git and the python librarie GitPython

Below the procedure to install MacSyFinder in modeler mode in a virtualenv

    python3 -m venv macsyfinder
    cd macsyfinder
    source bin/activate
    python3 -m pip install macsyfinder[model]

GitPython dependency will be automatically retrieved and installed when using pip for installation (see below).

Warning

But you have to install git by yourself (using your preferred package manager)

### From Conda/Mamba

From version 2.0 and above, MacSyFinder is packaged for Conda/Mamba The Conda/Mamba package include modeler dependencies

### From container

From version 2.0 and above, a docker image is available. This image allow you to develop models.

## Models installation with msf_data

Once MacSyFinder is installed you have access to an utility program to manage the models: msf_data

This script allows to search, download, install and get information from MacSyFinder models stored on github (https://github.com/macsy-models) or locally installed. The general syntax for msf_data is:

    msf_data <general options> <subcommand> <sub command options> <arguments>

To list all models available on macsy-models:

    msf_data available

To search for models on macsy-models:

    msf_data search TXSS

you can also search in models description:

    msf_data search -S secretion

To install a model package:

    msf_data install <model name>

To install a model when you have not the right to install it system-wide

To install it in your home (./macsyfinder/data):

    msf_data install --user <model name>

To install it in any directory:

    msf_data install --target <model dir> <model_name>

To know how to cite a model package:

    msf_data cite <model name>

To show the name of the models and the structure of installed model package:

    msf_data show <model package name>

for instance `msf_data show TXSScan`

    TXSScan
        ├-archaea
        │   └-Archaeal-T4P
        └-bacteria
             ├-diderm
             │   ├-Flagellum
             │   ├-MSH
             │   ├-T1SS
             │   ├-T2SS
             │   ├-T3SS
             │   ├-T4aP
             │   ├-T4bP
             │   ├-T5aSS
             │   ├-T5bSS
             │   ├-T5cSS
             │   ├-T6SSi
             │   ├-T6SSii
             │   ├-T6SSiii
             │   ├-T9SS
             │   ├-Tad
             │   ├-pT4SSi
             │   └-pT4SSt
             └-monoderm
                  └-ComM

    TXSScan (1.1.3) : 19 models

To show the model definition:

    msf_data definition <package or subpackage> model1 [model2, ...]

for instance to show model definitions T6SSii and T6SSiii in TXSS+/bacterial subpackage:

    msf_data definition TXSS+/bacterial T6SSii T6SSiii

To show all models definitions in TXSS+/bacterial subpackage:

    msf_data definition TXSS+/bacterial

To create a git repository with a skeleton for your own model package:

    msf_data init --pack-name <MY_PACK_NAME> --maintainer <"mantainer name"> --email <maintainer email> --authors <"author1, author2, ..">

above msf_data with required options. Below I add optioanl but recommended options.

    msf_data init --pack-name <MY_PACK_NAME> --maintainer <"mantainer name"> --email <maintainer email> --authors <"author1, author2, .."> \
    --license cc-by-nc-sa --holders <"the copyright holders"> --desc <"one line package description">

To list all msf_data subcommands:

    msf_data --help

To list all available options for a subcommand:

    msf_data <subcommand> --help

For models not stored in macsy-models the commands available, search, installation from remote or upgrade from remote are NOT available.

For models NOT stored in macsy-models, you have to manage them semi-manually. Download the archive (do not unarchive it), then use msf_data to install the archive.