20200111可变剪切数目统计

## 统计内含子保留事件的数目
cat A2/end_third |awk '$1~/^C/&&$3~/IntronR/{print $0}'|awk 'END{print "A2\tIR\t"NR}'  >eventStatic.txt
cat TM-1/end_third |awk '$1~/^Ghir_A/&&$3~/IntronR/{print $0}'|awk 'END{print "At\tIR\t"NR}' >>eventStatic.txt
cat TM-1/end_third |awk '$1~/^Ghir_D/&&$3~/IntronR/{print $0}'|awk 'END{print "Dt\tIR\t"NR}' >>eventStatic.txt
cat D5/end_third |awk '$1~/^C/&&$3~/IntronR/{print $0}'|awk 'END{print "D5\tIR\t"NR}' >>eventStatic.txt
## 统计AltA事件数目
cat A2/end_third |awk '$1~/^C/&&$3~/AltA/{print $0}'|awk 'END{print "A2\tAA\t"NR}'  >>eventStatic.txt
cat TM-1/end_third |awk '$1~/^Ghir_A/&&$3~/AltA/{print $0}'|awk 'END{print "At\tAA\t"NR}' >>eventStatic.txt
cat TM-1/end_third |awk '$1~/^Ghir_D/&&$3~/AltA/{print $0}'|awk 'END{print "Dt\tAA\t"NR}' >>eventStatic.txt
cat D5/end_third |awk '$1~/^C/&&$3~/AltA/{print $0}'|awk 'END{print "D5\tAA\t"NR}' >>eventStatic.txt

## 统计AltD事件数目

cat A2/end_third |awk '$1~/^C/&&$3~/AltD/{print $0}'|awk 'END{print "A2\tAD\t"NR}'  >>eventStatic.txt
cat TM-1/end_third |awk '$1~/^Ghir_A/&&$3~/AltD/{print $0}'|awk 'END{print "At\tAD\t"NR}' >>eventStatic.txt
cat TM-1/end_third |awk '$1~/^Ghir_D/&&$3~/AltD/{print $0}'|awk 'END{print "Dt\tAD\t"NR}' >>eventStatic.txt
cat D5/end_third |awk '$1~/^C/&&$3~/AltD/{print $0}'|awk 'END{print "D5\tAD\t"NR}' >>eventStatic.txt

## 统计ES事件的数目
cat A2/end_third |awk '$1~/^C/&&$3~/ExonS/{print $0}'|awk 'END{print "A2\tES\t"NR}'  >>eventStatic.txt
cat TM-1/end_third |awk '$1~/^Ghir_A/&&$3~/ExonS/{print $0}'|awk 'END{print "At\tES\t"NR}' >>eventStatic.txt
cat TM-1/end_third |awk '$1~/^Ghir_D/&&$3~/ExonS/{print $0}'|awk 'END{print "Dt\tES\t"NR}' >>eventStatic.txt
cat D5/end_third |awk '$1~/^C/&&$3~/ExonS/{print $0}'|awk 'END{print "D5\tES\t"NR}' >>eventStatic.txt

## 统计AP事件的数目
cat A2/end_third |awk '$1~/^C/&&$3~/AltP/{print $0}'|awk 'END{print "A2\tAP\t"NR}'  >>eventStatic.txt
cat TM-1/end_third |awk '$1~/^Ghir_A/&&$3~/AltP/{print $0}'|awk 'END{print "At\tAP\t"NR}' >>eventStatic.txt
cat TM-1/end_third |awk '$1~/^Ghir_D/&&$3~/AltP/{print $0}'|awk 'END{print "Dt\tAP\t"NR}' >>eventStatic.txt
cat D5/end_third |awk '$1~/^C/&&$3~/AltP/{print $0}'|awk 'END{print "D5\tAP\t"NR}' >>eventStatic.txt

ggplot作图

## 改变剪切事件因子顺序
data$V2=factor(data$V2,levels = c("IR","AA","AD","ES","AP"))
## 改变基因组因子顺序
data$V1=factor(data$V1,levels = c("D5","A2","Dt","At"))

ggplot(data=data,aes(x=data$V1,y=data$V3,fill=data$V2))+geom_bar(stat = "identity",width = 0.5,position=position_dodge(0.7))

Last updated