refdir="/1000GP_Phase3";
for chr in {1.22}; do
namefile="gwas.chr${chr}.phased";
maxPos=$(gawk '$1!="position" {print $1}'
${refdir}/genetic_map_chr${chr}_combined_b37.txt | sort -n | tail -n 1);
nrChunk=$(expr ${maxPos} "/" 5000000);
nrChunk2=$(expr ${nrChunk} "+" 1);
start="0";
for chunk in $(seq 1 $nrChunk2); do
endchr=$(expr $start "+" 5000000);
startchr=$(expr $start "+" 1);
impute2.1
-known_haps_g ${namefile}.haps
-m ${refdir}/genetic_map_chr${chr}_combined_b37.txt
-h ${refdir}/1000GP_Phase3_chr${chr}.hap.gz
-l ${refdir}/1000GP_Phase3_chr${chr}.legend.gz
-int ${startchr} ${endchr} -Ne 20000 -o ${namefile}.chunk${chunk}.impute2;
start=${endchr};
done
done
终端没有回应?我的数据集是gwas.chr1.phased到gwas.chr22.phased(22个文件)。我正在使用外部1000 Genome 3期数据集进行插补,如.txt,.hap.gz和.leged.gz扩展名所示。