#!/bin/bash
echo "par1 is gene,par2 is fst_file"
#awk '{(if ($3==gene) print $0}' $2>gene_info
grep -i $1 gene_info|awk '{print $2,$3,$4}'>_info
while read chr start end
do
awk -v chr=$chr -v start=$start -v end=$end '{if($1==chr && $2>=start && $2<=end) print $0}' $2>_fst
done<_info
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/281970.html