文章预览
大豆的数据来源论文 https://www.sciencedirect.com/science/article/pii/S0092867420306188 Pan-Genome of Wild and Cultivated Soybeans 大豆基因组数据下载链接 https://ngdc.cncb.ac.cn/soyomics/download 下载基因组fasta和对应的蛋白注释文件,用gffread提取cds序列和蛋白序列 作图代码 read_tsv("cell.soybean.PanGenome/Orthogroups.GeneCount.tsv") %>% dplyr::select(-Total) %>% left_join(dat.family.group %>% dplyr::select(-total), by=c("Orthogroup"="familyID")) %>% pivot_longer(!c(Orthogroup,group), names_to = "sample_id") %>% group_by(group,sample_id) %>% summarise(value=sum(value)) %>% ungroup() %>% mutate(group=factor(group,levels=rev(c("Core","SoftCore", "Dispensable","Private")))) %>% ggplot(aes(y=sample_id,x=value))+ geom_bar(stat = "identity", aes(fill=group), width = 0.9, show.legend = FALSE)+ theme_bw(base_size = 15)
………………………………