Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikstranneheim committed Feb 13, 2018
1 parent 303845e commit 2c38426
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 53 deletions.
33 changes: 15 additions & 18 deletions docs/MIP_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ reads from the Illumina platform in fastq(.gz) format to generate annotated
ranked potential disease causing variants.
MIP performs QC, alignment, coverage analysis, variant discovery and
annotation, sample checks as well as ranking the found variants according to disease potential
with a minimum of manual intervention. MIP is compatible with `Scout`_ and `Puzzle`_ for visualization of
identified variants.
with a minimum of manual intervention. MIP is compatible with `Scout`_ for visualization of
identified variants. MIP analyses snv, indels and SV.
MIP has been in use in the clinical production at the Clinical Genomics facility at Science for
Life Laboratory since 2014.

Features
--------
- Installation
* Simple automated install of all programs using conda/SHELL via supplied install script
* Simple automated install of all programs using conda/SHELL via supplied install script
* Downloads and prepares references in the installation process
- Autonomous
* Checks that all dependencies are fulfilled before launching
* Builds/Prepares/downloads references and/or files missing before launching
* Builds and prepares references and/or files missing before launching
* Decompose and normalise reference(s) and variant vcf(s)
* Splits and merges files/contigs for samples and families when relevant
- Automatic
Expand All @@ -33,11 +34,12 @@ Features
* Design your own workflow by turning on/off relevant modules
* Restart an analysis from anywhere in your workflow
* Process one, or multiple samples using the module(s) of your choice
* Supply parameters on the command line, in a pedigree file or via config files
* Supply parameters on the command line, in a pedigree.yaml file or via config files
* Simulate your analysis before performing it
* Redirect each modules analysis process to a temporary directory (@nodes or @login)
* Limit a run to a specific set of genomic intervals
* Use multiple variant callers and annotation programs
* Use multiple variant callers for both snv, indels and SV
* Use multiple annotation programs
* Optionally split data into clinical variants and research variants
- Fast
* Analyses an exome trio in approximately 4 h
Expand All @@ -48,7 +50,7 @@ Features
* Recreate your analysis from the MIP log or generated config files
* Logs sample meta-data and sequence meta-data
* Logs version numbers of softwares and databases
* Checks sample integrity (sex and relationship)
* Checks sample integrity (sex, contamination,duplications, ancestry, inbreeding and relationship)
* Test data output existens and integrity using automated tests
- Annotation
* Gene annotation
Expand All @@ -64,12 +66,14 @@ Features
* Use standard formats whenever possible
- Visualization
* Ranks variants according to pathogenic potential
* Output is directly compatibel with Scout and Puzzle
* Output is directly compatibel with `Scout`_


Example Usage
-------------
``perl mip.pl -pMosaikBuild 0 -configFile 1_config.yaml``
.. code-block:: console
$ mip --family_id [family_id] --pbwa_mem 1 --config_file [mip_config.yaml] --pedigree_file [family_id_pedigree.yaml]
Getting Started
---------------
Expand All @@ -84,16 +88,14 @@ Change log (See :doc:`change_log`)
Prerequisites
~~~~~~~~~~~~~~

MIP will only require prerequisites when processing a modules that has dependencies (See :doc:`setup`).
However, some frequently used sequence manipulation tools e.g. samtools, PicardTools, Bedtools are probably
good to have in your path.
MIP will only require prerequisites when processing a modules that has dependencies both programs
and references (See :doc:`setup`).


Meta-Data
^^^^^^^^^^
Meta data regarding the pedigree, gender and phenotype should be supplied for the analysis.

- Pedigree file (`PLINK`_-format; See :doc:`pedigree_file` & MIP´s github `repository`_).
- Configuration file (`YAML`_-format; See :doc:`configuration_file` & MIP´s github `repository`_).

Usage
Expand All @@ -104,10 +106,6 @@ MIP is called from the command line and takes input from the command line
Lists are supplied as comma separated input, repeated flag entries on the command line or
in the config using the yaml format for arrays.

.. note::

List or repeated entries need to be submitted with the same order for each element across all
supplied lists.

Only flags that will actually be used needs to be specified and MIP will check that all
required parameters and dependencies (for these flags only) are set before submitting to SLURM.
Expand Down Expand Up @@ -216,7 +214,6 @@ This is an example of a workflow that MIP can perform (used @CMMS).


.. _Scout: https://github.com/Clinical-Genomics/scout
.. _Puzzle: https://github.com/robinandeer/puzzle
.. _PLINK: http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml
.. _Mosaik: https://github.com/wanpinglee/MOSAIK
.. _BWA: http://bio-bwa.sourceforge.net/
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
# built documents.
#
# The short X.Y version.
version = '4.0'
version = '5.0'
# The full version, including alpha/beta/rc tags.
release = '4.0.0'
release = '5.0.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
103 changes: 70 additions & 33 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,45 @@ Installation

