library(ggplot2)
library(dplyr)
library(forcats)
data <- read.csv("intron_GC_section3_char_GC.csv", header = TRUE,sep=',',encoding="utf-8")
colors<-c("#EE6666","#FAC858","#DA70D6","#5470C6","#73C0DE")
plot=data %>%
mutate(class = fct_reorder(type, GC)) %>%
ggplot( aes(x=factor(type, level=c("A","B","C","none_IR","all_intron")), y=GC, fill=type)) +
geom_boxplot() +
scale_fill_manual(values = colors)+
coord_cartesian(ylim = c(0.2,0.5))+
labs(x=NULL,y=NULL)+
theme_bw() +
theme(legend.position="none")+
ylab("GC") +
xlab("Type") +
theme(axis.text.y=element_text(size=16),
axis.title=element_text(size=18),
axis.text.x = element_text(size=16,vjust = 1, hjust = 1, angle = 30),
panel.grid.minor.x=element_blank(),
panel.grid.minor.y=element_blank())
jpeg(file="fig_a.jpg", width=5, height=5, units="in", res=500)
plot
dev.off()
library(ggplot2)
library(dplyr)
library(forcats)
data <- read.csv("intron_len.csv", header = TRUE,sep=',',encoding="utf-8")
data$type=as.character(data$type)
t2=which(data$type=="D")
data=data[-t2,]
colors<-c("#EE6666","#FAC858","#DA70D6","#5470C6","#73C0DE")
plot=data %>%
mutate(class = fct_reorder(type, width)) %>%
ggplot( aes(x=factor(type, level=c("A","B","C","none_IR","all_intron")), y=width, fill=type)) +
geom_boxplot() +
scale_fill_manual(values = colors)+
coord_cartesian(ylim = c(0,1700))+
scale_y_continuous(labels = scales::comma)+
labs(x=NULL,y=NULL)+
theme_bw() +
theme(legend.position="none")+
ylab("Intron length") +
xlab("Type") +
theme(axis.text.y=element_text(size=16),
axis.title=element_text(size=18),
axis.text.x = element_text(size=16,vjust = 1, hjust = 1, angle = 30),
panel.grid.minor.x=element_blank(),
panel.grid.minor.y=element_blank())
jpeg(file="fig_b.jpg", width=5, height=5, units="in", res=500)
plot
dev.off()
library(Rmisc)
library(ggpubr)
library(ggplot2)
data1 <- read.csv("GC_a_fig.csv", header = TRUE,sep=',',encoding="utf-8")
data1$percent=data1$percent*10
data1$type="A"
data2 <- read.csv("GC_allData/GC_b_fig.csv", header = TRUE,sep=',',encoding="utf-8")
data2$percent=data2$percent*10
data2$type="B"
data3 <- read.csv("GC_allData/GC_c_fig.csv", header = TRUE,sep=',',encoding="utf-8")
data3$percent=data3$percent*10
data3$type="C"
data4 <- read.csv("GC_allData/GC_non_fig.csv", header = TRUE,sep=',',encoding="utf-8")
data4$percent=data4$percent*10
data4$type="none_IR"
data5 <- read.csv("GC_allData/arab_GC_all_fig.csv", header = TRUE,sep=',',encoding="utf-8")
data5$percent=data5$percent*10
data5$type="all_arab"
data6 <- read.csv("GC_allData/rice_GC_all_fig.csv", header = TRUE,sep=',',encoding="utf-8")
data6$percent=data6$percent*10
data6$type="all_rice"
data=rbind(data1,data2,data3,data4,data5,data6)
data <- within(data, type<- factor(type, levels = c("A","B","C","none_IR","all_arab","all_rice")))
with(data, levels(type))
jpeg(file="fig_c.jpg", width=15, height=10, units="in", res=800)
ggplot(data,aes(x=percent,y=GC))+
stat_summary(fun.data="mean_cl_boot",geom="ribbon",alpha=I(.5),fill="#8FD1F1")+
stat_summary(fun="mean",geom="line",size=1.5,linetype=2, color="#269FCC")+
labs(x="Percent", y="GC") +
theme_bw()+
theme(axis.title.x= element_text(size=25),
axis.title.y= element_text(size=25),
axis.text.x = element_text( size=25),
axis.text.y = element_text(size=25),
panel.grid.minor.x=element_blank(),
panel.grid.minor.y=element_blank())+
facet_wrap(~type)+
theme( strip.text = element_text(size = 25))+
coord_cartesian(ylim = c(0.3,0.4))
dev.off()
library(dplyr)
library(viridis)
library(hrbrthemes)
library(ggplot2)
library(reshape2)
data <- read.csv("section3_intronLocation_2_del1.csv", header = TRUE,sep=',',encoding="utf-8")
p <- data %>%
ggplot( aes(x=percent,y=..density..)) +
geom_histogram( breaks=seq(0,1,0.1),binwidth=3, fill="#8ACEEB", color="black", alpha=0.9) +
theme_bw() +
xlab("Location of introns with intronic RNAs")+
ylab("Density")+
geom_density(color="blue",lwd=1)+
theme(axis.line=element_line(size=0.5,colour="black"),panel.grid=element_blank())+
theme(axis.text.y=element_text(size=18),
axis.text.x = element_text(size=18),
axis.title.y=element_text(size=18),
axis.title.x = element_text(size=18),
panel.grid.minor.x=element_blank(),
panel.grid.minor.y=element_blank())
jpeg(file="fig_d.jpg", width=5.3, height=5, units="in", res=500)
p
dev.off()
library(ggplot2)
library(dplyr)
library(hrbrthemes)
data <- read.csv("intronNo_fig.csv", header = TRUE,sep=',',encoding="utf-8")
data$intronNo= factor(data$intronNo , levels=c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,18,21))
colors<-c("#FAC858","#91CC75","#5470C6","#EE6666")
plot=ggplot(data, aes(intronNo,numOfIR,group=1)) +
scale_fill_manual(values = colors)+
scale_color_manual(values = colors)+
geom_line(size = 1.5,colour ="#5470C6",lty=1) +
geom_point(shape = 24, size =5,fill = "yellow",colour ="red") +
theme_bw() +
theme(legend.position="none")+
ylab("Number of intronic RNA") +
xlab("Intron number") +
theme(panel.border=element_blank(),
axis.line=element_line(size=0.5,colour="black"),
axis.text.y=element_text(size=18),
axis.title=element_text(size=20),
axis.text.x = element_text(size=18),
panel.grid.minor.x=element_blank(),
panel.grid.minor.y=element_blank())
jpeg(file="fig_e.jpg", width=6, height=5, units="in", res=500)
plot
dev.off()