#!/bin/sh -ve

PFSEARCH=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/pfsearch
PFSCAN=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/pfscan
GTOP=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/gtop
HTOP=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/htop
PFSCALE=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/pfscale
PFMAKE=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/pfmake
PFW=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/pfw
PTOH=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/ptoh
PTOF=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/ptof
X2FT=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/2ft
PSA2MSA=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/psa2msa

CMPDIR=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/share/data/cmp

echo "#----------------------------------------------------------------------#"
echo "# PATHS"
echo "#----------------------------------------------------------------------#"
echo "# PFSEARCH=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/pfsearch"
echo "# PFSCAN=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/pfscan"
echo "# GTOP=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/gtop"
echo "# HTOP=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/htop"
echo "# PFSCALE=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/pfscale"
echo "# PFMAKE=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/pfmake"
echo "# PFW=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/pfw"
echo "# PTOH=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/ptoh"
echo "# PTOF=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/ptof"
echo "# 2FT=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/2ft"
echo "# PSA2MSA=/opt/conda/conda-bld/pftools_1678138247791/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/psa2msa"
echo "#----------------------------------------------------------------------#"
echo "# pftools test 1: pfsearch -f -C 6.0 sh3.prf sh3.seq"
echo "#----------------------------------------------------------------------#"
$PFSEARCH -f sh3.prf VAV_HUMAN.seq
echo "#----------------------------------------------------------------------#"
echo "# pftools test 2: pfsearch -bx ecp.prf CVPBR322.embl | psa2msa -du"
echo "#----------------------------------------------------------------------#"
$PFSEARCH -bx ecp.prf CVPBR322.embl | $PSA2MSA -du
echo "#----------------------------------------------------------------------#"
echo "# pftools test 3: pfscan -s GTPA_HUMAN.dat prosite13.prf"
$PFSCAN -s GTPA_HUMAN.dat prosite13.prf
echo "#----------------------------------------------------------------------#"
echo "# pftools test 4: pfscan -by -C 2 CVPBR322.embl ecp.prf"
echo "#----------------------------------------------------------------------#"
$PFSCAN -by -C 2 CVPBR322.embl ecp.prf
echo "#----------------------------------------------------------------------#"
echo "# pftools test 5: gtop -F 50 sh3.gpr | pfsearch -far - sh3.seq"
echo "#                    | sort -nr"
echo "#----------------------------------------------------------------------#"
$GTOP -F 50 sh3.gpr | ${PFSEARCH} -far - sh3.seq | sort -nr
echo "#----------------------------------------------------------------------#"
echo "# pftools test 6: htop pfam_sh3.hmm  | pfsearch -f - sh3.seq"
echo "                     | sort -nr"
echo "#----------------------------------------------------------------------#"
$HTOP pfam_sh3.hmm | ${PFSEARCH} -f - sh3.seq | sort -nr
#echo "#----------------------------------------------------------------------#"
#echo "# pftools test 6b: htop htop_issue.hmm"
#echo "#----------------------------------------------------------------------#"
#FIXME Fortran runtime error: $HTOP htop_issue.hmm
echo "#----------------------------------------------------------------------#"
echo "# pftools test 7: pfw -N 1000 sh3.msf |"
echo "#                  pfmake -b -H 0.6 - blosum45.cmp"
echo "#----------------------------------------------------------------------#"
$PFW -N 1000 sh3.msf | ${PFMAKE} -b -H 0.6 - $CMPDIR/blosum45.cmp
echo "#----------------------------------------------------------------------#"
echo "# pftools test 8: ptoh -L 1.15 ecp.prf"
echo "#----------------------------------------------------------------------#"
$PTOH -L 1.15 ecp.prf
echo "#----------------------------------------------------------------------#"
echo "# pftools test 9: pfscale -N 14147368 -P 0.0001 -Q 0.000001 score.lis"
echo "#                  | sed -n 1,25p"
echo "#----------------------------------------------------------------------#"
$PFSCALE -N 14147368 -P 0.0001 -Q 0.000001 score.lis | sed -n 1,25p
echo "#----------------------------------------------------------------------#"
echo "# pftools test 10: pfsearch -y coils.prf MYSA_HUMAN"
echo "#----------------------------------------------------------------------#"
$PFSEARCH -y coils.prf MYSA_HUMAN

