#A2 vs At
python ~/scripte/Alternative/module/homologASeventCount.py -homolog ~/work/Alternative/result/homologo/homologGene/A2_vs_At_collinearity.txt -AS1 ~/work/Alternative/result/homologo/A2/end_third -AS2 ~/work/Alternative/result/homologo/TM-1/end_third -T IntronR -o A2_At_IR
# D5 vs Dt
python ~/scripte/Alternative/module/homologASeventCount.py -homolog ~/work/Alternative/result/homologo/homologGene/D5_vs_Dt_collinearity.txt -AS1 ~/work/Alternative/result/homologo/D5/end_third -AS2 ~/work/Alternative/result/homologo/TM-1/end_third -T IntronR -o D5_Dt_IR
##最后统一去重
tmp=`mktemp`
for i in `ls ./`; do sort ${i}|uniq >${tmp} && cp ${tmp} ${i}; done
for i in `ls ./homologeventStatic`; do awk '$2>0&&$4>0{print $0}' ./homologeventStatic/${i} >./consevePairegenes/${i}; done
##对应的事件数目
for i in `ls ./`
do
printf $i"\t"
awk '{a+=$2+$4}END{print a}' ${i}
done
##保守的基因对和事件数目
python ~/scripte/Alternative/module/extractAsEventCoordiate.py
-p ~/work/Alternative/result/Ga_result/CO11_12_result/06_Alignment/all.collapsed.gtf
-r ~/work/Alternative/data/Ga_genome/G.arboreum.Chr.v1.0.gtf
-AS ~/work/Alternative/result/homologo/A2/end_third
-IR IR_length -ES ES_length -AltA AltA_length -AltD AltD_length
## 提取保守的与不保守的事件的长度
for i in ES IR AltA AltD; do
cat ../blastdb/${i}/A2_At_conserve_end ../blastdb/${i}/A2_D5_conserve_end |cut -f1|sort |uniq |awk '{print "-\t-\t-\t"$0}'|cat - ../A2/${i}_length|sort -k4|uniq -f3 -d >${i}/conserve_${i}.txt;
cat ../blastdb/${i}/A2_At_conserve_end ../blastdb/${i}/A2_D5_conserve_end |cut -f1|sort |uniq |awk '{print "-\t-\t-\t"$0}'|cat - ../A2/${i}_length|sort -k4|uniq -f3 -u >${i}/noconserve_${i}.txt;
done
## 绘图数据
for i in ES AltA AltD IR; do for j in conserve noconserve; do awk '{print "'$i'""_""'$j'""\t"$3-$2+1"\t""'$j'"}' ${i}/${j}_${i}.txt >>./plotData ; done; done