= read.table('data/NAD')
sub for(i in 1:23){
if(i==23){i = 'X'}
= paste0('chr',i)
chr = sub[sub$V1==chr,]
t = sum(t$V3-t$V2)/chr_info[chr_info$chr==chr,2]
t $chr==chr,3] = t
chr_info[chr_info
}$ratio = round(as.numeric(chr_info$ratio),4)*100
chr_info<- chr_info %>%
chart bar_chart(chr, ratio,bar_color = "darkorange")
+
chart geom_text(aes(label = ratio, hjust = "left"))