#! /bin/tcsh -f

# This the main NetMHCII 1.1 script. It only acts as the frontend to the
# software proper, a compiled binary.
# 
# VERSION:	2009 July 17	launch
# 

###############################################################################
#               GENERAL SETTINGS: CUSTOMIZE TO YOUR SITE
###############################################################################

# full path to the NetMHCII 1.1 directory (mandatory)
#setenv	NMHOME	/home/peng/programs/SMM-align_031210_alldata
#setenv	NMHOME  /opt/netMHCII-1.1
# Determine NMHOME from the location of this script.
set rootdir = `dirname $0`
set abs_rootdir = `cd $rootdir && pwd`
setenv  NMHOME  $abs_rootdir


# determine where to store temporary files (must be writable to all users)
if ( ${?TMPDIR} == 0 ) then
	setenv  TMPDIR  /tmp
	echo Warning: TMPDIR not defined, and it will be set to directory /tmp.  >&2
endif

# determine platform (do not change this unless you don't have 'uname'!)
setenv	UNIX	`uname -s`
setenv	AR	`uname -m`

###############################################################################
#               NOTHING SHOULD NEED CHANGING BELOW THIS LINE!
###############################################################################

# other settings
set PLATFORM = `echo $UNIX $AR | awk '{print $1"_"$2}'`
setenv NETMHCII $NMHOME/$PLATFORM


# main ========================================================================
if ( -x $NETMHCII/bin/netMHCII ) then
#   $NETMHCII/bin/netMHCII $*
    $NETMHCII/bin/netMHCII $argv[1] $argv[2] $argv[3] $argv[4] $argv[5] > $argv[6]
else
   echo netMHCII: no binaries found for $PLATFORM
endif

# end of script ===============================================================
