rapids/docs/usage/installation.rst

127 lines
4.0 KiB
ReStructuredText
Raw Normal View History

2019-12-12 00:29:57 +01:00
Installation
===============
2019-12-18 23:13:37 +01:00
This instructions have been tested on MacOS Catalina and Ubuntu 16.04. If you find a problem, please report it.
2019-12-12 00:29:57 +01:00
2019-12-18 23:13:37 +01:00
Mac OS (tested on Catalina)
----------------------------
2019-12-12 00:29:57 +01:00
2019-12-18 23:13:37 +01:00
#. Install MySQL
2019-12-12 00:29:57 +01:00
2019-12-18 23:13:37 +01:00
- ``brew install mysql``
- ``brew services start mysql``
2019-12-12 00:29:57 +01:00
2019-12-18 23:13:37 +01:00
#. Install R, pandoc and rmarkdown:
2019-12-12 00:29:57 +01:00
2019-12-18 23:13:37 +01:00
- ``brew install r``
- ``brew install pandoc``
- ``R -e 'install.packages(c( "rmarkdown"), repos = "http://cran.us.r-project.org")'``
2019-12-12 00:29:57 +01:00
2019-12-18 23:13:37 +01:00
#. Install miniconda:
2020-02-06 22:43:38 +01:00
2019-12-18 23:13:37 +01:00
- ``brew cask install miniconda``
- ``conda init zsh`` or ``conda init bash``
- Restart terminal if necessary
2019-12-18 21:23:58 +01:00
2019-12-18 23:13:37 +01:00
#. Clone our repo:
2019-12-12 00:29:57 +01:00
2020-02-06 22:43:38 +01:00
- ``git clone https://github.com/carissalow/rapids``
2019-12-12 00:29:57 +01:00
2019-12-18 23:13:37 +01:00
#. Create a python virtual environment:
2019-12-12 00:29:57 +01:00
2019-12-18 23:13:37 +01:00
- ``conda env create -f environment.yml -n MY_ENV_NAME``
- ``conda activate MY_ENV_NAME``
2019-12-12 00:29:57 +01:00
2019-12-18 23:13:37 +01:00
#. Install r packages and virtual environment:
2019-12-12 00:29:57 +01:00
2019-12-18 23:13:37 +01:00
- ``snakemake packrat_install``
- ``snakemake packrat_init``
- ``snakemake packrat_restore``
2019-12-12 00:29:57 +01:00
2019-12-18 23:13:37 +01:00
#. Configure the participants to analyze:
2019-12-12 00:29:57 +01:00
2019-12-18 23:13:37 +01:00
- Create a file per participant in the ``/data/external`` folder, no extension is necessary, its name will be the label for that participant in the pipeline: ``/data/external/pxx``
- Add a line with the device_id(s) of that participant as it appears on the database. If multiple device ids, all data for this participant will be relabeled with the last one
- Add a line with the mobile platform (android, or ios)
- For example:
2020-02-06 22:43:38 +01:00
2019-12-18 23:13:37 +01:00
.. code-block:: bash
2019-12-12 00:29:57 +01:00
2019-12-18 23:13:37 +01:00
3a7b0d0a-a9ce-4059-ab98-93a7b189da8a,44f20139-50cc-4b13-bdde-0d5a3889e8f9
android
2019-12-12 00:29:57 +01:00
2019-12-18 23:13:37 +01:00
#. Configure the db connection:
- Create an empty .env file in the root folder
2020-02-06 22:43:38 +01:00
- Add and complete the following lines:
2019-12-18 23:13:37 +01:00
| ``[MY_GROUP_NAME]``
| ``user=MyUSER``
| ``password=MyPassword``
| ``host=MyIP``
| ``port=3306``
Linux (tested on Ubuntu 16.04)
------------------------------
#. Install dependenies:
2020-02-06 22:43:38 +01:00
- ``sudo apt-get install libmariadb-client-lgpl-dev libxml2-dev libssl-dev``
- Install brew_ for linux and add the following line to ~/.bashrc: ``export PATH=$HOME/.linuxbrew/bin:$PATH``
- ``source ~/.bashrc``
2019-12-18 23:13:37 +01:00
#. Install MySQL
- ``brew install mysql``
- ``brew services start mysql``
#. Install R, pandoc and rmarkdown:
- ``brew install r``
- ``brew install gcc@6`` (needed due to this bug_)
- ``HOMEBREW_CC=gcc-6 brew install pandoc``
- ``R -e 'install.packages(c( "rmarkdown"), repos = "http://cran.us.r-project.org")'``
#. Install miniconda using these instructions_
#. Clone our repo:
2020-02-06 22:43:38 +01:00
- ``git clone https://github.com/carissalow/rapids``
2019-12-18 23:13:37 +01:00
#. Create a python virtual environment:
- ``conda env create -f environment.yml -n MY_ENV_NAME``
- ``conda activate MY_ENV_NAME``
#. Install r packages and virtual environment:
- ``snakemake packrat_install``
- ``snakemake packrat_init``
- ``snakemake packrat_restore``
#. Configure the participants to analyze:
- Create a file per participant in the ``/data/external`` folder, no extension is necessary, its name will be the label for that participant in the pipeline: ``/data/external/pxx``
- Add a line with the device_id(s) of that participant as it appears on the database. If multiple device ids, all data for this participant will be relabeled with the last one
- Add a line with the mobile platform (android, or ios)
- For example:
2020-02-06 22:43:38 +01:00
2019-12-18 23:13:37 +01:00
.. code-block:: bash
3a7b0d0a-a9ce-4059-ab98-93a7b189da8a,44f20139-50cc-4b13-bdde-0d5a3889e8f9
android
#. Configure the db connection:
- Create an empty .env file in the root folder
2020-02-06 22:43:38 +01:00
- Add and complete the following lines:
2019-12-18 23:13:37 +01:00
| ``[MY_GROUP_NAME]``
| ``user=MyUSER``
| ``password=MyPassword``
| ``host=MyIP``
| ``port=3306``
.. _bug: https://github.com/Homebrew/linuxbrew-core/issues/17812
.. _instructions: https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html
.. _brew: https://docs.brew.sh/Homebrew-on-Linux