Update installation instructions

replace/0defd6c654e986e3bd2ff6b97fc84c04a3814c63
JulioV 2019-12-18 17:13:37 -05:00
parent 91214b367a
commit 739d3f0315
1 changed files with 96 additions and 35 deletions

View File

@ -1,54 +1,115 @@
Installation Installation
=============== ===============
This instructions have been tested on MacOS Cataline and Ubuntu 16.04. If you find a problem, please report it. This instructions have been tested on MacOS Catalina and Ubuntu 16.04. If you find a problem, please report it.
Install MySQL Mac OS (tested on Catalina)
----------------------------
- ``brew install mysql`` #. Install MySQL
- ``brew services start mysql``
Install R and rmarkdown: - ``brew install mysql``
- ``brew services start mysql``
- ``brew install r`` #. Install R, pandoc and rmarkdown:
- ``brew install pandoc``
- ``R -e 'install.packages(c( "rmarkdown"))'``
Install miniconda: - ``brew install r``
- ``brew install pandoc``
- ``R -e 'install.packages(c( "rmarkdown"), repos = "http://cran.us.r-project.org")'``
For Mac: #. Install miniconda:
- ``brew cask install miniconda``
- ``conda init zsh`` or ``conda init bash``
- Restart terminal if necessary
- ``brew cask install miniconda`` #. Clone our repo:
- ``conda init zsh`` or - ``conda init bash``
Clone our repo:
- ``git clone https://github.com/carissalow/moshi-aware-pipeline`` - ``git clone https://github.com/carissalow/moshi-aware-pipeline``
Create a python virtual environment: #. Create a python virtual environment:
- ``conda env create -f environment.yml`` - ``conda env create -f environment.yml -n MY_ENV_NAME``
- Restart terminal if necessary - ``conda activate MY_ENV_NAME``
- ``conda activate moshi-env``
Install r packages and virtual environment: #. Install r packages and virtual environment:
- ``snakemake packrat_install`` - ``snakemake packrat_install``
- ``snakemake packrat_init`` - ``snakemake packrat_init``
- ``snakemake packrat_restore`` - ``snakemake packrat_restore``
Configure the participants to analyze: #. Configure the participants to analyze:
- Add a file per participant and name it with the label for that participant, no extension is necessary: ``/data/external/pxx`` - 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 for that participant as it appears on the db - 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) - Add a line with the mobile platform (android, or ios)
- For example:
.. code-block:: bash
Configure the db connection: 3a7b0d0a-a9ce-4059-ab98-93a7b189da8a,44f20139-50cc-4b13-bdde-0d5a3889e8f9
android
- Create an empty .env file in the root folder #. Configure the db connection:
- Add and complete the following lines
| ``[MY_GROUP_NAME]`` - Create an empty .env file in the root folder
| ``user=MyUSER`` - Add and complete the following lines
| ``password=MyPassword`` | ``[MY_GROUP_NAME]``
| ``host=MyIP`` | ``user=MyUSER``
| ``port=3306`` | ``password=MyPassword``
| ``host=MyIP``
| ``port=3306``
Linux (tested on Ubuntu 16.04)
------------------------------
#. 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:
- ``git clone https://github.com/carissalow/moshi-aware-pipeline``
#. 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:
.. 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
- Add and complete the following lines
| ``[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