2020-08-14 00:36:38 +02:00
.. _analysis-workflow-example:
2020-08-05 15:41:46 +02:00
Analysis Workflow Example
==========================
This is a quick guide for creating and running a simple pipeline to analysis an example dataset with 2 participants.
#. Install RAPIDS. See :ref: `Installation Section <install-page>` .
2020-08-15 00:36:40 +02:00
#. Configure your database credentials (see the example below or step 1 of :ref: `Usage Section <db-configuration>` for more information).
2020-08-05 15:41:46 +02:00
2020-08-15 00:36:40 +02:00
- Create an `` .env `` file at the root of RAPIDS folder
- Your MySQL user must have write permissions because we will restore our example database
- Name your credentials group `` MY_GROUP `` .
- If you are trying to connect to a local MySQL server from our docker container set your host according to this link_.
- You can name your database any way you want, for example `` rapids_example ``
2020-08-14 23:59:05 +02:00
2020-08-18 17:40:11 +02:00
.. code-block :: bash
2020-08-15 00:36:40 +02:00
[MY_GROUP]
user=rapids
password=rapids
2020-08-18 17:30:44 +02:00
host=127.0.0.1
2020-08-15 00:36:40 +02:00
port=3306
database=rapids_example
#. Make sure your conda environment is active (the environment is already active in our docker container). See step 6 of :ref: `install-page` .
2020-08-05 15:47:29 +02:00
2020-09-10 16:58:47 +02:00
#. If you installed RAPIDS from GitHub (did not use docker) you need to download the `example db backup <https://osf.io/skqfv/files/> `_ and save it to `` data/external/rapids_example.sql `` .
2020-08-14 23:59:05 +02:00
#. Run the following command to restore database from `` rapids_example.sql `` file::
2020-08-05 15:41:46 +02:00
2020-08-14 23:59:05 +02:00
snakemake -j1 restore_sql_file
2020-08-05 15:41:46 +02:00
2020-08-05 15:55:04 +02:00
#. Create example participants files with the following command::
2020-08-05 15:41:46 +02:00
snakemake -j1 create_example_participant_files
#. Run the following command to analysis the example dataset.
- Execute over a single core::
snakemake -j1 --profile example_profile
- Execute over multiple cores (here, we use 8 cores)::
2020-08-05 15:47:29 +02:00
2020-08-05 15:41:46 +02:00
snakemake -j8 --profile example_profile
2020-08-14 23:59:05 +02:00
.. _link: https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach