#!/bin/bash # This script is for IBD>0.05 with very many individuals # It shows how individuals could be remover sequentially # Result is in files RES_* # It incorporates functions from LFE64 #####You need to change filenames on the left: cp IBDPAIRS_name.txt FILENAME cp PFILE_name.txt PFILENAME wait #####This is assuming that the file names are space delimited for limvalue in 0.5 0.4 0.3 0.2 0.1 0.09 0.08 0.07 0.06 0.055; do ppp=15000 ALLELE -M relout5 -file FILENAME -pfile PFILENAME -out RES_${limvalue}.txt -limit ${limvalue} -delim space -mode 2 -pdefault zero -pidsize $ppp > RES_${limvalue}.log wait LFE64 -M extractcolumns -columns 2 -delim space -file RES_${limvalue}.txt -out list.txt wait LFE64 -M listselection -file FILENAME -header no -column 1 -delim space -list list.txt -in-or-out out -out FILENAME_inter wait LFE64 -M listselection -file FILENAME_inter -header no -column 2 -delim space -list list.txt -in-or-out out -out FILENAME_temp wait rm FILENAME_inter LFE64 -M listselection -file PFILENAME -header no -column 1 -delim space -list list.txt -in-or-out out -out PFILENAME_temp wait mv FILENAME_temp FILENAME mv PFILENAME_temp PFILENAME wait done ################################ limvalue=0.05; ALLELE -M relout5 -file FILENAME -pfile PFILENAME -out RES_${limvalue}.txt -limit ${limvalue} -delim space -mode 2 -pdefault zero -pidsize 1 > RES_${limvalue}.log rm FILENAME rm PFILENAME