#!/bin/csh

# 0. Add phylum annotations to dbs sequences: type '../bin/fatax - ' to see how to do this.

# 1. Convert NCBI CDD mfasta curated alignment for Frizzled domain (FzA.fa == cd07066) into 
#    a template alignment in cma format FzA.tpl and from this create mapgaps profiles:
#    FzA_X.tpl, FzA_X.cma, FzA_X.dft and FzA.mpa

../bin/mapgaps FzA

# 2. Run MAPGAPS on phylum annotated fasta sequence file

../bin/mapgaps FzA_X dbsFz -Refine=95:90 -e=1e-8 > dbsFz_A.out

# 4a. Run BPPS steps 1-3 with default settings and with a file of paths to pdb coordinate files.

../bin/bpps A dbsFz_A pdb_paths >& dbsFz_A.err

# 4b. Run BPPS E to evaluate the consistency between two runs for the same input alignment ('dbsFzB').

../bin/bpps E dbsFz_B dbsFz_C > dbsFzBvsC.eval

# 5a. Run SIPRIS with spherical clustering; use -pml option to generate 

../bin/sipris dbsFz_B_himsa_5.sprs S -pml > dbsFz_B_himsa_5.sprs_S.out

