#!/bin/sh

# Files
executable="mbmdr-2.7.5-mac-64bit.out"
pedfile="inputFile.ped"
mapfile="inputFile.map"

# Options
algorithm="--maxT"           # '--maxT' or '--minP' or '--margP'
execution="--sequential"     # '--sequential'
dataType="--binary"          # '--binary' or '--continuous'
mode="--hlo-mode"            # '--hlo-mode'
step1="--one-cell-approach"  # '--one-cell-approach'
step2="--two-tests"          # 'h-vs-l' or 'two-tests' or 'three-tests'
dimension="2"                # '1' or '2'
resultSize="50"              # any integer (large values take more computation time)        
permutations="999"           # any integer (large values take more computation time)
adjust="--adjust-codominant" # 'adjust-codominant' or 'adjust-additive' or ''

# PLINK convertion
$executable --plink2mbmdr --binary -ped $pedfile -map $mapfile -o input.txt -tr plinkstats.txt

# Execution
$executable $algorithm $execution $dataType $adjust $mode $step1 $step2 -d $dimension -n $resultSize -p $permutations -o output.txt input.txt > info.txt
