Get James’s data
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
download.file("https://ndownloader.figshare.com/files/4837627","paralogs.csv")
y<-read.csv("paralogs.csv",header=T) %>%
select(sorghum2,maize1,maize2)
Get genes in ≥1 subgenome
count(y)-count(filter(y,maize2=="No Gene",maize1=="No Gene"))
## n
## 1 21321
Get genes in both subgenomes
count(filter(y,maize2!="No Gene",maize1!="No Gene"))
## Source: local data frame [1 x 1]
##
## n
## (int)
## 1 6535
Get unique to m1
count(filter(y,maize2=="No Gene",maize1!="No Gene"))
## Source: local data frame [1 x 1]
##
## n
## (int)
## 1 10430
Get unique to m2
count(filter(y,maize2!="No Gene",maize1=="No Gene"))
## Source: local data frame [1 x 1]
##
## n
## (int)
## 1 4356