Automated Installation
~~~~~~~~~~~~~~~~~~~~~~
This installation procedure assumes that you have a working perl version and a `Miniconda`_
This installation procedure assumes that you have a working perl version (>= 5.10) and a `Miniconda`_
installation.

1. "Install" MIP

.. code-block:: console
clone the official git repository
Clone the official git repository
$ git clone https://github.com/henrikstranneheim/MIP.git
$ cd MIP
After this you can decide whether to make MIP an "executable" by either adding the install directory to the ``$PATH`` in e.g. "``~/.bash_profile``" or move all the files from this directory to somewhere already in your path like "``~/usr/bin``".
Remember to make the file(s) executable by ``chmod +x file``.

2. Create the install instructions for MIP
*Optional*

.. code-block:: console
$ perl install.pl
This will generate a batch script "mip.sh" for the install in your working directory.
3. Run the bash script
Test conda and mip_install
$ cd t; prove mip_install.t
$ cd -
2. Create the install instructions for MIP

.. code-block:: console
$ bash mip.sh
This will install all the dependencies of MIP and other modules included in MIP into a conda environment (defaults to "mip").
However a fresh version of perl and cpanm is installed outside of the conda environment, but are activated through bashrc and bash_profile.
$ perl mip_install.pl
This will generate a batch script "mip.sh" for the install in your working directory. Use ``--help`` to see
parameters that can be used in the installation process.

*Conda*

You can decide to install in the conda default environment or use a conda environment with ``--env [env_name]``.
If you have installed conda in another location than the default you have to supply the path to the location
using ``--conda_dir_path [conda_directory_path]``.

*Perl*

MIP requires perl version (>=5.18) and the installation process will upgrade the perl version to at least 5.18 for the user
if you enable ``--perl_install``. Cpanm will be installed if you install a new perl version and used to download required
perl modules. Currently MIP does not use the conda perl installation, but installs perl and cpanm outside of conda.

.. note::

Expand All @@ -43,16 +54,54 @@ installation.
'eval `perl -I ~/perl-PERLVERSION/lib/perl5/ -Mlocal::lib=~/perl-PERLVERSION/`' >> ~/.bash_profile
'export PERL_UNICODE=SAD' >> ~/.bash_profile
*References*

MIP requires many references depending on what modules in MIP you decide to run. MIP ships with a download script
that will attempt to download references that are available in public repositories. This feature can be enables with
by supplying a ``--reference_dir [reference_dir]`` in the installation process.

.. note::

Some references are quite large and will take time to download.

3. Run the bash script

.. code-block:: console
$ bash mip.sh
This will install all the dependencies of MIP and other modules included in MIP into a conda environment.
However a fresh version of perl and cpanm is installed, if enabled, outside of the conda environment, but are activated through bashrc and bash_profile.
*Optional*

Make sure to activate your conda environment if that option was used above.

.. code-block:: console
Test Perl modules and MIP
$ cd t; prove run_tests.t
$ cd -
3. Run MIP

*Conda default environment*

.. code-block:: console
$ mip
*Conda environment*

.. code-block:: console
$ source activate mip
$ mip.pl -h
$ source activate conda_env
$ mip
Manual Perl Installation
~~~~~~~~~~~~~~~~~~~~~~~~

Manual Installation
~~~~~~~~~~~~~~~~~~~~
We recommend using the automated installation procedure, but you can also install Perl manually.

1. Install a fresh copy of Perl

Expand All @@ -62,27 +111,15 @@ Manual Installation

.. code-block:: console
$ INSTALLER_PERL_VERSION=5.16.0
$ INSTALLER_PERL_VERSION=5.18.0
$ perlbrew switch perl-$INSTALLER_PERL_VERSION
3. "Install" MIP

.. code-block:: console
clone the official git repository
$ git clone https://github.com/henrikstranneheim/MIP.git
$ cd MIP
$ perl mip.pl -h
After this you can decide whether to make MIP an "executable" by either adding the install directory to the ``$PATH`` in e.g. "``~/.bash_profile``" or move all the files from this directory to somewhere already in your path like "``~/usr/bin``".
Remember to make the file(s) executable by ``chmod +x file``.
4. Dependencies
3. Dependencies

You need to make sure all depedencies are installed and loaded (See :doc:`setup`).
However, MIP should tell you if something is missing.

5. To install the dependencies - use cpanm:
4. To install the perl module dependencies - use cpanm:

.. code-block:: console
Expand Down

0 comments on commit 2c38426

Please sign in to comment.