diff --git a/doc/gene-regulation_tutorials/gene-regulation_with_IFB_cloud.Rmd b/doc/gene-regulation_tutorials/gene-regulation_with_IFB_cloud.Rmd index 62c360ce..2aaf6966 100644 --- a/doc/gene-regulation_tutorials/gene-regulation_with_IFB_cloud.Rmd +++ b/doc/gene-regulation_tutorials/gene-regulation_with_IFB_cloud.Rmd @@ -104,12 +104,12 @@ Here we create a folder to store the source data files and download them . ``` ## Download input reads -mkdir -p ~/mydisk/GSE20870_analysis/data/GSM521934 -wget -v --no-clobber ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX%2FSRX021%2FSRX021358/SRR051929/SRR051929.sra -P ~/mydisk/GSE20870_analysis/data/GSM521934/ +mkdir -p ~/mydisk/GSE20870-analysis/data/GSM521934 +wget -v --no-clobber ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX%2FSRX021%2FSRX021358/SRR051929/SRR051929.sra -P ~/mydisk/GSE20870-analysis/data/GSM521934/ ## Download ChIP-seq reads -mkdir -p ~/mydisk/GSE20870_analysis/data/GSM521935 -wget -v --no-clobber ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX%2FSRX021%2FSRX021359/SRR051930/SRR051930.sra -P ~/mydisk/GSE20870_analysis/data/GSM521935/ +mkdir -p ~/mydisk/GSE20870-analysis/data/GSM521935 +wget -v --no-clobber ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX%2FSRX021%2FSRX021359/SRR051930/SRR051930.sra -P ~/mydisk/GSE20870-analysis/data/GSM521935/ ``` @@ -118,7 +118,7 @@ Note: the commands above can be adapted to download the data in any other direct ## 1.6 Run the workflow ``` -cd ~/mydisk/GSE20870_analysis/ +cd ~/mydisk/GSE20870-analysis/ ln -s ~/gene-regulation-2.0 gene-regulation snakemake -p -s gene-regulation/scripts/snakefiles/workflows/factor_workflow.py --configfile gene-regulation/examples/GSE20870/GSE20870.yml ``` diff --git a/doc/gene-regulation_tutorials/gene-regulation_with_docker.Rmd b/doc/gene-regulation_tutorials/gene-regulation_with_docker.Rmd index b0044282..7432a501 100644 --- a/doc/gene-regulation_tutorials/gene-regulation_with_docker.Rmd +++ b/doc/gene-regulation_tutorials/gene-regulation_with_docker.Rmd @@ -76,21 +76,23 @@ sudo apt-get --yes install docker In order to execute the study case GSE20870, you should enter the following commands: ``` -mkdir ~/GSE20870-analysis -mkdir ~/GSE20870-analysis/data/GSM521934 ~/GSE20870-analysis/data/GSM521935 +export ANALYSIS_DIR=~/GSE20870-analysis +mkdir $ANALYSIS_DIR +cd $ANALYSIS_DIR ``` ``` -cd ~/GSE20870-analysis/data/GSM521934 -wget -nc ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX%2FSRX021%2FSRX021358/SRR051929/SRR051929.sra -cd ~/GSE20870-analysis/data/GSM521935 -wget -nc ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX%2FSRX021%2FSRX021359/SRR051930/SRR051930.sra +mkdir data/GSM521934 +wget -nc ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX%2FSRX021%2FSRX021358/SRR051929/SRR051929.sra -P data/GSM521934 + +mkdir data/GSM521934 +wget -nc ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX%2FSRX021%2FSRX021359/SRR051930/SRR051930.sra -P data/GSM521934 ``` ## Fetch the Docker image and run it with shared folders ``` -docker pull rioualen/gene-regulation:1.0 -docker run -v ~/GSE20870-analysis/:~/GSE20870-analysis -it rioualen/gene-regulation:2.0 /bin/bash +docker pull rioualen/gene-regulation:2.0 +docker run -v $ANALYSIS_DIR:~/GSE20870-analysis -it rioualen/gene-regulation:2.0 /bin/bash ``` You can share as many folders as desired, using this syntax: `-v /path/on/host/:/path/on/docker/`. diff --git a/doc/gene-regulation_tutorials/gene-regulation_with_virtualbox.Rmd b/doc/gene-regulation_tutorials/gene-regulation_with_virtualbox.Rmd index 0c7e7746..3265b7b9 100644 --- a/doc/gene-regulation_tutorials/gene-regulation_with_virtualbox.Rmd +++ b/doc/gene-regulation_tutorials/gene-regulation_with_virtualbox.Rmd @@ -246,9 +246,17 @@ Reboot again to see the new display. Once in the virtual machine, you can install the required programs from a terminal. +## Create a base directory for the analysis + +``` +export ANALYSIS_DIR="~/GSE20870-analysis" +mkdir $ANALYSIS_DIR +``` + ## Get the `gene-regulation` repository ``` +cd $ANALYSIS_DIR wget https://github.com/rioualen/gene-regulation/archive/2.0.tar.gz tar zvxf 2.0.tar.gz ``` @@ -258,6 +266,7 @@ tar zvxf 2.0.tar.gz This may take a while (30mn to 1h) & source the `.bashrc` (it's been updated with the `$PATH` for newly installed applications). ``` +cd $ANALYSIS_DIR make -f gene-regulation-2.0/scripts/makefiles/install_tools_and_libs.mk all source ~/.bashrc ``` @@ -265,30 +274,24 @@ source ~/.bashrc # Executing snakemake workflow example -## Create study directory - -``` -mkdir ~/GSE20870-analysis -cd ~/GSE20870-analysis -``` - ## Download source data You can enter the following commands: + ``` -mkdir -p data/GSM521934 data/GSM521935 -``` -``` -cd data/GSM521934 -wget -nc ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX%2FSRX021%2FSRX021358/SRR051929/SRR051929.sra -cd data/GSM521935 -wget -nc ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX%2FSRX021%2FSRX021359/SRR051930/SRR051930.sra +cd $ANALYSIS_DIR + +mkdir -p data/GSM521934 +wget -nc ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX%2FSRX021%2FSRX021358/SRR051929/SRR051929.sra -P data/GSM521934 + +mkdir -p data/GSM521935 +wget -nc ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX%2FSRX021%2FSRX021359/SRR051930/SRR051930.sra -P data/GSM521935 ``` ## Execute workflow ``` -ln -s path/to/gene-regulation-2.0 gene-regulation +ln -s gene-regulation-2.0 gene-regulation snakemake -p -s gene-regulation/scripts/snakefiles/workflows/factor_workflow.py --configfile gene-regulation/examples/GSE20870/GSE20870.yml ```