2.3 hNAD chromosome percentage

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