Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rioualen committed Jun 2, 2016
1 parent 5223eab commit 083b74c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 28 deletions.
10 changes: 5 additions & 5 deletions doc/gene-regulation_tutorials/gene-regulation_with_IFB_cloud.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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/
```


Expand All @@ -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
```
Expand Down
18 changes: 10 additions & 8 deletions doc/gene-regulation_tutorials/gene-regulation_with_docker.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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/`.
Expand Down
33 changes: 18 additions & 15 deletions doc/gene-regulation_tutorials/gene-regulation_with_virtualbox.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -258,37 +266,32 @@ 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
```


# 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
```

Expand Down

0 comments on commit 083b74c

Please sign in to comment.