Skip to content

Run Automatically Docker

Saulo edited this page Apr 13, 2016 · 4 revisions

#Automatically - Docker Cnidaria can be run completely automatically using the Make system.

1. Create a data folder data

mkdir data

2. Create one folder to each of your samples. The name of the sample will be the name of the folder. be wise.

mkdir data/sample1 && cp <YOUR ORIGINAL DATA FOLDER 1>/*.fastq.gz data/sample1/
mkdir data/sample2 && cp <YOUR ORIGINAL DATA FOLDER 2>/*.fastq.gz data/sample2/
  • The extensions allowed are .fq.gz .fastq.gz .fastq .fasta.gz .fa.gz .fasta .fa

3. create three files:

data/do.sh

The command to be run inside the virtual machine

#!/bin/bash

set -xeu

make

run.sh

Caller of do.sh

#!/bin/bash

set -xeu

docker run --rm -it --name cnidaria_running -v $PWD/data:/home/cnidaria/cnidaria/data/data -v $PWD/out:/home/cnidaria/cnidaria/data/out sauloal/cnidaria_full data/do.sh

clean.sh

clean all files

#!/bin/bash

set -xeu

rm data/*/*.{jf,timming} || true
find data/ -type d -exec chmod 777 {} \;

rm -rf out    || true
mkdir out     || true
chmod 777 out

4. run clean.sh to change folder permission and create output folder

bash clean.sh

5. change data/do.sh for different outputs (Check Automatically for options)

6. run ./run.sh to analyse the data

bash run.sh