#!/bin/bash

myvar=START
size=${#myvar} 

GENOME=chicken
BUILD=galGal5

while [ $size -gt 3 ]; do 

./prepRSEM.bash $GENOME $BUILD > a.txt 2>&1

a=$(grep Transcript a.txt|awk '{print $2}')
#a=$(grep gene_id a.txt | awk '{print substr($8, 1, length($8)-2);}')
echo "["$a"]"
grep -v $a /share/data/umw_biocore/genome_data/$GENOME/$BUILD/ucsc.gtf > /share/data/umw_biocore/genome_data/$GENOME/$BUILD/ucsc_new1.gtf
mv /share/data/umw_biocore/genome_data/$GENOME/$BUILD/ucsc_new1.gtf /share/data/umw_biocore/genome_data/$GENOME/$BUILD/ucsc.gtf

done
