#!/bin/bash

#You can not run docker on many high performance computing systems
#due to sudo permissions etc.
#However, singularity can be run on them. Due to this reason, I prepared
#this file to show how you can prepare a singulartiy sif file from docker
#image of PRESCOTT.

#STEP 0: First thing first! You must have singularity installed on your system.
#        If not, you can find the installation instructions here:
#        https://github.com/sylabs/singularity/blob/main/INSTALL.md
#        In addition, there are different releases(deb, rpm or source) in the following page:
#        https://github.com/sylabs/singularity/releases

#STEP 1: Building singularity from the docker image online:
#        Please note that you will need to change (v1.5.0) to the version you want
#        if there is an update in the version. 
singularity build prescott-docker-v1.5.0.sif docker://tekpinar/prescott-docker:v1.5.0

#STEP 2: Running escott with the sif file:
singularity exec prescott-docker-v1.5.0.sif escott -h

#STEP 3: Running prescott with the sif file:
singularity exec prescott-docker-v1.5.0.sif prescott -h

#STEP 4: Go to the folder where both aliBLAT.fasta and blat-af2.pdb are located.
#        These two files are provided in the data folder of this repository.
#        YOUR_SINGULARITY_DIR is where prescott-docker-v1.5.0.sif file located. 
singularity exec --home `pwd` $YOUR_SINGULARITY_DIR/prescott-docker-v1.5.0.sif escott aliBLAT.fasta --pdbfile blat-af2.pdb
