OLF_IFS=$IFS
IFS=$'\n'

for i in `cat ~/project/Allele_Web/data_result/ASM/asm_topGene/result_other_species/specise_dir_genome.txt`
do
species=`echo ${i}|cut -f 2`
species_dir=`echo ${i}|cut -f 1`
echo $species
if [ -f ./${species}.top100.txt ]; then
if [ -f ~/project/Genome/${species_dir}/${species_dir}_karyotype.txt ]; then
awk 'BEGIN{print "Type\tShape\tChr\tStart\tEnd\tcolor"}{print "Top\ttriangle\t"$1"\t"$2"\t"$3"\tff7f00"}' ./${species}.top100.txt > ./data/${species}.top100.mark.txt
awk 'ARGIND==1{a[$1]}ARGIND==2{if($3 in a){print $0}}' ~/project/Genome/${species_dir}/${species_dir}_karyotype.txt ./data/${species}.top100.mark.txt > ./data/${species}.top100.mark2.txt
Rscript plot_mark.r ./data/${species}.top100.mark2.txt ~/project/Genome/${species_dir}/${species_dir}_karyotype.txt ${species}.top100 ./ 240 220
fi
fi


done

IFS=$OLD_IFS
