diff VCFToolsSlidingWindow/vcfToolsSlidingWindow.sh @ 3:612066e3f57d draft

Uploaded
author gandres
date Mon, 09 Nov 2015 05:18:45 -0500
parents
children b762ecbe2314
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VCFToolsSlidingWindow/vcfToolsSlidingWindow.sh	Mon Nov 09 05:18:45 2015 -0500
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+tool_path=$(dirname $0)
+
+filein=$1
+fileout_label=$(date "+%Y%m%d%H%M%S")
+step=$2
+window=$3
+filelog=$4
+fileout_taj=$5
+fileout_tstv=$6
+fileout_windowed=$7
+fileout_snp=$8
+group=$9
+if [ "$group" != "none" ]
+then fileout_fst=${10}
+	fileout_fst_marker=${11}
+	fileout_taj_combined=${12}
+	fileout_windowed_combined=${13}
+fi
+
+
+cp $filein ${filein}.vcf 
+if [ "$group" != "none" ] 
+then perl $tool_path/VCFToolsSlidingWindow.pl --input ${filein}.vcf --out $fileout_label --step $step --window $window --group $group
+else perl $tool_path/VCFToolsSlidingWindow.pl --input ${filein}.vcf --out $fileout_label --step $step --window $window
+fi
+        
+mv ${fileout_label}.vcftools.log $filelog 
+mv ${fileout_label}.Tajima.D ${fileout_taj} 
+mv ${fileout_label}.TsTv ${fileout_tstv} 
+mv ${fileout_label}.windowed.pi ${fileout_windowed}
+mv ${fileout_label}.snpden ${fileout_snp} 
+
+if [ "$group" != "none" ] 
+then mv ${fileout_label}.fst.txt ${fileout_fst} 
+mv ${fileout_label}.fst.by_marker.genes.txt ${fileout_fst_marker} 
+mv ${fileout_label}.combined.dtajima.txt ${fileout_taj_combined} 
+mv ${fileout_label}.combined.pi.txt ${fileout_windowed_combined}
+fi
+
+rm -f ${filein}.vcf ${filein}.vcf.*
+