#!/bin/bash

# The bicycle command under docker
# the current working directory (pwd) will be seen insice docker as /data
alias bicycle="docker run --rm -v `pwd`/data:/data -u `id -u \`whoami\`` -it singgroup/bicycle bicycle"

if [ ! -d "data" ]; then
  wget https://www.sing-group.org/bicycle/downloads/sample-data.zip
  unzip sample-data.zip -d data
fi

rm -rf data/myproject

bicycle create-project -p data/myproject -r data/ref_genomes -f data/reads
bicycle reference-bisulfitation -p data/myproject
bicycle reference-index -p data/myproject -t 4
bicycle align -p data/myproject -t 4
bicycle analyze-methylation -p data/myproject -n 4 -a -e from_control_genome=Ecoli



