workingfolder=$1;
cd $workingfolder
cut -f1 ../TXdb.bed |uniq >chr.list;
while read line ;
do 
	chr=`echo $line |tr -d "\n"`;
	grep -w $chr ../TXdb.bed >$chr.bed;
	split -3000 $chr.bed $chr.;
	echo $chr....;
	rm $chr.bed;
done <chr.list;
